From c02da00f6949fde6e64ec292b15d12c21da238ef Mon Sep 17 00:00:00 2001 From: Terence Hampson Date: Thu, 18 Jan 2024 09:21:11 -0500 Subject: [PATCH 01/25] Enabling MoreChunkedMessages for Invoke Interaction (#31378) --------- Co-authored-by: Boris Zbarsky --- src/app/BUILD.gn | 1 + src/app/CommandHandler.cpp | 125 ++++++++++++----- src/app/CommandHandler.h | 59 ++++----- src/app/CommandResponseSender.cpp | 162 +++++++++++++++++++++++ src/app/CommandResponseSender.h | 160 ++++++++++++++++++++++ src/app/CommandSender.cpp | 44 ++++-- src/app/CommandSender.h | 4 +- src/app/tests/TestCommandInteraction.cpp | 141 +++++--------------- 8 files changed, 509 insertions(+), 187 deletions(-) create mode 100644 src/app/CommandResponseSender.cpp create mode 100644 src/app/CommandResponseSender.h diff --git a/src/app/BUILD.gn b/src/app/BUILD.gn index b8a408faae85bf..9150bfa7857185 100644 --- a/src/app/BUILD.gn +++ b/src/app/BUILD.gn @@ -95,6 +95,7 @@ static_library("app") { "ChunkedWriteCallback.h", "CommandHandler.cpp", "CommandResponseHelper.h", + "CommandResponseSender.cpp", "CommandSender.cpp", "DefaultAttributePersistenceProvider.cpp", "DefaultAttributePersistenceProvider.h", diff --git a/src/app/CommandHandler.cpp b/src/app/CommandHandler.cpp index dc1f382fab89ce..cb3c8eeb84edd9 100644 --- a/src/app/CommandHandler.cpp +++ b/src/app/CommandHandler.cpp @@ -43,7 +43,9 @@ namespace chip { namespace app { using Status = Protocols::InteractionModel::Status; -CommandHandler::CommandHandler(Callback * apCallback) : mExchangeCtx(*this), mpCallback(apCallback), mSuppressResponse(false) {} +CommandHandler::CommandHandler(Callback * apCallback) : + mpCallback(apCallback), mResponseSenderDone(HandleOnResponseSenderDone, this), mSuppressResponse(false) +{} CommandHandler::CommandHandler(TestOnlyMarker aTestMarker, Callback * apCallback, CommandPathRegistry * apCommandPathRegistry) : CommandHandler(apCallback) @@ -64,7 +66,20 @@ CHIP_ERROR CommandHandler::AllocateBuffer() mCommandMessageWriter.Init(std::move(commandPacket)); ReturnErrorOnFailure(mInvokeResponseBuilder.InitWithEndBufferReserved(&mCommandMessageWriter)); - mInvokeResponseBuilder.SuppressResponse(mSuppressResponse); + if (mReserveSpaceForMoreChunkMessages) + { + ReturnErrorOnFailure(mInvokeResponseBuilder.ReserveSpaceForMoreChunkedMessages()); + } + + // Sending an InvokeResponse to an InvokeResponse is going to be removed from the spec soon. + // It was never implemented in the SDK, and there are no command responses that expect a + // command response. This means we will never receive an InvokeResponse Message in response + // to an InvokeResponse Message that we are sending. This means that the only response + // we are expecting to receive in response to an InvokeResponse Message that we are + // sending-out is a status when we are chunking multiple responses. As a result, to satisfy the + // condition that we don't set SuppressResponse to true while also setting + // MoreChunkedMessages to true, we are hardcoding the value to false here. + mInvokeResponseBuilder.SuppressResponse(/* aSuppressResponse = */ false); ReturnErrorOnFailure(mInvokeResponseBuilder.GetError()); mInvokeResponseBuilder.CreateInvokeResponses(/* aReserveEndBuffer = */ true); @@ -86,20 +101,26 @@ void CommandHandler::OnInvokeCommandRequest(Messaging::ExchangeContext * ec, con // NOTE: we already know this is an InvokeCommand Request message because we explicitly registered with the // Exchange Manager for unsolicited InvokeCommand Requests. - mExchangeCtx.Grab(ec); + mResponseSender.SetExchangeContext(ec); // Use the RAII feature, if this is the only Handle when this function returns, DecrementHoldOff will trigger sending response. // TODO: This is broken! If something under here returns error, we will try - // to SendCommandResponse(), and then our caller will try to send a status + // to StartSendingCommandResponses(), and then our caller will try to send a status // response too. Figure out at what point it's our responsibility to // handler errors vs our caller's. Handle workHandle(this); - mExchangeCtx->WillSendMessage(); + // TODO(#30453): It should be possible for SetExchangeContext to internally call WillSendMessage. + // Unfortunately, doing so would require us to either: + // * Make TestCommandInteraction a friend of CommandResponseSender to allow it to set the exchange + // context without calling WillSendMessage, or + // * Understand why unit tests fail when WillSendMessage is called during the execution of + // SetExchangeContext. + mResponseSender.WillSendMessage(); status = ProcessInvokeRequest(std::move(payload), isTimedInvoke); if (status != Status::Success) { - StatusResponse::Send(status, mExchangeCtx.Get(), false /*aExpectResponse*/); + mResponseSender.SendStatusResponse(status); mSentStatusResponse = true; } @@ -187,7 +208,7 @@ Status CommandHandler::ProcessInvokeRequest(System::PacketBufferHandle && payloa #if CHIP_CONFIG_IM_PRETTY_PRINT invokeRequestMessage.PrettyPrint(); #endif - if (mExchangeCtx->IsGroupExchangeContext()) + if (mResponseSender.IsForGroup()) { SetGroupRequest(true); } @@ -206,6 +227,14 @@ Status CommandHandler::ProcessInvokeRequest(System::PacketBufferHandle && payloa TLV::TLVReader invokeRequestsReader; invokeRequests.GetReader(&invokeRequestsReader); + size_t commandCount = 0; + VerifyOrReturnError(TLV::Utilities::Count(invokeRequestsReader, commandCount, false /* recurse */) == CHIP_NO_ERROR, + Status::InvalidAction); + if (commandCount > 1) + { + mReserveSpaceForMoreChunkMessages = true; + } + while (CHIP_NO_ERROR == (err = invokeRequestsReader.Next())) { VerifyOrReturnError(TLV::AnonymousTag() == invokeRequestsReader.GetTag(), Status::InvalidAction); @@ -236,14 +265,6 @@ Status CommandHandler::ProcessInvokeRequest(System::PacketBufferHandle && payloa return Status::Success; } -CHIP_ERROR CommandHandler::OnMessageReceived(Messaging::ExchangeContext * apExchangeContext, const PayloadHeader & aPayloadHeader, - System::PacketBufferHandle && aPayload) -{ - ChipLogDetail(DataManagement, "CommandHandler: Unexpected message type %d", aPayloadHeader.GetMessageType()); - StatusResponse::Send(Status::InvalidAction, mExchangeCtx.Get(), false /*aExpectResponse*/); - return CHIP_ERROR_INVALID_MESSAGE_TYPE; -} - void CommandHandler::Close() { mSuppressResponse = false; @@ -261,6 +282,14 @@ void CommandHandler::Close() } } +void CommandHandler::HandleOnResponseSenderDone(void * context) +{ + CommandHandler * const _this = static_cast(context); + VerifyOrDie(_this != nullptr); + + _this->Close(); +} + void CommandHandler::IncrementHoldOff() { mPendingWork++; @@ -278,39 +307,52 @@ void CommandHandler::DecrementHoldOff() if (!mSentStatusResponse) { - if (!mExchangeCtx) + if (!mResponseSender.HasExchangeContext()) { ChipLogProgress(DataManagement, "Skipping command response: exchange context is null"); } else if (!IsGroupRequest()) { - CHIP_ERROR err = SendCommandResponse(); + CHIP_ERROR err = StartSendingCommandResponses(); if (err != CHIP_NO_ERROR) { ChipLogError(DataManagement, "Failed to send command response: %" CHIP_ERROR_FORMAT, err.Format()); + // TODO(#30453): It should be our responsibility to send a Failure StatusResponse to the requestor + // if there is a SessionHandle, but legacy unit tests explicitly check the behavior where + // CommandHandler does not send any message. Changing this behavior should be done in a standalone + // PR where only that specific change is made. Here is a possible solution that should + // be done that fulfills our responsibility to send a Failure StatusResponse, but this causes unit + // tests to start failing. + // ``` + // if (mResponseSender.HasSessionHandle()) + // { + // mResponseSender.SendStatusResponse(Status::Failure); + // } + // Close(); + // return; + // ``` } } } + if (mResponseSender.AwaitingStatusResponse()) + { + // If we are awaiting a status response, we want to call Close() only once the response sender is done. + // Therefore, register to be notified when CommandResponseSender is done. + mResponseSender.RegisterOnResponseSenderDoneCallback(&mResponseSenderDone); + return; + } Close(); } -CHIP_ERROR CommandHandler::SendCommandResponse() +CHIP_ERROR CommandHandler::StartSendingCommandResponses() { - System::PacketBufferHandle commandPacket; - VerifyOrReturnError(mPendingWork == 0, CHIP_ERROR_INCORRECT_STATE); VerifyOrReturnError(mState == State::AddedCommand, CHIP_ERROR_INCORRECT_STATE); - VerifyOrReturnError(mExchangeCtx, CHIP_ERROR_INCORRECT_STATE); - - ReturnErrorOnFailure(Finalize(commandPacket)); - ReturnErrorOnFailure( - mExchangeCtx->SendMessage(Protocols::InteractionModel::MsgType::InvokeCommandResponse, std::move(commandPacket))); - // The ExchangeContext is automatically freed here, and it makes mpExchangeCtx be temporarily dangling, but in - // all cases, we are going to call Close immediately after this function, which nulls out mpExchangeCtx. - - MoveToState(State::CommandSent); + VerifyOrReturnError(mResponseSender.HasExchangeContext(), CHIP_ERROR_INCORRECT_STATE); + ReturnErrorOnFailure(FinalizeLastInvokeResponseMessage()); + ReturnErrorOnFailure(mResponseSender.StartSendingCommandResponses()); return CHIP_NO_ERROR; } @@ -352,7 +394,7 @@ Status CommandHandler::ProcessCommandDataIB(CommandDataIB::Parser & aCommandElem } } - VerifyOrExit(mExchangeCtx && mExchangeCtx->HasSessionHandle(), err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit(mResponseSender.HasSessionHandle(), err = CHIP_ERROR_INCORRECT_STATE); { Access::SubjectDescriptor subjectDescriptor = GetSubjectDescriptor(); @@ -441,7 +483,7 @@ Status CommandHandler::ProcessGroupCommandDataIB(CommandDataIB::Parser & aComman err = commandPath.GetGroupCommandPath(&clusterId, &commandId); VerifyOrReturnError(err == CHIP_NO_ERROR, Status::InvalidAction); - groupId = mExchangeCtx->GetSessionHandle()->AsIncomingGroupSession()->GetGroupId(); + groupId = mResponseSender.GetGroupId(); fabric = GetAccessingFabricIndex(); ChipLogDetail(DataManagement, "Received group command for Group=%u Cluster=" ChipLogFormatMEI " Command=" ChipLogFormatMEI, @@ -725,7 +767,7 @@ TLV::TLVWriter * CommandHandler::GetCommandDataIBTLVWriter() FabricIndex CommandHandler::GetAccessingFabricIndex() const { VerifyOrDie(!mGoneAsync); - return mExchangeCtx->GetSessionHandle()->GetFabricIndex(); + return mResponseSender.GetAccessingFabricIndex(); } CommandHandler * CommandHandler::Handle::Get() @@ -759,12 +801,23 @@ CommandHandler::Handle::Handle(CommandHandler * handle) } } -CHIP_ERROR CommandHandler::Finalize(System::PacketBufferHandle & commandPacket) +CHIP_ERROR CommandHandler::FinalizeInvokeResponseMessage(bool aHasMoreChunks) { + System::PacketBufferHandle packet; + VerifyOrReturnError(mState == State::AddedCommand, CHIP_ERROR_INCORRECT_STATE); ReturnErrorOnFailure(mInvokeResponseBuilder.GetInvokeResponses().EndOfInvokeResponses()); + if (aHasMoreChunks) + { + // Unreserving space previously reserved for MoreChunkedMessages is done + // in the call to mInvokeResponseBuilder.MoreChunkedMessages. + mInvokeResponseBuilder.MoreChunkedMessages(aHasMoreChunks); + ReturnErrorOnFailure(mInvokeResponseBuilder.GetError()); + } ReturnErrorOnFailure(mInvokeResponseBuilder.EndOfInvokeResponseMessage()); - return mCommandMessageWriter.Finalize(&commandPacket); + ReturnErrorOnFailure(mCommandMessageWriter.Finalize(&packet)); + mResponseSender.AddInvokeResponseToSend(std::move(packet)); + return CHIP_NO_ERROR; } const char * CommandHandler::GetStateStr() const @@ -784,8 +837,8 @@ const char * CommandHandler::GetStateStr() const case State::AddedCommand: return "AddedCommand"; - case State::CommandSent: - return "CommandSent"; + case State::DispatchResponses: + return "DispatchResponses"; case State::AwaitingDestruction: return "AwaitingDestruction"; diff --git a/src/app/CommandHandler.h b/src/app/CommandHandler.h index 5f5bf85d05377b..790a66f5c2d6f5 100644 --- a/src/app/CommandHandler.h +++ b/src/app/CommandHandler.h @@ -31,6 +31,7 @@ #pragma once #include "CommandPathRegistry.h" +#include "CommandResponseSender.h" #include #include @@ -54,7 +55,7 @@ namespace chip { namespace app { -class CommandHandler : public Messaging::ExchangeDelegate +class CommandHandler { public: class Callback @@ -374,14 +375,14 @@ class CommandHandler : public Messaging::ExchangeDelegate * Gets the inner exchange context object, without ownership. * * WARNING: This is dangerous, since it is directly interacting with the - * exchange being managed automatically by mExchangeCtx and + * exchange being managed automatically by mResponseSender and * if not done carefully, may end up with use-after-free errors. * * @return The inner exchange context, might be nullptr if no * exchange context has been assigned or the context * has been released. */ - Messaging::ExchangeContext * GetExchangeContext() const { return mExchangeCtx.Get(); } + Messaging::ExchangeContext * GetExchangeContext() const { return mResponseSender.GetExchangeContext(); } /** * @brief Flush acks right away for a slow command @@ -394,13 +395,7 @@ class CommandHandler : public Messaging::ExchangeDelegate * execution. * */ - void FlushAcksRightAwayOnSlowCommand() - { - VerifyOrReturn(mExchangeCtx); - auto * msgContext = mExchangeCtx->GetReliableMessageContext(); - VerifyOrReturn(msgContext != nullptr); - msgContext->FlushAcks(); - } + void FlushAcksRightAwayOnSlowCommand() { mResponseSender.FlushAcksRightNow(); } /** * GetSubjectDescriptor() may only be called during synchronous command @@ -411,31 +406,20 @@ class CommandHandler : public Messaging::ExchangeDelegate Access::SubjectDescriptor GetSubjectDescriptor() const { VerifyOrDie(!mGoneAsync); - return mExchangeCtx->GetSessionHandle()->GetSubjectDescriptor(); + return mResponseSender.GetSubjectDescriptor(); } private: friend class TestCommandInteraction; friend class CommandHandler::Handle; - CHIP_ERROR OnMessageReceived(Messaging::ExchangeContext * ec, const PayloadHeader & payloadHeader, - System::PacketBufferHandle && payload) override; - - void OnResponseTimeout(Messaging::ExchangeContext * ec) override - { - // - // We're not expecting responses to any messages we send out on this EC. - // - VerifyOrDie(false); - } - enum class State : uint8_t { Idle, ///< Default state that the object starts out in, where no work has commenced Preparing, ///< We are prepaing the command or status header. AddingCommand, ///< In the process of adding a command. AddedCommand, ///< A command has been completely encoded and is awaiting transmission. - CommandSent, ///< The command has been sent successfully. + DispatchResponses, ///< The command response(s) are being dispatched. AwaitingDestruction, ///< The object has completed its work and is awaiting destruction by the application. }; @@ -480,7 +464,11 @@ class CommandHandler : public Messaging::ExchangeDelegate CHIP_ERROR PrepareInvokeResponseCommand(const CommandPathRegistryEntry & apCommandPathRegistryEntry, const ConcreteCommandPath & aCommandPath, bool aStartDataStruct); - CHIP_ERROR Finalize(System::PacketBufferHandle & commandPacket); + CHIP_ERROR FinalizeLastInvokeResponseMessage() { return FinalizeInvokeResponseMessage(/* aHasMoreChunks = */ false); } + + CHIP_ERROR FinalizeIntermediateInvokeResponseMessage() { return FinalizeInvokeResponseMessage(/* aHasMoreChunks = */ true); } + + CHIP_ERROR FinalizeInvokeResponseMessage(bool aHasMoreChunks); /** * Called internally to signal the completion of all work on this object, gracefully close the @@ -489,6 +477,11 @@ class CommandHandler : public Messaging::ExchangeDelegate */ void Close(); + /** + * @brief Callback method invoked when CommandResponseSender has finished sending all messages. + */ + static void HandleOnResponseSenderDone(void * context); + /** * ProcessCommandDataIB is only called when a unicast invoke command request is received * It requires the endpointId in its command path to be able to dispatch the command @@ -500,7 +493,8 @@ class CommandHandler : public Messaging::ExchangeDelegate * It doesn't need the endpointId in it's command path since it uses the GroupId in message metadata to find it */ Protocols::InteractionModel::Status ProcessGroupCommandDataIB(CommandDataIB::Parser & aCommandElement); - CHIP_ERROR SendCommandResponse(); + CHIP_ERROR StartSendingCommandResponses(); + CHIP_ERROR AddStatusInternal(const ConcreteCommandPath & aCommandPath, const StatusIB & aStatus); /** @@ -544,7 +538,6 @@ class CommandHandler : public Messaging::ExchangeDelegate size_t MaxPathsPerInvoke() const { return mMaxPathsPerInvoke; } - Messaging::ExchangeHolder mExchangeCtx; Callback * mpCallback = nullptr; InvokeResponseMessage::Builder mInvokeResponseBuilder; TLV::TLVType mDataElementContainerType = TLV::kTLVType_NotSpecified; @@ -559,13 +552,17 @@ class CommandHandler : public Messaging::ExchangeDelegate CommandPathRegistry * mCommandPathRegistry = &mBasicCommandPathRegistry; Optional mRefForResponse; + chip::Callback::Callback mResponseSenderDone; + CommandResponseSender mResponseSender; + State mState = State::Idle; State mBackupState; - bool mSuppressResponse = false; - bool mTimedRequest = false; - bool mSentStatusResponse = false; - bool mGroupRequest = false; - bool mBufferAllocated = false; + bool mSuppressResponse = false; + bool mTimedRequest = false; + bool mSentStatusResponse = false; + bool mGroupRequest = false; + bool mBufferAllocated = false; + bool mReserveSpaceForMoreChunkMessages = false; // If mGoneAsync is true, we have finished out initial processing of the // incoming invoke. After this point, our session could go away at any // time. diff --git a/src/app/CommandResponseSender.cpp b/src/app/CommandResponseSender.cpp new file mode 100644 index 00000000000000..69ab21ea02f2f3 --- /dev/null +++ b/src/app/CommandResponseSender.cpp @@ -0,0 +1,162 @@ +/* + * Copyright (c) 2024 Project CHIP Authors + * All rights reserved. + * + * 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. + */ + +#include "CommandResponseSender.h" +#include "InteractionModelEngine.h" +#include "messaging/ExchangeContext.h" + +namespace chip { +namespace app { +using Status = Protocols::InteractionModel::Status; + +CHIP_ERROR CommandResponseSender::OnMessageReceived(Messaging::ExchangeContext * apExchangeContext, + const PayloadHeader & aPayloadHeader, System::PacketBufferHandle && aPayload) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + Optional failureStatusToSend; + + if (mState == State::AwaitingStatusResponse && + aPayloadHeader.HasMessageType(Protocols::InteractionModel::MsgType::StatusResponse)) + { + CHIP_ERROR statusError = CHIP_NO_ERROR; + err = StatusResponse::ProcessStatusResponse(std::move(aPayload), statusError); + VerifyOrExit(err == CHIP_NO_ERROR, failureStatusToSend.SetValue(Status::InvalidAction)); + err = statusError; + VerifyOrExit(err == CHIP_NO_ERROR, failureStatusToSend.SetValue(Status::InvalidAction)); + + // If SendCommandResponse() fails, we are responsible for closing the exchange, + // as stipulated by the API contract. We fulfill this obligation by setting + // `failureStatusToSend` to a value that triggers the transmission of a final + // StatusResponse, which does not expect a response. + err = SendCommandResponse(); + VerifyOrExit(err == CHIP_NO_ERROR, failureStatusToSend.SetValue(Status::Failure)); + + bool moreToSend = !mChunks.IsNull(); + if (!moreToSend) + { + // We are sending the final message and do not anticipate any further responses. We are + // calling ExitNow() to immediately execute Close() and subsequently return from this function. + ExitNow(); + } + return CHIP_NO_ERROR; + } + + ChipLogDetail(DataManagement, "CommandResponseSender: Unexpected message type %d", aPayloadHeader.GetMessageType()); + err = CHIP_ERROR_INVALID_MESSAGE_TYPE; + if (mState != State::AllInvokeResponsesSent) + { + failureStatusToSend.SetValue(Status::Failure); + ExitNow(); + } + StatusResponse::Send(Status::InvalidAction, mExchangeCtx.Get(), false /*aExpectResponse*/); + return err; +exit: + if (failureStatusToSend.HasValue()) + { + StatusResponse::Send(failureStatusToSend.Value(), mExchangeCtx.Get(), false /*aExpectResponse*/); + } + Close(); + return err; +} + +void CommandResponseSender::OnResponseTimeout(Messaging::ExchangeContext * apExchangeContext) +{ + ChipLogDetail(DataManagement, "CommandResponseSender: Timed out waiting for response from requester mState=[%10.10s]", + GetStateStr()); + Close(); +} + +CHIP_ERROR CommandResponseSender::StartSendingCommandResponses() +{ + VerifyOrReturnError(mState == State::ReadyForInvokeResponses, CHIP_ERROR_INCORRECT_STATE); + // If SendCommandResponse() fails, we are obligated to close the exchange as per the API + // contract. However, this method's contract also stipulates that in the event of our + // failure, the caller bears the responsibility of closing the exchange. + ReturnErrorOnFailure(SendCommandResponse()); + + bool moreToSend = !mChunks.IsNull(); + if (moreToSend) + { + MoveToState(State::AwaitingStatusResponse); + mExchangeCtx->SetDelegate(this); + } + else + { + Close(); + } + return CHIP_NO_ERROR; +} + +CHIP_ERROR CommandResponseSender::SendCommandResponse() +{ + VerifyOrReturnError(!mChunks.IsNull(), CHIP_ERROR_INCORRECT_STATE); + System::PacketBufferHandle commandResponsePayload = mChunks.PopHead(); + + bool moreToSend = !mChunks.IsNull(); + Messaging::SendFlags sendFlag = Messaging::SendMessageFlags::kNone; + if (moreToSend) + { + sendFlag = Messaging::SendMessageFlags::kExpectResponse; + mExchangeCtx->UseSuggestedResponseTimeout(app::kExpectedIMProcessingTime); + } + + ReturnErrorOnFailure(mExchangeCtx->SendMessage(Protocols::InteractionModel::MsgType::InvokeCommandResponse, + std::move(commandResponsePayload), sendFlag)); + + return CHIP_NO_ERROR; +} + +const char * CommandResponseSender::GetStateStr() const +{ +#if CHIP_DETAIL_LOGGING + switch (mState) + { + case State::ReadyForInvokeResponses: + return "ReadyForInvokeResponses"; + + case State::AwaitingStatusResponse: + return "AwaitingStatusResponse"; + + case State::AllInvokeResponsesSent: + return "AllInvokeResponsesSent"; + } +#endif // CHIP_DETAIL_LOGGING + return "N/A"; +} + +void CommandResponseSender::MoveToState(const State aTargetState) +{ + if (mState == aTargetState) + { + return; + } + mState = aTargetState; + ChipLogDetail(DataManagement, "Command response sender moving to [%10.10s]", GetStateStr()); +} + +void CommandResponseSender::Close() +{ + MoveToState(State::AllInvokeResponsesSent); + mCloseCalled = true; + if (mResponseSenderDoneCallback) + { + mResponseSenderDoneCallback->mCall(mResponseSenderDoneCallback->mContext); + } +} + +} // namespace app +} // namespace chip diff --git a/src/app/CommandResponseSender.h b/src/app/CommandResponseSender.h new file mode 100644 index 00000000000000..9148f4f9df0508 --- /dev/null +++ b/src/app/CommandResponseSender.h @@ -0,0 +1,160 @@ +/* + * Copyright (c) 2024 Project CHIP Authors + * All rights reserved. + * + * 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. + */ + +#pragma once + +#include +#include +#include + +namespace chip { +namespace app { + +typedef void (*OnResponseSenderDone)(void * context); +class CommandHandler; + +/** + * Class manages the process of sending `InvokeResponseMessage`(s) back to the initial requester. + */ +class CommandResponseSender : public Messaging::ExchangeDelegate +{ +public: + CommandResponseSender() : mExchangeCtx(*this) {} + + CHIP_ERROR OnMessageReceived(Messaging::ExchangeContext * ec, const PayloadHeader & payloadHeader, + System::PacketBufferHandle && payload) override; + + void OnResponseTimeout(Messaging::ExchangeContext * ec) override; + + /** + * Gets the inner exchange context object, without ownership. + * + * WARNING: This is dangerous, since it is directly interacting with the + * exchange being managed automatically by mExchangeCtx and + * if not done carefully, may end up with use-after-free errors. + * + * @return The inner exchange context, might be nullptr if no + * exchange context has been assigned or the context + * has been released. + */ + Messaging::ExchangeContext * GetExchangeContext() const { return mExchangeCtx.Get(); } + + /** + * @brief Flush acks right now, typically done when processing a slow command + */ + void FlushAcksRightNow() + { + VerifyOrReturn(mExchangeCtx); + auto * msgContext = mExchangeCtx->GetReliableMessageContext(); + VerifyOrReturn(msgContext != nullptr); + msgContext->FlushAcks(); + } + + /** + * Gets subject descriptor of the exchange. + * + * WARNING: This method should only be called when the caller is certain the + * session has not been evicted. + */ + Access::SubjectDescriptor GetSubjectDescriptor() const + { + VerifyOrDie(mExchangeCtx); + return mExchangeCtx->GetSessionHandle()->GetSubjectDescriptor(); + } + + bool HasSessionHandle() { return mExchangeCtx && mExchangeCtx->HasSessionHandle(); } + + FabricIndex GetAccessingFabricIndex() const + { + VerifyOrDie(mExchangeCtx); + return mExchangeCtx->GetSessionHandle()->GetFabricIndex(); + } + + void SetExchangeContext(Messaging::ExchangeContext * ec) { mExchangeCtx.Grab(ec); } + + void WillSendMessage() { mExchangeCtx->WillSendMessage(); } + + bool IsForGroup() + { + VerifyOrDie(mExchangeCtx); + return mExchangeCtx->IsGroupExchangeContext(); + } + + bool HasExchangeContext() { return mExchangeCtx.Get() != nullptr; } + + GroupId GetGroupId() + { + VerifyOrDie(mExchangeCtx); + return mExchangeCtx->GetSessionHandle()->AsIncomingGroupSession()->GetGroupId(); + } + + /** + * @brief Initiates the sending of InvokeResponses previously queued using AddInvokeResponseToSend. + * + * Upon failure, the caller is responsible for closing the exchange appropriately, potentially + * by calling `SendStatusResponse`. + */ + CHIP_ERROR StartSendingCommandResponses(); + + void SendStatusResponse(Protocols::InteractionModel::Status aStatus) + { + StatusResponse::Send(aStatus, mExchangeCtx.Get(), /*aExpectResponse = */ false); + } + + bool AwaitingStatusResponse() { return mState == State::AwaitingStatusResponse; } + + void AddInvokeResponseToSend(System::PacketBufferHandle && aPacket) + { + VerifyOrDie(mState == State::ReadyForInvokeResponses); + mChunks.AddToEnd(std::move(aPacket)); + } + + /** + * @brief Registers a callback to be invoked when CommandResponseSender has finished sending responses. + */ + void RegisterOnResponseSenderDoneCallback(Callback::Callback * aResponseSenderDoneCallback) + { + VerifyOrDie(!mCloseCalled); + mResponseSenderDoneCallback = aResponseSenderDoneCallback; + } + +private: + enum class State : uint8_t + { + ReadyForInvokeResponses, ///< Accepting InvokeResponses to send back to requester. + AwaitingStatusResponse, ///< Awaiting status response from requester, after sending InvokeResponse. + AllInvokeResponsesSent, ///< All InvokeResponses have been sent out. + }; + + void MoveToState(const State aTargetState); + const char * GetStateStr() const; + + CHIP_ERROR SendCommandResponse(); + void Close(); + + // A list of InvokeResponseMessages to be sent out by CommandResponseSender. + System::PacketBufferHandle mChunks; + + chip::Callback::Callback * mResponseSenderDoneCallback = nullptr; + Messaging::ExchangeHolder mExchangeCtx; + State mState = State::ReadyForInvokeResponses; + + bool mCloseCalled = false; +}; + +} // namespace app +} // namespace chip diff --git a/src/app/CommandSender.cpp b/src/app/CommandSender.cpp index 7a07f84aadae65..6ab19b2ebd2276 100644 --- a/src/app/CommandSender.cpp +++ b/src/app/CommandSender.cpp @@ -186,7 +186,7 @@ CHIP_ERROR CommandSender::SendInvokeRequest() ReturnErrorOnFailure( mExchangeCtx->SendMessage(MsgType::InvokeCommandRequest, std::move(mPendingInvokeData), SendMessageFlags::kExpectResponse)); - MoveToState(State::CommandSent); + MoveToState(State::AwaitingResponse); return CHIP_NO_ERROR; } @@ -196,13 +196,14 @@ CHIP_ERROR CommandSender::OnMessageReceived(Messaging::ExchangeContext * apExcha { using namespace Protocols::InteractionModel; - if (mState == State::CommandSent) + if (mState == State::AwaitingResponse) { MoveToState(State::ResponseReceived); } - CHIP_ERROR err = CHIP_NO_ERROR; - bool sendStatusResponse = false; + CHIP_ERROR err = CHIP_NO_ERROR; + bool sendStatusResponse = false; + bool moreChunkedMessages = false; VerifyOrExit(apExchangeContext == mExchangeCtx.Get(), err = CHIP_ERROR_INCORRECT_STATE); sendStatusResponse = true; @@ -227,8 +228,14 @@ CHIP_ERROR CommandSender::OnMessageReceived(Messaging::ExchangeContext * apExcha if (aPayloadHeader.HasMessageType(MsgType::InvokeCommandResponse)) { - err = ProcessInvokeResponse(std::move(aPayload)); + err = ProcessInvokeResponse(std::move(aPayload), moreChunkedMessages); SuccessOrExit(err); + if (moreChunkedMessages) + { + StatusResponse::Send(Status::Success, apExchangeContext, /*aExpectResponse = */ true); + MoveToState(State::AwaitingResponse); + return CHIP_NO_ERROR; + } sendStatusResponse = false; } else if (aPayloadHeader.HasMessageType(MsgType::StatusResponse)) @@ -251,10 +258,10 @@ CHIP_ERROR CommandSender::OnMessageReceived(Messaging::ExchangeContext * apExcha if (sendStatusResponse) { - StatusResponse::Send(Status::InvalidAction, apExchangeContext, false /*aExpectResponse*/); + StatusResponse::Send(Status::InvalidAction, apExchangeContext, /*aExpectResponse = */ false); } - if (mState != State::CommandSent) + if (mState != State::AwaitingResponse) { Close(); } @@ -263,7 +270,7 @@ CHIP_ERROR CommandSender::OnMessageReceived(Messaging::ExchangeContext * apExcha return err; } -CHIP_ERROR CommandSender::ProcessInvokeResponse(System::PacketBufferHandle && payload) +CHIP_ERROR CommandSender::ProcessInvokeResponse(System::PacketBufferHandle && payload, bool & moreChunkedMessages) { CHIP_ERROR err = CHIP_NO_ERROR; System::PacketBufferTLVReader reader; @@ -291,6 +298,23 @@ CHIP_ERROR CommandSender::ProcessInvokeResponse(System::PacketBufferHandle && pa ReturnErrorOnFailure(ProcessInvokeResponseIB(invokeResponse)); } + err = invokeResponseMessage.GetMoreChunkedMessages(&moreChunkedMessages); + // If the MoreChunkedMessages element is absent, we receive CHIP_END_OF_TLV. In this + // case, per the specification, a default value of false is used. + if (CHIP_END_OF_TLV == err) + { + moreChunkedMessages = false; + err = CHIP_NO_ERROR; + } + ReturnErrorOnFailure(err); + + if (suppressResponse && moreChunkedMessages) + { + ChipLogError(DataManagement, "Spec violation! InvokeResponse has suppressResponse=true, and moreChunkedMessages=true"); + // TODO Is there a better error to return here? + return CHIP_ERROR_INVALID_TLV_ELEMENT; + } + // if we have exhausted this container if (CHIP_END_OF_TLV == err) { @@ -543,8 +567,8 @@ const char * CommandSender::GetStateStr() const case State::AwaitingTimedStatus: return "AwaitingTimedStatus"; - case State::CommandSent: - return "CommandSent"; + case State::AwaitingResponse: + return "AwaitingResponse"; case State::ResponseReceived: return "ResponseReceived"; diff --git a/src/app/CommandSender.h b/src/app/CommandSender.h index 9cf1b26dce6a9d..dfcd3e1a62a5f0 100644 --- a/src/app/CommandSender.h +++ b/src/app/CommandSender.h @@ -461,7 +461,7 @@ class CommandSender final : public Messaging::ExchangeDelegate AddingCommand, ///< In the process of adding a command. AddedCommand, ///< A command has been completely encoded and is awaiting transmission. AwaitingTimedStatus, ///< Sent a Timed Request and waiting for response. - CommandSent, ///< The command has been sent successfully. + AwaitingResponse, ///< The command has been sent successfully, and we are awaiting invoke response. ResponseReceived, ///< Received a response to our invoke and request and processing the response. AwaitingDestruction, ///< The object has completed its work and is awaiting destruction by the application. }; @@ -499,7 +499,7 @@ class CommandSender final : public Messaging::ExchangeDelegate */ void Abort(); - CHIP_ERROR ProcessInvokeResponse(System::PacketBufferHandle && payload); + CHIP_ERROR ProcessInvokeResponse(System::PacketBufferHandle && payload, bool & moreChunkedMessages); CHIP_ERROR ProcessInvokeResponseIB(InvokeResponseIB::Parser & aInvokeResponse); // Send our queued-up Invoke Request message. Assumes the exchange is ready diff --git a/src/app/tests/TestCommandInteraction.cpp b/src/app/tests/TestCommandInteraction.cpp index 6b63b02ed20030..cf0dd04b935a7b 100644 --- a/src/app/tests/TestCommandInteraction.cpp +++ b/src/app/tests/TestCommandInteraction.cpp @@ -270,7 +270,7 @@ class TestCommandInteraction static void TestCommandHandlerWithSendEmptyCommand(nlTestSuite * apSuite, void * apContext); static void TestCommandSenderWithProcessReceivedMsg(nlTestSuite * apSuite, void * apContext); static void TestCommandHandlerWithProcessReceivedNotExistCommand(nlTestSuite * apSuite, void * apContext); - static void TestCommandHandlerWithSendSimpleCommandData(nlTestSuite * apSuite, void * apContext); + static void TestCommandHandlerEncodeSimpleCommandData(nlTestSuite * apSuite, void * apContext); static void TestCommandHandlerCommandDataEncoding(nlTestSuite * apSuite, void * apContext); static void TestCommandHandlerCommandEncodeFailure(nlTestSuite * apSuite, void * apContext); static void TestCommandInvalidMessage1(nlTestSuite * apSuite, void * apContext); @@ -279,7 +279,7 @@ class TestCommandInteraction static void TestCommandInvalidMessage4(nlTestSuite * apSuite, void * apContext); static void TestCommandHandlerInvalidMessageSync(nlTestSuite * apSuite, void * apContext); static void TestCommandHandlerCommandEncodeExternalFailure(nlTestSuite * apSuite, void * apContext); - static void TestCommandHandlerWithSendSimpleStatusCode(nlTestSuite * apSuite, void * apContext); + static void TestCommandHandlerEncodeSimpleStatusCode(nlTestSuite * apSuite, void * apContext); static void TestCommandHandlerWithSendEmptyResponse(nlTestSuite * apSuite, void * apContext); static void TestCommandHandlerWithProcessReceivedEmptyDataMsg(nlTestSuite * apSuite, void * apContext); @@ -343,7 +343,7 @@ class TestCommandInteraction CommandId aCommandId = kTestCommandIdWithData); static void AddInvokeResponseData(nlTestSuite * apSuite, void * apContext, CommandHandler * apCommandHandler, bool aNeedStatusCode, CommandId aCommandId = kTestCommandIdWithData); - static void ValidateCommandHandlerWithSendCommand(nlTestSuite * apSuite, void * apContext, bool aNeedStatusCode); + static void ValidateCommandHandlerEncodeInvokeResponseMessage(nlTestSuite * apSuite, void * apContext, bool aNeedStatusCode); }; class TestExchangeDelegate : public Messaging::ExchangeDelegate @@ -569,9 +569,9 @@ void TestCommandInteraction::TestCommandHandlerWithWrongState(nlTestSuite * apSu TestExchangeDelegate delegate; auto exchange = ctx.NewExchangeToAlice(&delegate, false); - commandHandler.mExchangeCtx.Grab(exchange); + commandHandler.mResponseSender.SetExchangeContext(exchange); - err = commandHandler.SendCommandResponse(); + err = commandHandler.StartSendingCommandResponses(); NL_TEST_ASSERT(apSuite, err == CHIP_ERROR_INCORRECT_STATE); @@ -600,8 +600,10 @@ void TestCommandInteraction::TestCommandSenderWithSendCommand(nlTestSuite * apSu ctx.DrainAndServiceIO(); GenerateInvokeResponse(apSuite, apContext, buf, kTestCommandIdWithData); - err = commandSender.ProcessInvokeResponse(std::move(buf)); + bool moreChunkedMessages = false; + err = commandSender.ProcessInvokeResponse(std::move(buf), moreChunkedMessages); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + NL_TEST_ASSERT(apSuite, moreChunkedMessages == false); } void TestCommandInteraction::TestCommandHandlerWithSendEmptyCommand(nlTestSuite * apSuite, void * apContext) @@ -617,14 +619,14 @@ void TestCommandInteraction::TestCommandHandlerWithSendEmptyCommand(nlTestSuite TestExchangeDelegate delegate; auto exchange = ctx.NewExchangeToAlice(&delegate, false); - commandHandler.mExchangeCtx.Grab(exchange); + commandHandler.mResponseSender.SetExchangeContext(exchange); const CommandHandler::InvokeResponseParameters prepareParams(requestCommandPath); err = commandHandler.PrepareInvokeResponseCommand(responseCommandPath, prepareParams); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); err = commandHandler.FinishCommand(); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); - err = commandHandler.SendCommandResponse(); + err = commandHandler.StartSendingCommandResponses(); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); commandHandler.Close(); @@ -641,37 +643,29 @@ void TestCommandInteraction::TestCommandSenderWithProcessReceivedMsg(nlTestSuite System::PacketBufferHandle buf = System::PacketBufferHandle::New(System::PacketBuffer::kMaxSize); GenerateInvokeResponse(apSuite, apContext, buf, kTestCommandIdWithData); - err = commandSender.ProcessInvokeResponse(std::move(buf)); + bool moreChunkedMessages = false; + err = commandSender.ProcessInvokeResponse(std::move(buf), moreChunkedMessages); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + NL_TEST_ASSERT(apSuite, moreChunkedMessages == false); } -void TestCommandInteraction::ValidateCommandHandlerWithSendCommand(nlTestSuite * apSuite, void * apContext, bool aNeedStatusCode) +void TestCommandInteraction::ValidateCommandHandlerEncodeInvokeResponseMessage(nlTestSuite * apSuite, void * apContext, + bool aNeedStatusCode) { TestContext & ctx = *static_cast(apContext); CHIP_ERROR err = CHIP_NO_ERROR; - System::PacketBufferHandle commandPacket; chip::app::ConcreteCommandPath requestCommandPath(kTestEndpointId, kTestClusterId, kTestCommandIdWithData); CommandHandlerWithOutstandingCommand commandHandler(&mockCommandHandlerDelegate, requestCommandPath, /* aRef = */ NullOptional); TestExchangeDelegate delegate; auto exchange = ctx.NewExchangeToAlice(&delegate, false); - commandHandler.mExchangeCtx.Grab(exchange); + commandHandler.mResponseSender.SetExchangeContext(exchange); AddInvokeResponseData(apSuite, apContext, &commandHandler, aNeedStatusCode); - err = commandHandler.Finalize(commandPacket); + err = commandHandler.FinalizeLastInvokeResponseMessage(); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); -#if CHIP_CONFIG_IM_PRETTY_PRINT - chip::System::PacketBufferTLVReader reader; - InvokeResponseMessage::Parser invokeResponseMessageParser; - reader.Init(std::move(commandPacket)); - err = invokeResponseMessageParser.Init(reader); - NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); - invokeResponseMessageParser.PrettyPrint(); -#endif - - // // Ordinarily, the ExchangeContext will close itself on a responder exchange when unwinding back from an // OnMessageReceived callback and not having sent a subsequent message. Since that isn't the case in this artificial setup here // (where we created a responder exchange that's not responding to anything), we need to explicitly close it out. This is not @@ -680,10 +674,10 @@ void TestCommandInteraction::ValidateCommandHandlerWithSendCommand(nlTestSuite * exchange->Close(); } -void TestCommandInteraction::TestCommandHandlerWithSendSimpleCommandData(nlTestSuite * apSuite, void * apContext) +void TestCommandInteraction::TestCommandHandlerEncodeSimpleCommandData(nlTestSuite * apSuite, void * apContext) { // Send response which has simple command data and command path - ValidateCommandHandlerWithSendCommand(apSuite, apContext, false /*aNeedStatusCode=false*/); + ValidateCommandHandlerEncodeInvokeResponseMessage(apSuite, apContext, false /*aNeedStatusCode=false*/); } struct Fields @@ -717,72 +711,26 @@ struct BadFields void TestCommandInteraction::TestCommandHandlerCommandDataEncoding(nlTestSuite * apSuite, void * apContext) { - TestContext & ctx = *static_cast(apContext); CHIP_ERROR err = CHIP_NO_ERROR; auto path = MakeTestCommandPath(); auto requestCommandPath = ConcreteCommandPath(path.mEndpointId, path.mClusterId, path.mCommandId); CommandHandlerWithOutstandingCommand commandHandler(nullptr, requestCommandPath, /* aRef = */ NullOptional); - System::PacketBufferHandle commandPacket; - - TestExchangeDelegate delegate; - auto exchange = ctx.NewExchangeToAlice(&delegate, false); - commandHandler.mExchangeCtx.Grab(exchange); commandHandler.AddResponse(requestCommandPath, Fields()); - err = commandHandler.Finalize(commandPacket); - NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); - -#if CHIP_CONFIG_IM_PRETTY_PRINT - chip::System::PacketBufferTLVReader reader; - InvokeResponseMessage::Parser invokeResponseMessageParser; - reader.Init(std::move(commandPacket)); - err = invokeResponseMessageParser.Init(reader); + err = commandHandler.FinalizeLastInvokeResponseMessage(); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); - invokeResponseMessageParser.PrettyPrint(); -#endif - - // - // Ordinarily, the ExchangeContext will close itself on a responder exchange when unwinding back from an - // OnMessageReceived callback and not having sent a subsequent message. Since that isn't the case in this artificial setup here - // (where we created a responder exchange that's not responding to anything), we need to explicitly close it out. This is not - // expected in normal application logic. - // - exchange->Close(); } void TestCommandInteraction::TestCommandHandlerCommandEncodeFailure(nlTestSuite * apSuite, void * apContext) { - TestContext & ctx = *static_cast(apContext); CHIP_ERROR err = CHIP_NO_ERROR; auto path = MakeTestCommandPath(); auto requestCommandPath = ConcreteCommandPath(path.mEndpointId, path.mClusterId, path.mCommandId); CommandHandlerWithOutstandingCommand commandHandler(nullptr, requestCommandPath, NullOptional); - System::PacketBufferHandle commandPacket; - - TestExchangeDelegate delegate; - auto exchange = ctx.NewExchangeToAlice(&delegate, false); - commandHandler.mExchangeCtx.Grab(exchange); commandHandler.AddResponse(requestCommandPath, BadFields()); - err = commandHandler.Finalize(commandPacket); + err = commandHandler.FinalizeLastInvokeResponseMessage(); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); - -#if CHIP_CONFIG_IM_PRETTY_PRINT - chip::System::PacketBufferTLVReader reader; - InvokeResponseMessage::Parser invokeResponseMessageParser; - reader.Init(std::move(commandPacket)); - err = invokeResponseMessageParser.Init(reader); - NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); - invokeResponseMessageParser.PrettyPrint(); -#endif - - // - // Ordinarily, the ExchangeContext will close itself on a responder exchange when unwinding back from an - // OnMessageReceived callback and not having sent a subsequent message. Since that isn't the case in this artificial setup here - // (where we created a responder exchange that's not responding to anything), we need to explicitly close it out. This is not - // expected in normal application logic. - // - exchange->Close(); } /** @@ -1131,45 +1079,22 @@ void TestCommandInteraction::TestCommandHandlerInvalidMessageSync(nlTestSuite * void TestCommandInteraction::TestCommandHandlerCommandEncodeExternalFailure(nlTestSuite * apSuite, void * apContext) { - TestContext & ctx = *static_cast(apContext); CHIP_ERROR err = CHIP_NO_ERROR; auto path = MakeTestCommandPath(); auto requestCommandPath = ConcreteCommandPath(path.mEndpointId, path.mClusterId, path.mCommandId); CommandHandlerWithOutstandingCommand commandHandler(nullptr, requestCommandPath, NullOptional); - System::PacketBufferHandle commandPacket; - - TestExchangeDelegate delegate; - auto exchange = ctx.NewExchangeToAlice(&delegate, false); - commandHandler.mExchangeCtx.Grab(exchange); err = commandHandler.AddResponseData(requestCommandPath, BadFields()); NL_TEST_ASSERT(apSuite, err != CHIP_NO_ERROR); commandHandler.AddStatus(requestCommandPath, Protocols::InteractionModel::Status::Failure); - err = commandHandler.Finalize(commandPacket); + err = commandHandler.FinalizeLastInvokeResponseMessage(); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); - -#if CHIP_CONFIG_IM_PRETTY_PRINT - chip::System::PacketBufferTLVReader reader; - InvokeResponseMessage::Parser invokeResponseMessageParser; - reader.Init(std::move(commandPacket)); - err = invokeResponseMessageParser.Init(reader); - NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); - invokeResponseMessageParser.PrettyPrint(); -#endif - - // - // Ordinarily, the ExchangeContext will close itself on a responder exchange when unwinding back from an - // OnMessageReceived callback and not having sent a subsequent message. Since that isn't the case in this artificial setup here - // (where we created a responder exchange that's not responding to anything), we need to explicitly close it out. This is not - // expected in normal application logic. - // - exchange->Close(); } -void TestCommandInteraction::TestCommandHandlerWithSendSimpleStatusCode(nlTestSuite * apSuite, void * apContext) +void TestCommandInteraction::TestCommandHandlerEncodeSimpleStatusCode(nlTestSuite * apSuite, void * apContext) { // Send response which has simple status code and command path - ValidateCommandHandlerWithSendCommand(apSuite, apContext, true /*aNeedStatusCode=true*/); + ValidateCommandHandlerEncodeInvokeResponseMessage(apSuite, apContext, true /*aNeedStatusCode=true*/); } void TestCommandInteraction::TestCommandHandlerWithProcessReceivedNotExistCommand(nlTestSuite * apSuite, void * apContext) @@ -1178,7 +1103,7 @@ void TestCommandInteraction::TestCommandHandlerWithProcessReceivedNotExistComman app::CommandHandler commandHandler(&mockCommandHandlerDelegate); System::PacketBufferHandle commandDatabuf = System::PacketBufferHandle::New(System::PacketBuffer::kMaxSize); TestExchangeDelegate delegate; - commandHandler.mExchangeCtx.Grab(ctx.NewExchangeToAlice(&delegate)); + commandHandler.mResponseSender.SetExchangeContext(ctx.NewExchangeToAlice(&delegate)); // Use some invalid endpoint / cluster / command. GenerateInvokeRequest(apSuite, apContext, commandDatabuf, /* aIsTimedRequest = */ false, 0xEF /* command */, 0xADBE /* cluster */, 0xDE /* endpoint */); @@ -1203,7 +1128,7 @@ void TestCommandInteraction::TestCommandHandlerWithProcessReceivedEmptyDataMsg(n TestExchangeDelegate delegate; auto exchange = ctx.NewExchangeToAlice(&delegate, false); - commandHandler.mExchangeCtx.Grab(exchange); + commandHandler.mResponseSender.SetExchangeContext(exchange); chip::isCommandDispatched = false; GenerateInvokeRequest(apSuite, apContext, commandDatabuf, messageIsTimed, kTestCommandIdNoData); @@ -1593,7 +1518,7 @@ void TestCommandInteraction::TestCommandHandlerRejectsMultipleCommandsWithIdenti CommandHandler commandHandler(&mockCommandHandlerDelegate); TestExchangeDelegate delegate; auto exchange = ctx.NewExchangeToAlice(&delegate, false); - commandHandler.mExchangeCtx.Grab(exchange); + commandHandler.mResponseSender.SetExchangeContext(exchange); // Hackery to steal the InvokeRequest buffer from commandSender. System::PacketBufferHandle commandDatabuf; @@ -1667,7 +1592,7 @@ void TestCommandInteraction::TestCommandHandlerRejectMultipleCommandsWhenHandler CommandHandler commandHandler(kThisIsForTestOnly, &mockCommandHandlerDelegate, &mBasicCommandPathRegistry); TestExchangeDelegate delegate; auto exchange = ctx.NewExchangeToAlice(&delegate, false); - commandHandler.mExchangeCtx.Grab(exchange); + commandHandler.mResponseSender.SetExchangeContext(exchange); // Hackery to steal the InvokeRequest buffer from commandSender. System::PacketBufferHandle commandDatabuf; @@ -1741,7 +1666,7 @@ void TestCommandInteraction::TestCommandHandlerAcceptMultipleCommands(nlTestSuit CommandHandler commandHandler(kThisIsForTestOnly, &mockCommandHandlerDelegate, &mBasicCommandPathRegistry); TestExchangeDelegate delegate; auto exchange = ctx.NewExchangeToAlice(&delegate, false); - commandHandler.mExchangeCtx.Grab(exchange); + commandHandler.mResponseSender.SetExchangeContext(exchange); // Hackery to steal the InvokeRequest buffer from commandSender. System::PacketBufferHandle commandDatabuf; @@ -1792,8 +1717,8 @@ void TestCommandInteraction::TestCommandHandlerReleaseWithExchangeClosed(nlTestS // Mimic closure of the exchange that would happen on a session release and verify that releasing the handle there-after // is handled gracefully. - asyncCommandHandle.Get()->mExchangeCtx->GetSessionHolder().Release(); - asyncCommandHandle.Get()->mExchangeCtx->OnSessionReleased(); + asyncCommandHandle.Get()->mResponseSender.GetExchangeContext()->GetSessionHolder().Release(); + asyncCommandHandle.Get()->mResponseSender.GetExchangeContext()->OnSessionReleased(); asyncCommandHandle = nullptr; } @@ -1815,11 +1740,11 @@ const nlTest sTests[] = NL_TEST_DEF("TestCommandSenderWithSendCommand", chip::app::TestCommandInteraction::TestCommandSenderWithSendCommand), NL_TEST_DEF("TestCommandHandlerWithSendEmptyCommand", chip::app::TestCommandInteraction::TestCommandHandlerWithSendEmptyCommand), NL_TEST_DEF("TestCommandSenderWithProcessReceivedMsg", chip::app::TestCommandInteraction::TestCommandSenderWithProcessReceivedMsg), - NL_TEST_DEF("TestCommandHandlerWithSendSimpleCommandData", chip::app::TestCommandInteraction::TestCommandHandlerWithSendSimpleCommandData), + NL_TEST_DEF("TestCommandHandlerEncodeSimpleCommandData", chip::app::TestCommandInteraction::TestCommandHandlerEncodeSimpleCommandData), NL_TEST_DEF("TestCommandHandlerCommandDataEncoding", chip::app::TestCommandInteraction::TestCommandHandlerCommandDataEncoding), NL_TEST_DEF("TestCommandHandlerCommandEncodeFailure", chip::app::TestCommandInteraction::TestCommandHandlerCommandEncodeFailure), NL_TEST_DEF("TestCommandHandlerCommandEncodeExternalFailure", chip::app::TestCommandInteraction::TestCommandHandlerCommandEncodeExternalFailure), - NL_TEST_DEF("TestCommandHandlerWithSendSimpleStatusCode", chip::app::TestCommandInteraction::TestCommandHandlerWithSendSimpleStatusCode), + NL_TEST_DEF("TestCommandHandlerEncodeSimpleStatusCode", chip::app::TestCommandInteraction::TestCommandHandlerEncodeSimpleStatusCode), NL_TEST_DEF("TestCommandHandlerWithProcessReceivedNotExistCommand", chip::app::TestCommandInteraction::TestCommandHandlerWithProcessReceivedNotExistCommand), NL_TEST_DEF("TestCommandHandlerWithProcessReceivedEmptyDataMsg", chip::app::TestCommandInteraction::TestCommandHandlerWithProcessReceivedEmptyDataMsg), NL_TEST_DEF("TestCommandHandlerRejectMultipleIdenticalCommands", chip::app::TestCommandInteraction::TestCommandHandlerRejectMultipleIdenticalCommands), From 603f1f654c2a25f64f1b04e0c69940ecf5e6b7bb Mon Sep 17 00:00:00 2001 From: Terence Hampson Date: Thu, 18 Jan 2024 09:41:00 -0500 Subject: [PATCH 02/25] Update skipped test step in IDM_1_4 (#31458) * Update skipped test step in IDM_1_4 * Restyled by autopep8 * Address PR comment * Updated based on testspec change --------- Co-authored-by: Restyled.io --- src/python_testing/TC_IDM_1_4.py | 77 ++++++++++++++++++++++++++++---- 1 file changed, 69 insertions(+), 8 deletions(-) diff --git a/src/python_testing/TC_IDM_1_4.py b/src/python_testing/TC_IDM_1_4.py index 353349502adffc..a0bcf0c3ade5ca 100644 --- a/src/python_testing/TC_IDM_1_4.py +++ b/src/python_testing/TC_IDM_1_4.py @@ -79,7 +79,7 @@ async def test_TC_IDM_1_4(self): asserts.assert_greater_equal(len(list_of_commands_to_send), 2, "Step 2 is always expected to try sending at least 2 command, something wrong with test logic") try: - await dev_ctrl.SendBatchCommands(dut_node_id, list_of_commands_to_send) + await dev_ctrl.TestOnlySendBatchCommands(dut_node_id, list_of_commands_to_send, remoteMaxPathsPerInvoke=number_of_commands_to_send) # If you get the assert below it is likely because cap_for_batch_commands is actually too low. # This might happen after TCP is enabled and DUT supports TCP. asserts.fail( @@ -115,7 +115,7 @@ async def steps_3_to_9(self, dummy_value): dev_ctrl = self.default_controller dut_node_id = self.dut_node_id - self.print_step(3, "Sending sending two InvokeRequest with idential paths") + self.print_step(3, "Sending sending two InvokeRequests with idential paths") command = Clusters.BasicInformation.Commands.MfgSpecificPing() endpoint = 0 invoke_request_1 = Clusters.Command.InvokeRequestInfo(endpoint, command) @@ -127,7 +127,22 @@ async def steps_3_to_9(self, dummy_value): "DUT sent back an unexpected error, we were expecting InvalidAction") logging.info("DUT successfully failed to process two InvokeRequests that contains non-unique paths") - self.print_step(4, "Skipping test until https://github.com/project-chip/connectedhomeip/issues/30986 resolved") + self.print_step(4, "Sending two InvokeRequests with unique paths, but identical CommandRefs") + endpoint = 0 + command = Clusters.OperationalCredentials.Commands.CertificateChainRequest( + Clusters.OperationalCredentials.Enums.CertificateChainTypeEnum.kDACCertificate) + invoke_request_1 = Clusters.Command.InvokeRequestInfo(endpoint, command) + + command = Clusters.GroupKeyManagement.Commands.KeySetRead(0) + invoke_request_2 = Clusters.Command.InvokeRequestInfo(endpoint, command) + commandRefsOverride = [1, 1] + try: + result = await dev_ctrl.TestOnlySendBatchCommands(dut_node_id, [invoke_request_1, invoke_request_2], commandRefsOverride=commandRefsOverride) + asserts.fail("Unexpected success return after sending two unique commands with identical CommandRef in the InvokeRequest") + except InteractionModelError as e: + asserts.assert_equal(e.status, Status.InvalidAction, + "DUT sent back an unexpected error, we were expecting InvalidAction") + logging.info("DUT successfully failed to process two InvokeRequests that contains non-unique CommandRef") self.print_step(5, "Verify DUT is able to responsed to InvokeRequestMessage that contains two valid paths") endpoint = 0 @@ -145,13 +160,59 @@ async def steps_3_to_9(self, dummy_value): result[0], Clusters.OperationalCredentials.Commands.CertificateChainResponse), "Unexpected return type for first InvokeRequest") asserts.assert_true(type_matches( result[1], Clusters.GroupKeyManagement.Commands.KeySetReadResponse), "Unexpected return type for second InvokeRequest") - self.print_step(5, "DUT successfully responded to a InvokeRequest action with two valid commands") + logging.info("DUT successfully responded to a InvokeRequest action with two valid commands") except InteractionModelError: asserts.fail("DUT failed to successfully responded to a InvokeRequest action with two valid commands") - self.print_step(6, "Skipping test until https://github.com/project-chip/connectedhomeip/issues/30991 resolved") + self.print_step( + 6, "Verify DUT is able to responsed to InvokeRequestMessage that contains one paths InvokeRequest, and one InvokeRequest to unsupported endpoint") + # First finding non-existent endpoint + wildcard_descriptor = await dev_ctrl.ReadAttribute(dut_node_id, [(Clusters.Descriptor)]) + endpoints = list(wildcard_descriptor.keys()) + endpoints.sort() + non_existent_endpoint = next(i for i, e in enumerate(endpoints + [None]) if i != e) - self.print_step(7, "Skipping test until https://github.com/project-chip/connectedhomeip/issues/30986 resolved") + endpoint = 0 + command = Clusters.OperationalCredentials.Commands.CertificateChainRequest( + Clusters.OperationalCredentials.Enums.CertificateChainTypeEnum.kDACCertificate) + invoke_request_1 = Clusters.Command.InvokeRequestInfo(endpoint, command) + + endpoint = non_existent_endpoint + command = Clusters.GroupKeyManagement.Commands.KeySetRead(0) + invoke_request_2 = Clusters.Command.InvokeRequestInfo(endpoint, command) + try: + result = await dev_ctrl.SendBatchCommands(dut_node_id, [invoke_request_1, invoke_request_2]) + asserts.assert_true(type_matches(result, list), "Unexpected return from SendBatchCommands") + asserts.assert_equal(len(result), 2, "Unexpected number of InvokeResponses sent back from DUT") + asserts.assert_true(type_matches( + result[0], Clusters.OperationalCredentials.Commands.CertificateChainResponse), "Unexpected return type for first InvokeRequest") + asserts.assert_true(type_matches( + result[1], InteractionModelError), "Unexpected return type for second InvokeRequest") + asserts.assert_equal(result[1].status, Status.UnsupportedEndpoint, + "Unexpected Interaction model error, was expecting UnsupportedEndpoint") + logging.info( + "DUT successfully responded to first valid InvokeRequest, and successfully errored with UnsupportedEndpoint for the second") + except InteractionModelError: + asserts.fail("DUT failed to successfully responded to a InvokeRequest action with two valid commands") + + self.print_step(7, "Verify DUT is able to responsed to InvokeRequestMessage that contains two valid paths. One of which requires timed invoke, and TimedRequest in InvokeResponseMessage set to true, but never sent preceding Timed Invoke Action") + endpoint = 0 + command = Clusters.GroupKeyManagement.Commands.KeySetRead(0) + invoke_request_1 = Clusters.Command.InvokeRequestInfo(endpoint, command) + + command = Clusters.AdministratorCommissioning.Commands.RevokeCommissioning() + invoke_request_2 = Clusters.Command.InvokeRequestInfo(endpoint, command) + # It is safe to use RevokeCommissioning in this test without opening the commissioning window because + # we expect a non-path-specific error. As per the specification, non-path-specific errors of this + # nature is generated before command dispatch to cluster. In the next test step, we anticipate + # receiving a path-specific response to the same command, with the TimedRequestMessage sent before + # the InvokeRequestMessage. + try: + result = await dev_ctrl.TestOnlySendBatchCommands(dut_node_id, [invoke_request_1, invoke_request_2], suppressTimedRequestMessage=True) + asserts.fail("Unexpected success call to sending Batch command when non-path specific error expected") + except InteractionModelError as e: + asserts.assert_equal(e.status, Status.TimedRequestMismatch, + "Unexpected error response from Invoke with TimedRequest flag and no TimedInvoke") self.print_step(8, "Verify DUT is able to responsed to InvokeRequestMessage that contains two valid paths. One of which requires timed invoke, and TimedRequest in InvokeResponseMessage set to true") endpoint = 0 @@ -177,9 +238,9 @@ async def steps_3_to_9(self, dummy_value): self.print_step( 8, "DUT successfully responded to a InvokeRequest action with two valid commands. One of which required timed invoke, and TimedRequest in InvokeResponseMessage was set to true") except InteractionModelError: - asserts.fail("DUT failed to successfully responded to a InvokeRequest action with two valid commands") + asserts.fail("DUT failed with non-path specific error when path specific error was expected") - self.print_step(9, "Skipping test until https://github.com/project-chip/connectedhomeip/issues/30986 resolved") + self.print_step(9, "Skipping test until https://github.com/project-chip/connectedhomeip/issues/31434 resolved") if __name__ == "__main__": From 942db8e92f53ce621f278861f8c359ae84bff1b4 Mon Sep 17 00:00:00 2001 From: William Date: Thu, 18 Jan 2024 15:12:41 +0000 Subject: [PATCH 03/25] Adds the RVC Operational State cluster's GoHome command (#31242) * Added the RvcOpearationalState specific command GoHome to the XML. * Regenerated files from XMLs. * Regenerated files from XMLs after merging changes in master. * Regenerated zap files. * Added missing license to an all-clusters-app src file. * Restyled by clang-format --------- Co-authored-by: Restyled.io --- .../all-clusters-app.matter | 2 + .../src/air-quality-instance.cpp | 17 +++++ ...ode_roboticvacuumcleaner_1807ff0c49.matter | 2 + examples/rvc-app/rvc-common/rvc-app.matter | 2 + .../chip/operational-state-rvc-cluster.xml | 4 + .../data_model/controller-clusters.matter | 2 + .../chip/devicecontroller/ChipClusters.java | 26 +++++++ .../devicecontroller/ClusterIDMapping.java | 3 +- .../devicecontroller/ClusterInfoMapping.java | 12 +++ .../clusters/RvcOperationalStateCluster.kt | 42 +++++++++++ .../python/chip/clusters/CHIPClusters.py | 6 ++ .../python/chip/clusters/Objects.py | 13 ++++ .../CHIP/zap-generated/MTRBaseClusters.h | 8 ++ .../CHIP/zap-generated/MTRBaseClusters.mm | 28 +++++++ .../CHIP/zap-generated/MTRClusterConstants.h | 1 + .../CHIP/zap-generated/MTRClusters.h | 3 + .../CHIP/zap-generated/MTRClusters.mm | 31 ++++++++ .../zap-generated/MTRCommandPayloadsObjc.h | 28 +++++++ .../zap-generated/MTRCommandPayloadsObjc.mm | 73 +++++++++++++++++++ .../MTRCommandPayloads_Internal.h | 6 ++ .../zap-generated/cluster-objects.cpp | 20 +++++ .../zap-generated/cluster-objects.h | 33 +++++++++ .../app-common/zap-generated/ids/Commands.h | 4 + .../zap-generated/cluster/Commands.h | 38 ++++++++++ .../zap-generated/cluster/Commands.h | 57 +++++++++++++++ 25 files changed, 460 insertions(+), 1 deletion(-) diff --git a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter index ad7cb56245f2bd..6a817823dd4667 100644 --- a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter +++ b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter @@ -3420,6 +3420,8 @@ cluster RvcOperationalState = 97 { command Start(): OperationalCommandResponse = 2; /** Upon receipt, the device SHALL resume its operation from the point it was at when it received the Pause command, or from the point when it was paused by means outside of this cluster (for example by manual button press). */ command Resume(): OperationalCommandResponse = 3; + /** On receipt of this command, the device SHALL start seeking the charging dock, if possible in the current state of the device. */ + command GoHome(): OperationalCommandResponse = 128; } /** Attributes and commands for scene configuration and manipulation. */ diff --git a/examples/all-clusters-app/all-clusters-common/src/air-quality-instance.cpp b/examples/all-clusters-app/all-clusters-common/src/air-quality-instance.cpp index c78f34e9a8f31f..9297cd79960b89 100644 --- a/examples/all-clusters-app/all-clusters-common/src/air-quality-instance.cpp +++ b/examples/all-clusters-app/all-clusters-common/src/air-quality-instance.cpp @@ -1,3 +1,20 @@ +/* + * + * Copyright (c) 2023 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. + */ + #include using namespace chip::app::Clusters; diff --git a/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.matter b/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.matter index cea46e31fad3fc..fa836fe8b0c5e2 100644 --- a/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.matter +++ b/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.matter @@ -1178,6 +1178,8 @@ cluster RvcOperationalState = 97 { command Start(): OperationalCommandResponse = 2; /** Upon receipt, the device SHALL resume its operation from the point it was at when it received the Pause command, or from the point when it was paused by means outside of this cluster (for example by manual button press). */ command Resume(): OperationalCommandResponse = 3; + /** On receipt of this command, the device SHALL start seeking the charging dock, if possible in the current state of the device. */ + command GoHome(): OperationalCommandResponse = 128; } endpoint 0 { diff --git a/examples/rvc-app/rvc-common/rvc-app.matter b/examples/rvc-app/rvc-common/rvc-app.matter index 6db104d8eac315..b14fcf6720fa75 100644 --- a/examples/rvc-app/rvc-common/rvc-app.matter +++ b/examples/rvc-app/rvc-common/rvc-app.matter @@ -1101,6 +1101,8 @@ cluster RvcOperationalState = 97 { command Start(): OperationalCommandResponse = 2; /** Upon receipt, the device SHALL resume its operation from the point it was at when it received the Pause command, or from the point when it was paused by means outside of this cluster (for example by manual button press). */ command Resume(): OperationalCommandResponse = 3; + /** On receipt of this command, the device SHALL start seeking the charging dock, if possible in the current state of the device. */ + command GoHome(): OperationalCommandResponse = 128; } endpoint 0 { diff --git a/src/app/zap-templates/zcl/data-model/chip/operational-state-rvc-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/operational-state-rvc-cluster.xml index 8f19a21cf1bc59..41a0c64e4af169 100644 --- a/src/app/zap-templates/zcl/data-model/chip/operational-state-rvc-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/operational-state-rvc-cluster.xml @@ -81,6 +81,10 @@ both values from this cluster and from the base cluster. + + On receipt of this command, the device SHALL start seeking the charging dock, if possible in the current state of the device. + + OperationalError diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter index 5f550b620b8006..bc8127ac45ba28 100644 --- a/src/controller/data_model/controller-clusters.matter +++ b/src/controller/data_model/controller-clusters.matter @@ -3721,6 +3721,8 @@ cluster RvcOperationalState = 97 { command Start(): OperationalCommandResponse = 2; /** Upon receipt, the device SHALL resume its operation from the point it was at when it received the Pause command, or from the point when it was paused by means outside of this cluster (for example by manual button press). */ command Resume(): OperationalCommandResponse = 3; + /** On receipt of this command, the device SHALL start seeking the charging dock, if possible in the current state of the device. */ + command GoHome(): OperationalCommandResponse = 128; } /** Attributes and commands for scene configuration and manipulation. */ diff --git a/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java b/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java index 8eb7fcdcee4b3a..8cd5cc11e54cc8 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java @@ -25491,6 +25491,32 @@ public void onResponse(StructType invokeStructValue) { }}, commandId, value, timedInvokeTimeoutMs); } + public void goHome(OperationalCommandResponseCallback callback) { + goHome(callback, 0); + } + + public void goHome(OperationalCommandResponseCallback callback, int timedInvokeTimeoutMs) { + final long commandId = 128L; + + ArrayList elements = new ArrayList<>(); + StructType value = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + final long commandResponseStateFieldID = 0L; + ChipStructs.RvcOperationalStateClusterErrorStateStruct commandResponseState = null; + for (StructElement element: invokeStructValue.value()) { + if (element.contextTagNum() == commandResponseStateFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.Struct) { + StructType castingValue = element.value(StructType.class); + commandResponseState = ChipStructs.RvcOperationalStateClusterErrorStateStruct.decodeTlv(castingValue); + } + } + } + callback.onSuccess(commandResponseState); + }}, commandId, value, timedInvokeTimeoutMs); + } + public interface OperationalCommandResponseCallback extends BaseClusterCallback { void onSuccess(ChipStructs.RvcOperationalStateClusterErrorStateStruct commandResponseState); } diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java index a1be6ce8ae6bd1..2c7843a639d268 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java @@ -8227,7 +8227,8 @@ public enum Command { Pause(0L), Stop(1L), Start(2L), - Resume(3L),; + Resume(3L), + GoHome(128L),; private final long id; Command(long id) { this.id = id; diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java index 10007746d7dd7b..8bd7d3a7a265f9 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java @@ -22843,6 +22843,18 @@ public Map> getCommandMap() { ); rvcOperationalStateClusterInteractionInfoMap.put("resume", rvcOperationalStateresumeInteractionInfo); + Map rvcOperationalStategoHomeCommandParams = new LinkedHashMap(); + InteractionInfo rvcOperationalStategoHomeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.RvcOperationalStateCluster) cluster) + .goHome((ChipClusters.RvcOperationalStateCluster.OperationalCommandResponseCallback) callback + ); + }, + () -> new DelegatedRvcOperationalStateClusterOperationalCommandResponseCallback(), + rvcOperationalStategoHomeCommandParams + ); + rvcOperationalStateClusterInteractionInfoMap.put("goHome", rvcOperationalStategoHomeInteractionInfo); + commandMap.put("rvcOperationalState", rvcOperationalStateClusterInteractionInfoMap); Map scenesManagementClusterInteractionInfoMap = new LinkedHashMap<>(); diff --git a/src/controller/java/generated/java/matter/controller/cluster/clusters/RvcOperationalStateCluster.kt b/src/controller/java/generated/java/matter/controller/cluster/clusters/RvcOperationalStateCluster.kt index 0513f78d1b0e38..d2a53548665600 100644 --- a/src/controller/java/generated/java/matter/controller/cluster/clusters/RvcOperationalStateCluster.kt +++ b/src/controller/java/generated/java/matter/controller/cluster/clusters/RvcOperationalStateCluster.kt @@ -310,6 +310,48 @@ class RvcOperationalStateCluster( return OperationalCommandResponse(commandResponseState_decoded) } + suspend fun goHome(timedInvokeTimeout: Duration? = null): OperationalCommandResponse { + val commandId: UInt = 128u + + val tlvWriter = TlvWriter() + tlvWriter.startStructure(AnonymousTag) + tlvWriter.endStructure() + + val request: InvokeRequest = + InvokeRequest( + CommandPath(endpointId, clusterId = CLUSTER_ID, commandId), + tlvPayload = tlvWriter.getEncoded(), + timedRequest = timedInvokeTimeout + ) + + val response: InvokeResponse = controller.invoke(request) + logger.log(Level.FINE, "Invoke command succeeded: ${response}") + + val tlvReader = TlvReader(response.payload) + tlvReader.enterStructure(AnonymousTag) + val TAG_COMMAND_RESPONSE_STATE: Int = 0 + var commandResponseState_decoded: RvcOperationalStateClusterErrorStateStruct? = null + + while (!tlvReader.isEndOfContainer()) { + val tag = tlvReader.peekElement().tag + + if (tag == ContextSpecificTag(TAG_COMMAND_RESPONSE_STATE)) { + commandResponseState_decoded = + RvcOperationalStateClusterErrorStateStruct.fromTlv(tag, tlvReader) + } else { + tlvReader.skipElement() + } + } + + if (commandResponseState_decoded == null) { + throw IllegalStateException("commandResponseState not found in TLV") + } + + tlvReader.exitContainer() + + return OperationalCommandResponse(commandResponseState_decoded) + } + suspend fun readPhaseListAttribute(): PhaseListAttribute { val ATTRIBUTE_ID: UInt = 0u diff --git a/src/controller/python/chip/clusters/CHIPClusters.py b/src/controller/python/chip/clusters/CHIPClusters.py index 2c5cfc50944076..afe5190e8f96b9 100644 --- a/src/controller/python/chip/clusters/CHIPClusters.py +++ b/src/controller/python/chip/clusters/CHIPClusters.py @@ -5737,6 +5737,12 @@ class ChipClusters: "args": { }, }, + 0x00000080: { + "commandId": 0x00000080, + "commandName": "GoHome", + "args": { + }, + }, }, "attributes": { 0x00000000: { diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py index 6cfb1520eb2936..4a1c6a0c8400ec 100644 --- a/src/controller/python/chip/clusters/Objects.py +++ b/src/controller/python/chip/clusters/Objects.py @@ -20068,6 +20068,19 @@ def descriptor(cls) -> ClusterObjectDescriptor: commandResponseState: 'RvcOperationalState.Structs.ErrorStateStruct' = field(default_factory=lambda: RvcOperationalState.Structs.ErrorStateStruct()) + @dataclass + class GoHome(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000061 + command_id: typing.ClassVar[int] = 0x00000080 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'OperationalCommandResponse' + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ]) + class Attributes: @dataclass class PhaseList(ClusterAttributeDescriptor): diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h index 1c3298fb15b308..a3c5fc32992c07 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h @@ -6544,6 +6544,14 @@ MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) - (void)resumeWithParams:(MTRRVCOperationalStateClusterResumeParams * _Nullable)params completion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); - (void)resumeWithCompletion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); +/** + * Command GoHome + * + * On receipt of this command, the device SHALL start seeking the charging dock, if possible in the current state of the device. + */ +- (void)goHomeWithParams:(MTRRVCOperationalStateClusterGoHomeParams * _Nullable)params completion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)goHomeWithCompletion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; - (void)readAttributePhaseListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); - (void)subscribeAttributePhaseListWithParams:(MTRSubscribeParams *)params diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm index 1bda7cb36cd7bf..2f8a21416af04d 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm @@ -46620,6 +46620,34 @@ - (void)resumeWithParams:(MTRRVCOperationalStateClusterResumeParams * _Nullable) queue:self.callbackQueue completion:responseHandler]; } +- (void)goHomeWithCompletion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + [self goHomeWithParams:nil completion:completion]; +} +- (void)goHomeWithParams:(MTRRVCOperationalStateClusterGoHomeParams * _Nullable)params completion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + if (params == nil) { + params = [[MTRRVCOperationalStateClusterGoHomeParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = RvcOperationalState::Commands::GoHome::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRRVCOperationalStateClusterOperationalCommandResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; +} - (void)readAttributePhaseListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h b/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h index 77e169df653784..4f9fdb33c6cd0a 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h @@ -6170,6 +6170,7 @@ typedef NS_ENUM(uint32_t, MTRCommandIDType) { MTRCommandIDTypeClusterRVCOperationalStateCommandStartID MTR_PROVISIONALLY_AVAILABLE = 0x00000002, MTRCommandIDTypeClusterRVCOperationalStateCommandResumeID MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x00000003, MTRCommandIDTypeClusterRVCOperationalStateCommandOperationalCommandResponseID MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x00000004, + MTRCommandIDTypeClusterRVCOperationalStateCommandGoHomeID MTR_PROVISIONALLY_AVAILABLE = 0x00000080, // Cluster ScenesManagement commands MTRCommandIDTypeClusterScenesManagementCommandAddSceneID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h index 6fcea80c35673e..c1d6782c518c59 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h @@ -3113,6 +3113,9 @@ MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) - (void)resumeWithParams:(MTRRVCOperationalStateClusterResumeParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); - (void)resumeWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); +- (void)goHomeWithParams:(MTRRVCOperationalStateClusterGoHomeParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)goHomeWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; - (NSDictionary * _Nullable)readAttributePhaseListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm index 7f79d6452d3415..bff98afd6ab590 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm @@ -8281,6 +8281,37 @@ - (void)resumeWithParams:(MTRRVCOperationalStateClusterResumeParams * _Nullable) completion:responseHandler]; } +- (void)goHomeWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + [self goHomeWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; +} +- (void)goHomeWithParams:(MTRRVCOperationalStateClusterGoHomeParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + if (params == nil) { + params = [[MTRRVCOperationalStateClusterGoHomeParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = RvcOperationalState::Commands::GoHome::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + expectedValues:expectedValues + expectedValueInterval:expectedValueIntervalMs + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRRVCOperationalStateClusterOperationalCommandResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; +} + - (NSDictionary * _Nullable)readAttributePhaseListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterRVCOperationalStateAttributePhaseListID) params:params]; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h index d5b65a7fbc4feb..f617ffcd65e400 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h @@ -4724,6 +4724,34 @@ MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) error:(NSError * __autoreleasing *)error MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); @end +MTR_PROVISIONALLY_AVAILABLE +@interface MTRRVCOperationalStateClusterGoHomeParams : NSObject +/** + * Controls whether the command is a timed command (using Timed Invoke). + * + * If nil (the default value), a regular invoke is done for commands that do + * not require a timed invoke and a timed invoke with some default timed request + * timeout is done for commands that require a timed invoke. + * + * If not nil, a timed invoke is done, with the provided value used as the timed + * request timeout. The value should be chosen small enough to provide the + * desired security properties but large enough that it will allow a round-trip + * from the sever to the client (for the status response and actual invoke + * request) within the timeout window. + * + */ +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; + +/** + * Controls how much time, in seconds, we will allow for the server to process the command. + * + * The command will then time out if that much time, plus an allowance for retransmits due to network failures, passes. + * + * If nil, the framework will try to select an appropriate timeout value itself. + */ +@property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; +@end + MTR_PROVISIONALLY_AVAILABLE @interface MTRScenesManagementClusterAddSceneParams : NSObject diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm index b5472ad77833a3..2a4863997b5143 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm @@ -12871,6 +12871,79 @@ - (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::RvcOpera @end +@implementation MTRRVCOperationalStateClusterGoHomeParams +- (instancetype)init +{ + if (self = [super init]) { + _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTRRVCOperationalStateClusterGoHomeParams alloc] init]; + + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; + return descriptionString; +} + +@end + +@implementation MTRRVCOperationalStateClusterGoHomeParams (InternalMethods) + +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +{ + chip::app::Clusters::RvcOperationalState::Commands::GoHome::Type encodableStruct; + ListFreer listFreer; + + auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); + if (buffer.IsNull()) { + return CHIP_ERROR_NO_MEMORY; + } + + chip::System::PacketBufferTLVWriter writer; + // Commands never need chained buffers, since they cannot be chunked. + writer.Init(std::move(buffer), /* useChainedBuffers = */ false); + + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::AnonymousTag(), encodableStruct)); + + ReturnErrorOnFailure(writer.Finalize(&buffer)); + + reader.Init(std::move(buffer)); + return reader.Next(chip::TLV::kTLVType_Structure, chip::TLV::AnonymousTag()); +} + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error +{ + chip::System::PacketBufferTLVReader reader; + CHIP_ERROR err = [self _encodeToTLVReader:reader]; + if (err != CHIP_NO_ERROR) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:err]; + } + return nil; + } + + auto decodedObj = MTRDecodeDataValueDictionaryFromCHIPTLV(&reader); + if (decodedObj == nil) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]; + } + } + return decodedObj; +} +@end + @implementation MTRScenesManagementClusterAddSceneParams - (instancetype)init { diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloads_Internal.h b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloads_Internal.h index 42d8a17450841a..7b33d80c72c54b 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloads_Internal.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloads_Internal.h @@ -868,6 +868,12 @@ NS_ASSUME_NONNULL_BEGIN @end +@interface MTRRVCOperationalStateClusterGoHomeParams (InternalMethods) + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; + +@end + @interface MTRScenesManagementClusterAddSceneParams (InternalMethods) - (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp index e4988fdd696cd1..3e7412349926bb 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp @@ -12284,6 +12284,26 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } } // namespace OperationalCommandResponse. +namespace GoHome { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + return encoder.Finalize(); +} + +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +{ + detail::StructDecodeIterator __iterator(reader); + while (true) + { + auto __element = __iterator.Next(); + if (std::holds_alternative(__element)) + { + return std::get(__element); + } + } +} +} // namespace GoHome. } // namespace Commands namespace Attributes { diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h index e41a226edfbdaa..69683f07a7006e 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h @@ -17737,6 +17737,11 @@ struct Type; struct DecodableType; } // namespace OperationalCommandResponse +namespace GoHome { +struct Type; +struct DecodableType; +} // namespace GoHome + } // namespace Commands namespace Commands { @@ -17884,6 +17889,34 @@ struct DecodableType CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace OperationalCommandResponse +namespace GoHome { +enum class Fields : uint8_t +{ +}; + +struct Type +{ +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::GoHome::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::RvcOperationalState::Id; } + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = Clusters::RvcOperationalState::Commands::OperationalCommandResponse::DecodableType; + + static constexpr bool MustUseTimedInvoke() { return false; } +}; + +struct DecodableType +{ +public: + static constexpr CommandId GetCommandId() { return Commands::GoHome::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::RvcOperationalState::Id; } + + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace GoHome } // namespace Commands namespace Attributes { diff --git a/zzz_generated/app-common/app-common/zap-generated/ids/Commands.h b/zzz_generated/app-common/app-common/zap-generated/ids/Commands.h index 46626e62f0751e..76ed4e215d1092 100644 --- a/zzz_generated/app-common/app-common/zap-generated/ids/Commands.h +++ b/zzz_generated/app-common/app-common/zap-generated/ids/Commands.h @@ -808,6 +808,10 @@ namespace OperationalCommandResponse { static constexpr CommandId Id = 0x00000004; } // namespace OperationalCommandResponse +namespace GoHome { +static constexpr CommandId Id = 0x00000080; +} // namespace GoHome + } // namespace Commands } // namespace RvcOperationalState diff --git a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h index c1e1d69f59d802..df306407c81780 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h @@ -5667,6 +5667,7 @@ class OperationalStateResume : public ClusterCommand | * Stop | 0x01 | | * Start | 0x02 | | * Resume | 0x03 | +| * GoHome | 0x80 | |------------------------------------------------------------------------------| | Attributes: | | | * PhaseList | 0x0000 | @@ -5831,6 +5832,42 @@ class RvcOperationalStateResume : public ClusterCommand chip::app::Clusters::RvcOperationalState::Commands::Resume::Type mRequest; }; +/* + * Command GoHome + */ +class RvcOperationalStateGoHome : public ClusterCommand +{ +public: + RvcOperationalStateGoHome(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("go-home", credsIssuerConfig) + { + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::RvcOperationalState::Commands::GoHome::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); + } + + CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::RvcOperationalState::Commands::GoHome::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); + } + +private: + chip::app::Clusters::RvcOperationalState::Commands::GoHome::Type mRequest; +}; + /*----------------------------------------------------------------------------*\ | Cluster ScenesManagement | 0x0062 | |------------------------------------------------------------------------------| @@ -19359,6 +19396,7 @@ void registerClusterRvcOperationalState(Commands & commands, CredentialIssuerCom make_unique(credsIssuerConfig), // make_unique(credsIssuerConfig), // make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // // // Attributes // diff --git a/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h b/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h index 49fd07683ab36e..674714905aada3 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h @@ -68434,6 +68434,7 @@ class SubscribeAttributeOperationalStateClusterRevision : public SubscribeAttrib | * Stop | 0x01 | | * Start | 0x02 | | * Resume | 0x03 | +| * GoHome | 0x80 | |------------------------------------------------------------------------------| | Attributes: | | | * PhaseList | 0x0000 | @@ -68658,6 +68659,59 @@ class RvcOperationalStateResume : public ClusterCommand { private: }; +#if MTR_ENABLE_PROVISIONAL +/* + * Command GoHome + */ +class RvcOperationalStateGoHome : public ClusterCommand { +public: + RvcOperationalStateGoHome() + : ClusterCommand("go-home") + { + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::RvcOperationalState::Commands::GoHome::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRRVCOperationalStateClusterGoHomeParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster goHomeWithParams:params completion: + ^(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::RvcOperationalState::Commands::OperationalCommandResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::RvcOperationalState::Commands::OperationalCommandResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: +}; + +#endif // MTR_ENABLE_PROVISIONAL + /* * Attribute PhaseList */ @@ -180816,6 +180870,9 @@ void registerClusterRvcOperationalState(Commands & commands) make_unique(), // #endif // MTR_ENABLE_PROVISIONAL make_unique(), // +#if MTR_ENABLE_PROVISIONAL + make_unique(), // +#endif // MTR_ENABLE_PROVISIONAL make_unique(Id), // make_unique(Id), // make_unique(Id), // From 0b044205549937cb36371232ae279dba6bb25b00 Mon Sep 17 00:00:00 2001 From: lpbeliveau-silabs <112982107+lpbeliveau-silabs@users.noreply.github.com> Date: Thu, 18 Jan 2024 10:19:00 -0500 Subject: [PATCH 04/25] [Scenes] TC_S_3_1 (#30925) * Added mannual yaml test for TC_S_3_1, updated for the legacy removal changes * Applied fixes suggested in comments --- .../suites/certification/Test_TC_S_3_1.yaml | 187 ++++++++++++++++++ src/app/tests/suites/manualTests.json | 2 +- 2 files changed, 188 insertions(+), 1 deletion(-) create mode 100644 src/app/tests/suites/certification/Test_TC_S_3_1.yaml diff --git a/src/app/tests/suites/certification/Test_TC_S_3_1.yaml b/src/app/tests/suites/certification/Test_TC_S_3_1.yaml new file mode 100644 index 00000000000000..36d0b7e71c284e --- /dev/null +++ b/src/app/tests/suites/certification/Test_TC_S_3_1.yaml @@ -0,0 +1,187 @@ +# Copyright (c) 2023 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. +# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default + +name: 132.3.1. [TC-S-3.1] Functionality with DUT as Client + +PICS: + - S.C + +config: + nodeId: 0x12344321 + cluster: "Basic Information" + endpoint: 0 + +tests: + - label: "Note" + verification: | + For DUT as client test cases, Chip-tool command used below are an example to verify the functionality. For certification test, we expect DUT should have a capability or way to run the equivalent command. + disabled: true + + - label: "Step 0:" + verification: | + "Step 0: Preparation: + - TH as server exposes a Scenes Management server cluster on Endpoint: EndpointID, supporting all possible commands and corresponding attributes. + - Commission DUT to TH + disabled: true + + - label: "Step 1: DUT issues a C_ADD_SCENE command to the Test Harness." + PICS: S.C.C00.Tx + verification: | + DUT issues a C_ADD_SCENE command to the Test Harness equivalent to the following chip-tool command: + ./chip-tool scenes add-scene GroupID SceneID1 TransitionTime "Scene Name" '[{"clusterId": value, "attributeValueList":[{"attributeId": value, "attributeValue": value}]}' NodeID EndpointID + + Note: The number of ExtensionFieldSets, the value of clusterId of each ExtensionFieldSet, the number of attributes in attributeValueList and their values varies for each application + + Verify the DUT receives "AddSceneResponse" command on sending message to the all-clusters-app. The log below should be seen on DUT + + [1702307872.231804][4852:4854] CHIP:DMG: Received Command Response Data, Endpoint=EndpointID Cluster=0x0000_0005 Command=0x0000_0000 + [1702307872.231895][4852:4854] CHIP:TOO: Endpoint: EndpointID Cluster: 0x0000_0005 Command 0x0000_0000 + [1702307872.232137][4852:4854] CHIP:TOO: AddSceneResponse: { + [1702307872.232800][4852:4854] CHIP:TOO: status: 0 + [1702307872.232873][4852:4854] CHIP:TOO: groupID: GroupID + [1702307872.232928][4852:4854] CHIP:TOO: sceneID: SceneID1 + [1702307872.232976][4852:4854] CHIP:TOO: } + disabled: true + + - label: "Step 2: DUT issues a C_VIEW_SCENE command to the Test Harness." + PICS: S.C.C01.Tx + verification: | + DUT issues a C_VIEW_SCENE command to the Test Harness equivalent to the following chip-tool command: + ./chip-tool scenes view-scene GroupID SceneID1 NodeID EndpointID + + Verify the DUT receives the view-scenes response and that the extension fields in the log match the ones expected. + The expected number of ExtensionFieldSets, the value of the clusterId of each ExtensionFieldSet, the number of attributes in attributeValueList and their values + will vary depending on the TH application. + + [1702308535.141808][4874:4876] CHIP:DMG: Received Command Response Data, Endpoint=EndpointID Cluster=0x0000_0005 Command=0x0000_0001 + [1702308535.141865][4874:4876] CHIP:TOO: Endpoint: EndpointID Cluster: 0x0000_0005 Command 0x0000_0001 + [1702308535.141999][4874:4876] CHIP:TOO: ViewSceneResponse: { + [1702308535.142032][4874:4876] CHIP:TOO: status: 0 + [1702308535.142058][4874:4876] CHIP:TOO: groupID: GroupID + [1702308535.142084][4874:4876] CHIP:TOO: sceneID: SceneID1 + [1702308535.142110][4874:4876] CHIP:TOO: transitionTime: TransitionTime + [1702308535.142138][4874:4876] CHIP:TOO: sceneName: Scene Name + [1702308535.142176][4874:4876] CHIP:TOO: extensionFieldSets: x entries + [1702308535.142220][4874:4876] CHIP:TOO: [ClusterCount]: { + [1702308535.142248][4874:4876] CHIP:TOO: ClusterID: clusterId + [1702308535.142279][4874:4876] CHIP:TOO: AttributeValueList: x entries + [1702308535.143760][4874:4876] CHIP:TOO: [clusterX]: { + [1702308535.143796][4874:4876] CHIP:TOO: AttributeID: attributeId + [1702308535.143825][4874:4876] CHIP:TOO: AttributeValue: attributeValue + [1702308535.143853][4874:4876] CHIP:TOO: } ... + [1702308535.143881][4874:4876] CHIP:TOO: } + [1702308535.143910][4874:4876] CHIP:TOO: } + disabled: true + + - label: "Step 3: DUT issues a C_REMOVE_SCENE command to the Test Harness." + PICS: S.C.C02.Tx + verification: | + DUT issues a C_REMOVE_SCENE command to the Test Harness equivalent to the following chip-tool command: + ./chip-tool scenes remove-scene GroupID SceneID1 NodeID EndpointID + + Verify the DUT receives the RemoveSceneResponse command. The log below should be seen on DUT + + [1702309101.681384][4891:4893] CHIP:DMG: Received Command Response Data, Endpoint=EndpointID Cluster=0x0000_0005 Command=0x0000_0002 + [1702309101.681465][4891:4893] CHIP:TOO: Endpoint: EndpointID Cluster: 0x0000_0005 Command 0x0000_0002 + [1702309101.681600][4891:4893] CHIP:TOO: RemoveSceneResponse: { + [1702309101.681733][4891:4893] CHIP:TOO: status: 0 + [1702309101.681822][4891:4893] CHIP:TOO: groupID: GroupID + [1702309101.681862][4891:4893] CHIP:TOO: sceneID: SceneID1 + [1702309101.681901][4891:4893] CHIP:TOO: } + disabled: true + + - label: + "Step 4: DUT issues a C_REMOVE_ALL_SCENES command to the Test Harness." + PICS: S.C.C03.Tx + verification: | + DUT issues a C_REMOVE_ALL_SCENES command to the Test Harness equivalent to the following chip-tool command: + ./chip-tool scenes remove-all-scenes GroupID NodeID EndpointID + + Verify the DUT receives the RemoveAllScenesResponse command. The log below should be seen on DUT + + [1702313181.462597][5014:5016] CHIP:DMG: Received Command Response Data, Endpoint=EndpointID Cluster=0x0000_0005 Command=0x0000_0003 + [1702313181.462674][5014:5016] CHIP:TOO: Endpoint: EndpointID Cluster: 0x0000_0005 Command 0x0000_0003 + [1702313181.462804][5014:5016] CHIP:TOO: RemoveAllScenesResponse: { + [1702313181.462850][5014:5016] CHIP:TOO: status: 0 + [1702313181.462889][5014:5016] CHIP:TOO: groupID: GroupID + [1702313181.462928][5014:5016] CHIP:TOO: } + + disabled: true + + - label: "Step 5: DUT issues a C_STORE_SCENE command to the Test Harness." + PICS: S.C.C04.Tx + verification: | + DUT issues a C_STORE_SCENE command to the Test Harness equivalent to the following chip-tool command: + ./chip-tool scenes store-scene GroupID SceneID1 NodeID EndpointID + + Verify the DUT receives the StoreSceneResponse command. The log below should be seen on DUT + + [1702313453.832028][5031:5033] CHIP:DMG: Received Command Response Data, Endpoint=EndpointID Cluster=0x0000_0005 Command=0x0000_0004 + [1702313453.832181][5031:5033] CHIP:TOO: Endpoint: EndpointID Cluster: 0x0000_0005 Command 0x0000_0004 + [1702313453.832421][5031:5033] CHIP:TOO: StoreSceneResponse: { + [1702313453.832484][5031:5033] CHIP:TOO: status: 0 + [1702313453.832536][5031:5033] CHIP:TOO: groupID: GroupID + [1702313453.832588][5031:5033] CHIP:TOO: sceneID: SceneID1 + [1702313453.832681][5031:5033] CHIP:TOO: } + disabled: true + + - label: "Step 6: DUT issues a C_RECALL_SCENE command to the Test Harness." + PICS: S.C.C05.Tx + verification: | + DUT issues a C_RECALL_SCENE command to the Test Harness equivalent to the following chip-tool command: + ./chip-tool scenes recall-scene GroupID SceneID1 NodeID EndpointID + + Verify the DUT receives Success (0x00) status as a response. The log below should be seen on DUT + + [1702313771.265859][5044:5046] CHIP:DMG: Received Command Response Status for Endpoint=EndpointID Cluster=0x0000_0005 Command=0x0000_0005 Status=0x0 + disabled: true + + - label: + "Step 7: DUT issues a C_GET_SCENE_MEMBERSHIP command to the Test + Harness." + PICS: S.C.C06.Tx + verification: | + DUT issues a C_GET_SCENE_MEMBERSHIP command to the Test Harness equivalent to the following chip-tool command: + ./chip-tool scenes get-scene-membership GroupID NodeID EndpointID + + Verify the DUT receives the GetSceneMembershipResponse command. The log below should be seen on DUT + + [1702313969.025404][5063:5065] CHIP:DMG: Received Command Response Data, Endpoint=EndpointID Cluster=0x0000_0005 Command=0x0000_0006 + [1702313969.025568][5063:5065] CHIP:TOO: Endpoint: EndpointID Cluster: 0x0000_0005 Command 0x0000_0006 + [1702313969.025851][5063:5065] CHIP:TOO: GetSceneMembershipResponse: { + [1702313969.025918][5063:5065] CHIP:TOO: status: 0 + [1702313969.025973][5063:5065] CHIP:TOO: capacity: MaxCapacity - 1 + [1702313969.026024][5063:5065] CHIP:TOO: groupID: GroupID + [1702313969.026087][5063:5065] CHIP:TOO: sceneList: 1 entry + [1702313969.026147][5063:5065] CHIP:TOO: [1]: SceneID1 + [1702313969.026205][5063:5065] CHIP:TOO: } + disabled: true + + - label: "Step 8: DUT issues a C_COPY_SCENE command to the Test Harness." + PICS: S.C.C09.Tx + verification: | + DUT issues a C_COPY_SCENE command to the Test Harness equivalent to the following chip-tool command: + ./chip-tool scenes copy-scene 0 GroupID SceneID1 GroupID SceneID2 NodeID EndpointID + + Verify the DUT receives the CopySceneResponse command. The log below should be seen on DUT + + [1702314797.599704][5095:5097] CHIP:DMG: Received Command Response Data, Endpoint=EndpointID Cluster=0x0000_0005 Command=0x0000_0042 + [1702314797.599778][5095:5097] CHIP:TOO: Endpoint: EndpointID Cluster: 0x0000_0005 Command 0x0000_0042 + [1702314797.599898][5095:5097] CHIP:TOO: CopySceneResponse: { + [1702314797.599938][5095:5097] CHIP:TOO: status: 0 + [1702314797.599974][5095:5097] CHIP:TOO: groupIdentifierFrom: GroupID + [1702314797.600010][5095:5097] CHIP:TOO: sceneIdentifierFrom: SceneID2 + [1702314797.600044][5095:5097] CHIP:TOO: } + disabled: true diff --git a/src/app/tests/suites/manualTests.json b/src/app/tests/suites/manualTests.json index ec67875d1a3161..f839359041e726 100644 --- a/src/app/tests/suites/manualTests.json +++ b/src/app/tests/suites/manualTests.json @@ -282,7 +282,7 @@ "TimeSynchronization": [], "UnitLocalization": [], "Binding": ["Test_TC_BIND_2_1", "Test_TC_BIND_2_2", "Test_TC_BIND_2_3"], - "ScenesManagement": ["Test_TC_S_2_5", "Test_TC_S_2_6"], + "ScenesManagement": ["Test_TC_S_2_5", "Test_TC_S_2_6", "Test_TC_S_3_1"], "PumpConfigurationControl": [], "AccessControl": [], "UserLabel": [], From 1e6e62b42184f3a1c321a3e8b11c96b1348e7d6c Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Thu, 18 Jan 2024 10:50:12 -0500 Subject: [PATCH 05/25] Move emAfLoadAttributeDefaults to private inside attribute-storage.cpp (#31427) * Move emAfLoadAttributeDefaults to private. Reduce the API surface for ember attribute storage: - remove unused ability to "load defaults without loading persistence" - make the full loadDefautls + cluster private for now as it is not used Looking to reduce the API surface of ember attribute storage to consider making it pluggable/modular (to allow for better unit testing support). * Add extra static to method * Replace a usage of emAfLoadAttributeDefaults * Update test cluster docs * Fix verifyordie logic * Remove one more unused (not even implemented) function * Fix macro usage * Move 2 more methods outside public API * Restyle * More strict const in readorwriteattribute --- .../all-clusters-app.matter | 3 +- .../all-clusters-minimal-app.matter | 3 +- .../test-cluster-server.cpp | 2 +- src/app/util/attribute-storage.cpp | 34 +++++++++---------- src/app/util/attribute-storage.h | 18 ++-------- .../zcl/data-model/chip/test-cluster.xml | 3 +- .../data_model/controller-clusters.matter | 3 +- .../CHIP/zap-generated/MTRBaseClusters.h | 3 +- 8 files changed, 30 insertions(+), 39 deletions(-) diff --git a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter index 6a817823dd4667..1964ac899e9ff7 100644 --- a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter +++ b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter @@ -6742,7 +6742,8 @@ internal cluster UnitTesting = 4294048773 { int8u fillCharacter = 2; } - /** Simple command without any parameters and without a specific response */ + /** Simple command without any parameters and without a specific response. + To aid in unit testing, this command will re-initialize attribute storage to defaults. */ command Test(): DefaultSuccess = 0; /** Simple command without any parameters and without a specific response not handled by the server */ command TestNotHandled(): DefaultSuccess = 1; diff --git a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter index dd01a2fb356f22..ee5f558431657e 100644 --- a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter +++ b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter @@ -5812,7 +5812,8 @@ internal cluster UnitTesting = 4294048773 { int8u fillCharacter = 2; } - /** Simple command without any parameters and without a specific response */ + /** Simple command without any parameters and without a specific response. + To aid in unit testing, this command will re-initialize attribute storage to defaults. */ command Test(): DefaultSuccess = 0; /** Simple command without any parameters and without a specific response not handled by the server */ command TestNotHandled(): DefaultSuccess = 1; diff --git a/src/app/clusters/test-cluster-server/test-cluster-server.cpp b/src/app/clusters/test-cluster-server/test-cluster-server.cpp index de41c286f15f2d..cfecf37ec14929 100644 --- a/src/app/clusters/test-cluster-server/test-cluster-server.cpp +++ b/src/app/clusters/test-cluster-server/test-cluster-server.cpp @@ -720,7 +720,7 @@ bool emberAfUnitTestingClusterTestCallback(app::CommandHandler * commandObj, con const Clusters::UnitTesting::Commands::Test::DecodableType & commandData) { // Setup the test variables - emAfLoadAttributeDefaults(commandPath.mEndpointId, true, MakeOptional(commandPath.mClusterId)); + emberAfInitializeAttributes(commandPath.mEndpointId); for (int i = 0; i < kAttributeListLength; ++i) { gListUint8Data[i] = 0; diff --git a/src/app/util/attribute-storage.cpp b/src/app/util/attribute-storage.cpp index ce37246c4b3d9f..67b15686e18282 100644 --- a/src/app/util/attribute-storage.cpp +++ b/src/app/util/attribute-storage.cpp @@ -56,6 +56,15 @@ EmberAfDefinedEndpoint emAfEndpoints[MAX_ENDPOINT_COUNT]; uint8_t attributeData[ACTUAL_ATTRIBUTE_SIZE]; +// ----- internal-only methods, not part of the external API ----- + +// Loads the attributes from built-in default and storage. +static void emAfLoadAttributeDefaults(chip::EndpointId endpoint, chip::Optional = chip::NullOptional); + +static bool emAfMatchCluster(const EmberAfCluster * cluster, const EmberAfAttributeSearchRecord * attRecord); +static bool emAfMatchAttribute(const EmberAfCluster * cluster, const EmberAfAttributeMetadata * am, + const EmberAfAttributeSearchRecord * attRecord); + namespace { #if (!defined(ATTRIBUTE_SINGLETONS_SIZE)) || (ATTRIBUTE_SINGLETONS_SIZE == 0) @@ -536,7 +545,7 @@ static EmberAfStatus typeSensitiveMemCopy(ClusterId clusterId, uint8_t * dest, u * 1. Cluster ids match AND * 2. Cluster is a server cluster (because there are no client attributes). */ -bool emAfMatchCluster(const EmberAfCluster * cluster, EmberAfAttributeSearchRecord * attRecord) +bool emAfMatchCluster(const EmberAfCluster * cluster, const EmberAfAttributeSearchRecord * attRecord) { return (cluster->clusterId == attRecord->clusterId && (cluster->mask & CLUSTER_MASK_SERVER)); } @@ -549,7 +558,7 @@ bool emAfMatchCluster(const EmberAfCluster * cluster, EmberAfAttributeSearchReco * Attributes match if attr ids match. */ bool emAfMatchAttribute(const EmberAfCluster * cluster, const EmberAfAttributeMetadata * am, - EmberAfAttributeSearchRecord * attRecord) + const EmberAfAttributeSearchRecord * attRecord) { return (am->attributeId == attRecord->attributeId); } @@ -567,7 +576,7 @@ bool emAfMatchAttribute(const EmberAfCluster * cluster, const EmberAfAttributeMe // type. For strings, the function will copy as many bytes as will fit in the // attribute. This means the resulting string may be truncated. The length // byte(s) in the resulting string will reflect any truncated. -EmberAfStatus emAfReadOrWriteAttribute(EmberAfAttributeSearchRecord * attRecord, const EmberAfAttributeMetadata ** metadata, +EmberAfStatus emAfReadOrWriteAttribute(const EmberAfAttributeSearchRecord * attRecord, const EmberAfAttributeMetadata ** metadata, uint8_t * buffer, uint16_t readLength, bool write) { assertChipStackLockedByCurrentThread(); @@ -1187,15 +1196,10 @@ uint8_t emberAfGetClustersFromEndpoint(EndpointId endpoint, ClusterId * clusterL void emberAfInitializeAttributes(EndpointId endpoint) { - emAfLoadAttributeDefaults(endpoint, false); + emAfLoadAttributeDefaults(endpoint); } -void emberAfResetAttributes(EndpointId endpoint) -{ - emAfLoadAttributeDefaults(endpoint, true); -} - -void emAfLoadAttributeDefaults(EndpointId endpoint, bool ignoreStorage, Optional clusterId) +void emAfLoadAttributeDefaults(EndpointId endpoint, Optional clusterId) { uint16_t ep; uint8_t clusterI; @@ -1203,7 +1207,7 @@ void emAfLoadAttributeDefaults(EndpointId endpoint, bool ignoreStorage, Optional uint8_t * ptr; uint16_t epCount = emberAfEndpointCount(); uint8_t attrData[ATTRIBUTE_LARGEST]; - auto * attrStorage = ignoreStorage ? nullptr : app::GetAttributePersistenceProvider(); + auto * attrStorage = app::GetAttributePersistenceProvider(); // Don't check whether we actually have an attrStorage here, because it's OK // to have one if none of our attributes have NVM storage. @@ -1245,9 +1249,9 @@ void emAfLoadAttributeDefaults(EndpointId endpoint, bool ignoreStorage, Optional ptr = nullptr; // Will get set to the value to write, as needed. // First check for a persisted value. - if (!ignoreStorage && am->IsAutomaticallyPersisted()) + if (am->IsAutomaticallyPersisted()) { - VerifyOrDie(attrStorage && "Attribute persistence needs a persistence provider"); + VerifyOrDieWithMsg(attrStorage != nullptr, Zcl, "Attribute persistence needs a persistence provider"); MutableByteSpan bytes(attrData); CHIP_ERROR err = attrStorage->ReadValue( app::ConcreteAttributePath(de->endpoint, cluster->clusterId, am->attributeId), am, bytes); @@ -1328,10 +1332,6 @@ void emAfLoadAttributeDefaults(EndpointId endpoint, bool ignoreStorage, Optional ptr, 0, // buffer size - unused true); // write? - if (ignoreStorage) - { - emAfSaveAttributeToStorageIfNeeded(ptr, de->endpoint, record.clusterId, am); - } } } } diff --git a/src/app/util/attribute-storage.h b/src/app/util/attribute-storage.h index 184282a1e466c8..be965da42ee357 100644 --- a/src/app/util/attribute-storage.h +++ b/src/app/util/attribute-storage.h @@ -95,13 +95,9 @@ void emAfCallInits(void); // Initial configuration void emberAfEndpointConfigure(void); -EmberAfStatus emAfReadOrWriteAttribute(EmberAfAttributeSearchRecord * attRecord, const EmberAfAttributeMetadata ** metadata, +EmberAfStatus emAfReadOrWriteAttribute(const EmberAfAttributeSearchRecord * attRecord, const EmberAfAttributeMetadata ** metadata, uint8_t * buffer, uint16_t readLength, bool write); -bool emAfMatchCluster(const EmberAfCluster * cluster, EmberAfAttributeSearchRecord * attRecord); -bool emAfMatchAttribute(const EmberAfCluster * cluster, const EmberAfAttributeMetadata * am, - EmberAfAttributeSearchRecord * attRecord); - // Check if a cluster is implemented or not. If yes, the cluster is returned. // // mask = 0 -> find either client or server @@ -156,14 +152,8 @@ const EmberAfCluster * emberAfFindClusterIncludingDisabledEndpoints(chip::Endpoi // cast it. EmberAfGenericClusterFunction emberAfFindClusterFunction(const EmberAfCluster * cluster, EmberAfClusterMask functionMask); -// Public APIs for loading attributes +// Loads attribute defaults and any non-volatile attributes stored void emberAfInitializeAttributes(chip::EndpointId endpoint); -void emberAfResetAttributes(chip::EndpointId endpoint); - -// Loads the attributes from built-in default and / or storage. If -// ignoreStorage is true, only defaults will be read, and the storage for -// non-volatile attributes will be overwritten with those defaults. -void emAfLoadAttributeDefaults(chip::EndpointId endpoint, bool ignoreStorage, chip::Optional = chip::NullOptional); // After the RAM value has changed, code should call this function. If this // attribute has been tagged as non-volatile, its value will be stored. @@ -177,10 +167,6 @@ void emAfClusterAttributeChangedCallback(const chip::app::ConcreteAttributePath EmberAfStatus emAfClusterPreAttributeChangedCallback(const chip::app::ConcreteAttributePath & attributePath, EmberAfAttributeType attributeType, uint16_t size, uint8_t * value); -// Checks a cluster mask byte against ticks passed bitmask -// returns true if the mask matches a passed interval -bool emberAfCheckTick(EmberAfClusterMask mask, uint8_t passedMask); - // Check whether there is an endpoint defined with the given endpoint id that is // enabled. bool emberAfEndpointIsEnabled(chip::EndpointId endpoint); diff --git a/src/app/zap-templates/zcl/data-model/chip/test-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/test-cluster.xml index f043c49074ec0e..7fdc585a0c82e9 100644 --- a/src/app/zap-templates/zcl/data-model/chip/test-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/test-cluster.xml @@ -240,7 +240,8 @@ limitations under the License. - Simple command without any parameters and without a specific response + Simple command without any parameters and without a specific response. + To aid in unit testing, this command will re-initialize attribute storage to defaults. diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter index bc8127ac45ba28..d1bd05a82d21d4 100644 --- a/src/controller/data_model/controller-clusters.matter +++ b/src/controller/data_model/controller-clusters.matter @@ -8929,7 +8929,8 @@ internal cluster UnitTesting = 4294048773 { int8u fillCharacter = 2; } - /** Simple command without any parameters and without a specific response */ + /** Simple command without any parameters and without a specific response. + To aid in unit testing, this command will re-initialize attribute storage to defaults. */ command Test(): DefaultSuccess = 0; /** Simple command without any parameters and without a specific response not handled by the server */ command TestNotHandled(): DefaultSuccess = 1; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h index a3c5fc32992c07..741bca21657ec4 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h @@ -14848,7 +14848,8 @@ MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) /** * Command Test * - * Simple command without any parameters and without a specific response + * Simple command without any parameters and without a specific response. + To aid in unit testing, this command will re-initialize attribute storage to defaults. */ - (void)testWithParams:(MTRUnitTestingClusterTestParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)testWithCompletion:(MTRStatusCompletion)completion From 4ac4a7f831add44f871a8216fba36a4299a84f23 Mon Sep 17 00:00:00 2001 From: William Date: Thu, 18 Jan 2024 16:01:24 +0000 Subject: [PATCH 06/25] Handle the RvcOperationalState GoHome command (#31289) * Added the RvcOpearationalState specific command GoHome to the XML. * Regenerated files from XMLs. * Added a virtual method to the base operational state class that allows derived clusters to handle the invocation of their specific commands. This method is called by the operational state cluster if the received command is not a known base cluster command. * Added a mechanism by which the OperationalState cluster can call derived cluster methods to handle commands intended for them. * Implemented a default implementation of the RvcOperationalState::Delegate's HandleGoHomeCommandCallback method since the GoHome command is optional. Use the correct delegate type of in the rvc-app example. * Restyled by clang-format * Regenerated files from XMLs after merging changes in master. * Separated the RVC OpState delegate implementation in the all-clusters-app and implemented its GoHome command handle. * Enabled the GoHome command in the all-clusters-app zap file. * Enabled the GoHome command in the rvc-pp zap file. * Restyled by clang-format * Restyled by gn * Java file regen * Removed definition of the RvcOperationalState class as it was mistake in the previous merge. * Fixed the RvcOpState delegate in the all-clusters-app since the GenericOperationalPhase class was removed when main was merget. * Added functions to get the OpratioalState and RvcOperationalState instances in the all-clusters-app. Replaced the custom implementation of the OperationalState and RvcOperationalState delegates for the ameba platform with the common implementations. * Restyled by clang-format * Regenerated zap files. * Added missing license to an all-clusters-app src file. * Restyled by clang-format * Removed question comment. --------- Co-authored-by: Restyled.io Co-authored-by: Matthew Hazley --- .../all-clusters-app.matter | 1 + .../all-clusters-common/all-clusters-app.zap | 8 ++ .../include/operational-state-delegate-impl.h | 31 +----- .../rvc-operational-state-delegate-impl.h} | 99 ++++++------------- .../src/operational-state-delegate-impl.cpp | 38 +------ .../rvc-operational-state-delegate-impl.cpp} | 82 ++++++--------- .../all-clusters-app/ameba/chip_main.cmake | 3 +- .../include/ManualOperationalStateCommand.h | 3 +- examples/all-clusters-app/linux/BUILD.gn | 1 + .../all-clusters-app/linux/main-common.cpp | 1 + .../include/rvc-operational-state-delegate.h | 2 +- examples/rvc-app/rvc-common/rvc-app.matter | 1 + examples/rvc-app/rvc-common/rvc-app.zap | 20 ++-- .../operational-state-server.cpp | 44 ++++++++- .../operational-state-server.h | 43 +++++++- 15 files changed, 183 insertions(+), 194 deletions(-) rename examples/all-clusters-app/{ameba/main/include/OperationalStateManager.h => all-clusters-common/include/rvc-operational-state-delegate-impl.h} (64%) rename examples/all-clusters-app/{ameba/main/OperationalStateManager.cpp => all-clusters-common/src/rvc-operational-state-delegate-impl.cpp} (53%) diff --git a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter index 1964ac899e9ff7..c003d8d439803f 100644 --- a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter +++ b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter @@ -7789,6 +7789,7 @@ endpoint 1 { handle command Pause; handle command Resume; handle command OperationalCommandResponse; + handle command GoHome; } server cluster ScenesManagement { diff --git a/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap b/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap index 9013ea3140e6db..45499b5d44ce3e 100644 --- a/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap +++ b/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap @@ -11262,6 +11262,14 @@ "source": "server", "isIncoming": 0, "isEnabled": 1 + }, + { + "name": "GoHome", + "code": 128, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 } ], "attributes": [ diff --git a/examples/all-clusters-app/all-clusters-common/include/operational-state-delegate-impl.h b/examples/all-clusters-app/all-clusters-common/include/operational-state-delegate-impl.h index c8d63c2bb6efc2..0bcb76f324a1da 100644 --- a/examples/all-clusters-app/all-clusters-common/include/operational-state-delegate-impl.h +++ b/examples/all-clusters-app/all-clusters-common/include/operational-state-delegate-impl.h @@ -111,38 +111,11 @@ class OperationalStateDelegate : public GenericOperationalStateDelegateImpl } }; -void Shutdown(); - -} // namespace OperationalState - -namespace RvcOperationalState { - -// This is an application level delegate to handle operational state commands according to the specific business logic. -class RvcOperationalStateDelegate : public OperationalState::GenericOperationalStateDelegateImpl -{ -private: - const OperationalState::GenericOperationalState rvcOpStateList[7] = { - OperationalState::GenericOperationalState(to_underlying(OperationalState::OperationalStateEnum::kStopped)), - OperationalState::GenericOperationalState(to_underlying(OperationalState::OperationalStateEnum::kRunning)), - OperationalState::GenericOperationalState(to_underlying(OperationalState::OperationalStateEnum::kPaused)), - OperationalState::GenericOperationalState(to_underlying(OperationalState::OperationalStateEnum::kError)), - OperationalState::GenericOperationalState( - to_underlying(Clusters::RvcOperationalState::OperationalStateEnum::kSeekingCharger)), - OperationalState::GenericOperationalState(to_underlying(Clusters::RvcOperationalState::OperationalStateEnum::kCharging)), - OperationalState::GenericOperationalState(to_underlying(Clusters::RvcOperationalState::OperationalStateEnum::kDocked)), - }; - -public: - RvcOperationalStateDelegate() - { - GenericOperationalStateDelegateImpl::mOperationalStateList = - Span(rvcOpStateList); - } -}; +Instance * GetOperationalStateInstance(); void Shutdown(); -} // namespace RvcOperationalState +} // namespace OperationalState } // namespace Clusters } // namespace app } // namespace chip diff --git a/examples/all-clusters-app/ameba/main/include/OperationalStateManager.h b/examples/all-clusters-app/all-clusters-common/include/rvc-operational-state-delegate-impl.h similarity index 64% rename from examples/all-clusters-app/ameba/main/include/OperationalStateManager.h rename to examples/all-clusters-app/all-clusters-common/include/rvc-operational-state-delegate-impl.h index 2183e92078e6c7..89a3e69c5b8bed 100644 --- a/examples/all-clusters-app/ameba/main/include/OperationalStateManager.h +++ b/examples/all-clusters-app/all-clusters-common/include/rvc-operational-state-delegate-impl.h @@ -23,20 +23,34 @@ #include #include -void getOperationalStateSet(u8 state); - namespace chip { namespace app { namespace Clusters { -namespace OperationalState { - -Instance * GetOperationalStateInstance(); +namespace RvcOperationalState { // This is an application level delegate to handle operational state commands according to the specific business logic. -class GenericOperationalStateDelegateImpl : public Delegate +class RvcOperationalStateDelegate : public Delegate { +private: + const Clusters::OperationalState::GenericOperationalState rvcOpStateList[7] = { + OperationalState::GenericOperationalState(to_underlying(OperationalState::OperationalStateEnum::kStopped)), + OperationalState::GenericOperationalState(to_underlying(OperationalState::OperationalStateEnum::kRunning)), + OperationalState::GenericOperationalState(to_underlying(OperationalState::OperationalStateEnum::kPaused)), + OperationalState::GenericOperationalState(to_underlying(OperationalState::OperationalStateEnum::kError)), + OperationalState::GenericOperationalState( + to_underlying(Clusters::RvcOperationalState::OperationalStateEnum::kSeekingCharger)), + OperationalState::GenericOperationalState(to_underlying(Clusters::RvcOperationalState::OperationalStateEnum::kCharging)), + OperationalState::GenericOperationalState(to_underlying(Clusters::RvcOperationalState::OperationalStateEnum::kDocked)), + }; + + Span mOperationalStateList = + Span(rvcOpStateList); + Span mOperationalPhaseList; + public: + RvcOperationalStateDelegate() {} + /** * Get the countdown time. This attribute is not used in this application. * @return The current countdown time. @@ -51,19 +65,15 @@ class GenericOperationalStateDelegateImpl : public Delegate * @param index The index of the state, with 0 representing the first state. * @param operationalState The GenericOperationalState is filled. */ - CHIP_ERROR GetOperationalStateAtIndex(size_t index, GenericOperationalState & operationalState) override; + CHIP_ERROR GetOperationalStateAtIndex(size_t index, OperationalState::GenericOperationalState & operationalState) override; /** - * Fills in the provided MutableCharSpan with the phase at index `index` if there is one, + * Fills in the provided GenericOperationalPhase with the phase at index `index` if there is one, * or returns CHIP_ERROR_NOT_FOUND if the index is out of range for the list of phases. - * - * If CHIP_ERROR_NOT_FOUND is returned for index 0, that indicates that the PhaseList attribute is null - * (there are no phases defined at all). - * * Note: This is used by the SDK to populate the phase list attribute. If the contents of this list changes, the * device SHALL call the Instance's ReportPhaseListChange method to report that this attribute has changed. * @param index The index of the phase, with 0 representing the first phase. - * @param operationalPhase The MutableCharSpan is filled. + * @param operationalPhase The GenericOperationalPhase is filled. */ CHIP_ERROR GetOperationalPhaseAtIndex(size_t index, MutableCharSpan & operationalPhase) override; @@ -72,82 +82,37 @@ class GenericOperationalStateDelegateImpl : public Delegate * Handle Command Callback in application: Pause * @param[out] get operational error after callback. */ - void HandlePauseStateCallback(GenericOperationalError & err) override; + void HandlePauseStateCallback(OperationalState::GenericOperationalError & err) override; /** * Handle Command Callback in application: Resume * @param[out] get operational error after callback. */ - void HandleResumeStateCallback(GenericOperationalError & err) override; + void HandleResumeStateCallback(OperationalState::GenericOperationalError & err) override; /** * Handle Command Callback in application: Start * @param[out] get operational error after callback. */ - void HandleStartStateCallback(GenericOperationalError & err) override; + void HandleStartStateCallback(OperationalState::GenericOperationalError & err) override; /** * Handle Command Callback in application: Stop * @param[out] get operational error after callback. */ - void HandleStopStateCallback(GenericOperationalError & err) override; - -protected: - Span mOperationalStateList; - Span mOperationalPhaseList; -}; - -// This is an application level delegate to handle operational state commands according to the specific business logic. -class OperationalStateDelegate : public GenericOperationalStateDelegateImpl -{ -private: - const GenericOperationalState opStateList[4] = { - GenericOperationalState(to_underlying(OperationalStateEnum::kStopped)), - GenericOperationalState(to_underlying(OperationalStateEnum::kRunning)), - GenericOperationalState(to_underlying(OperationalStateEnum::kPaused)), - GenericOperationalState(to_underlying(OperationalStateEnum::kError)), - }; + void HandleStopStateCallback(OperationalState::GenericOperationalError & err) override; -public: - OperationalStateDelegate() - { - GenericOperationalStateDelegateImpl::mOperationalStateList = Span(opStateList); - } + /** + * Handle the GoHome command. + * @param err + */ + void HandleGoHomeCommandCallback(OperationalState::GenericOperationalError & err) override; }; void Shutdown(); -} // namespace OperationalState - -namespace RvcOperationalState { - Instance * GetRvcOperationalStateInstance(); -// This is an application level delegate to handle operational state commands according to the specific business logic. -class RvcOperationalStateDelegate : public OperationalState::GenericOperationalStateDelegateImpl -{ -private: - const OperationalState::GenericOperationalState rvcOpStateList[7] = { - OperationalState::GenericOperationalState(to_underlying(OperationalState::OperationalStateEnum::kStopped)), - OperationalState::GenericOperationalState(to_underlying(OperationalState::OperationalStateEnum::kRunning)), - OperationalState::GenericOperationalState(to_underlying(OperationalState::OperationalStateEnum::kPaused)), - OperationalState::GenericOperationalState(to_underlying(OperationalState::OperationalStateEnum::kError)), - OperationalState::GenericOperationalState( - to_underlying(Clusters::RvcOperationalState::OperationalStateEnum::kSeekingCharger)), - OperationalState::GenericOperationalState(to_underlying(Clusters::RvcOperationalState::OperationalStateEnum::kCharging)), - OperationalState::GenericOperationalState(to_underlying(Clusters::RvcOperationalState::OperationalStateEnum::kDocked)), - }; - -public: - RvcOperationalStateDelegate() - { - GenericOperationalStateDelegateImpl::mOperationalStateList = - Span(rvcOpStateList); - } -}; - -void Shutdown(); - } // namespace RvcOperationalState } // namespace Clusters } // namespace app diff --git a/examples/all-clusters-app/all-clusters-common/src/operational-state-delegate-impl.cpp b/examples/all-clusters-app/all-clusters-common/src/operational-state-delegate-impl.cpp index 02bcd4a775a07e..3370d75bd65f35 100644 --- a/examples/all-clusters-app/all-clusters-common/src/operational-state-delegate-impl.cpp +++ b/examples/all-clusters-app/all-clusters-common/src/operational-state-delegate-impl.cpp @@ -103,6 +103,11 @@ void GenericOperationalStateDelegateImpl::HandleStopStateCallback(GenericOperati static OperationalState::Instance * gOperationalStateInstance = nullptr; static OperationalStateDelegate * gOperationalStateDelegate = nullptr; +OperationalState::Instance * OperationalState::GetOperationalStateInstance() +{ + return gOperationalStateInstance; +} + void OperationalState::Shutdown() { if (gOperationalStateInstance != nullptr) @@ -130,36 +135,3 @@ void emberAfOperationalStateClusterInitCallback(chip::EndpointId endpointId) gOperationalStateInstance->Init(); } - -// Init RVC Operational State cluster - -static OperationalState::Instance * gRvcOperationalStateInstance = nullptr; -static RvcOperationalStateDelegate * gRvcOperationalStateDelegate = nullptr; - -void RvcOperationalState::Shutdown() -{ - if (gRvcOperationalStateInstance != nullptr) - { - delete gRvcOperationalStateInstance; - gRvcOperationalStateInstance = nullptr; - } - if (gRvcOperationalStateDelegate != nullptr) - { - delete gRvcOperationalStateDelegate; - gRvcOperationalStateDelegate = nullptr; - } -} - -void emberAfRvcOperationalStateClusterInitCallback(chip::EndpointId endpointId) -{ - VerifyOrDie(endpointId == 1); // this cluster is only enabled for endpoint 1. - VerifyOrDie(gRvcOperationalStateInstance == nullptr && gRvcOperationalStateDelegate == nullptr); - - gRvcOperationalStateDelegate = new RvcOperationalStateDelegate; - EndpointId operationalStateEndpoint = 0x01; - gRvcOperationalStateInstance = new RvcOperationalState::Instance(gRvcOperationalStateDelegate, operationalStateEndpoint); - - gRvcOperationalStateInstance->SetOperationalState(to_underlying(OperationalState::OperationalStateEnum::kStopped)); - - gRvcOperationalStateInstance->Init(); -} diff --git a/examples/all-clusters-app/ameba/main/OperationalStateManager.cpp b/examples/all-clusters-app/all-clusters-common/src/rvc-operational-state-delegate-impl.cpp similarity index 53% rename from examples/all-clusters-app/ameba/main/OperationalStateManager.cpp rename to examples/all-clusters-app/all-clusters-common/src/rvc-operational-state-delegate-impl.cpp index 8dbeda60d75526..946110bb18906c 100644 --- a/examples/all-clusters-app/ameba/main/OperationalStateManager.cpp +++ b/examples/all-clusters-app/all-clusters-common/src/rvc-operational-state-delegate-impl.cpp @@ -15,15 +15,15 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#include +#include using namespace chip; using namespace chip::app; using namespace chip::app::Clusters; -using namespace chip::app::Clusters::OperationalState; using namespace chip::app::Clusters::RvcOperationalState; -CHIP_ERROR GenericOperationalStateDelegateImpl::GetOperationalStateAtIndex(size_t index, GenericOperationalState & operationalState) +CHIP_ERROR RvcOperationalStateDelegate::GetOperationalStateAtIndex(size_t index, + OperationalState::GenericOperationalState & operationalState) { if (index >= mOperationalStateList.size()) { @@ -33,7 +33,7 @@ CHIP_ERROR GenericOperationalStateDelegateImpl::GetOperationalStateAtIndex(size_ return CHIP_NO_ERROR; } -CHIP_ERROR GenericOperationalStateDelegateImpl::GetOperationalPhaseAtIndex(size_t index, MutableCharSpan & operationalPhase) +CHIP_ERROR RvcOperationalStateDelegate::GetOperationalPhaseAtIndex(size_t index, MutableCharSpan & operationalPhase) { if (index >= mOperationalPhaseList.size()) { @@ -42,98 +42,76 @@ CHIP_ERROR GenericOperationalStateDelegateImpl::GetOperationalPhaseAtIndex(size_ return CopyCharSpanToMutableCharSpan(mOperationalPhaseList[index], operationalPhase); } -void GenericOperationalStateDelegateImpl::HandlePauseStateCallback(GenericOperationalError & err) +void RvcOperationalStateDelegate::HandlePauseStateCallback(OperationalState::GenericOperationalError & err) { + // placeholder implementation auto error = GetInstance()->SetOperationalState(to_underlying(OperationalState::OperationalStateEnum::kPaused)); if (error == CHIP_NO_ERROR) { - err.Set(to_underlying(ErrorStateEnum::kNoError)); + err.Set(to_underlying(OperationalState::ErrorStateEnum::kNoError)); } else { - err.Set(to_underlying(ErrorStateEnum::kUnableToCompleteOperation)); + err.Set(to_underlying(OperationalState::ErrorStateEnum::kUnableToCompleteOperation)); } } -void GenericOperationalStateDelegateImpl::HandleResumeStateCallback(GenericOperationalError & err) +void RvcOperationalStateDelegate::HandleResumeStateCallback(OperationalState::GenericOperationalError & err) { - auto error = GetInstance()->SetOperationalState(to_underlying(OperationalStateEnum::kRunning)); + // placeholder implementation + auto error = GetInstance()->SetOperationalState(to_underlying(OperationalState::OperationalStateEnum::kRunning)); if (error == CHIP_NO_ERROR) { - err.Set(to_underlying(ErrorStateEnum::kNoError)); + err.Set(to_underlying(OperationalState::ErrorStateEnum::kNoError)); } else { - err.Set(to_underlying(ErrorStateEnum::kUnableToCompleteOperation)); + err.Set(to_underlying(OperationalState::ErrorStateEnum::kUnableToCompleteOperation)); } } -void GenericOperationalStateDelegateImpl::HandleStartStateCallback(GenericOperationalError & err) +void RvcOperationalStateDelegate::HandleStartStateCallback(OperationalState::GenericOperationalError & err) { - auto error = GetInstance()->SetOperationalState(to_underlying(OperationalStateEnum::kRunning)); + // placeholder implementation + auto error = GetInstance()->SetOperationalState(to_underlying(OperationalState::OperationalStateEnum::kRunning)); if (error == CHIP_NO_ERROR) { - err.Set(to_underlying(ErrorStateEnum::kNoError)); + err.Set(to_underlying(OperationalState::ErrorStateEnum::kNoError)); } else { - err.Set(to_underlying(ErrorStateEnum::kUnableToCompleteOperation)); + err.Set(to_underlying(OperationalState::ErrorStateEnum::kUnableToCompleteOperation)); } } -void GenericOperationalStateDelegateImpl::HandleStopStateCallback(GenericOperationalError & err) +void RvcOperationalStateDelegate::HandleStopStateCallback(OperationalState::GenericOperationalError & err) { - auto error = GetInstance()->SetOperationalState(to_underlying(OperationalStateEnum::kStopped)); + // placeholder implementation + auto error = GetInstance()->SetOperationalState(to_underlying(OperationalState::OperationalStateEnum::kStopped)); if (error == CHIP_NO_ERROR) { - err.Set(to_underlying(ErrorStateEnum::kNoError)); + err.Set(to_underlying(OperationalState::ErrorStateEnum::kNoError)); } else { - err.Set(to_underlying(ErrorStateEnum::kUnableToCompleteOperation)); + err.Set(to_underlying(OperationalState::ErrorStateEnum::kUnableToCompleteOperation)); } } -// Init Operational State cluster - -static OperationalState::Instance * gOperationalStateInstance = nullptr; -static OperationalStateDelegate * gOperationalStateDelegate = nullptr; - -void OperationalState::Shutdown() +void RvcOperationalStateDelegate::HandleGoHomeCommandCallback(OperationalState::GenericOperationalError & err) { - if (gOperationalStateInstance != nullptr) + // placeholder implementation + auto error = GetInstance()->SetOperationalState(to_underlying(OperationalStateEnum::kSeekingCharger)); + if (error == CHIP_NO_ERROR) { - delete gOperationalStateInstance; - gOperationalStateInstance = nullptr; + err.Set(to_underlying(OperationalState::ErrorStateEnum::kNoError)); } - if (gOperationalStateDelegate != nullptr) + else { - delete gOperationalStateDelegate; - gOperationalStateDelegate = nullptr; + err.Set(to_underlying(OperationalState::ErrorStateEnum::kUnableToCompleteOperation)); } } -OperationalState::Instance * OperationalState::GetOperationalStateInstance() -{ - return gOperationalStateInstance; -} - -void emberAfOperationalStateClusterInitCallback(chip::EndpointId endpointId) -{ - VerifyOrDie(endpointId == 1); // this cluster is only enabled for endpoint 1. - VerifyOrDie(gOperationalStateInstance == nullptr && gOperationalStateDelegate == nullptr); - - gOperationalStateDelegate = new OperationalStateDelegate; - EndpointId operationalStateEndpoint = 0x01; - gOperationalStateInstance = new OperationalState::Instance(gOperationalStateDelegate, operationalStateEndpoint); - - gOperationalStateInstance->SetOperationalState(to_underlying(OperationalState::OperationalStateEnum::kStopped)); - - gOperationalStateInstance->Init(); -} - -// Init RVC Operational State cluster - static RvcOperationalState::Instance * gRvcOperationalStateInstance = nullptr; static RvcOperationalStateDelegate * gRvcOperationalStateDelegate = nullptr; diff --git a/examples/all-clusters-app/ameba/chip_main.cmake b/examples/all-clusters-app/ameba/chip_main.cmake index 66528a9941141a..6cc76ad25e7dd8 100755 --- a/examples/all-clusters-app/ameba/chip_main.cmake +++ b/examples/all-clusters-app/ameba/chip_main.cmake @@ -166,13 +166,14 @@ list( ${chip_dir}/examples/all-clusters-app/all-clusters-common/src/smco-stub.cpp ${chip_dir}/examples/all-clusters-app/all-clusters-common/src/static-supported-modes-manager.cpp ${chip_dir}/examples/all-clusters-app/all-clusters-common/src/static-supported-temperature-levels.cpp + ${chip_dir}/examples/all-clusters-app/all-clusters-common/src/operational-state-delegate-impl.cpp + ${chip_dir}/examples/all-clusters-app/all-clusters-common/src/rvc-operational-state-delegate-impl.cpp ${chip_dir}/examples/all-clusters-app/ameba/main/chipinterface.cpp ${chip_dir}/examples/all-clusters-app/ameba/main/BindingHandler.cpp ${chip_dir}/examples/all-clusters-app/ameba/main/DeviceCallbacks.cpp ${chip_dir}/examples/all-clusters-app/ameba/main/CHIPDeviceManager.cpp ${chip_dir}/examples/all-clusters-app/ameba/main/Globals.cpp ${chip_dir}/examples/all-clusters-app/ameba/main/LEDWidget.cpp - ${chip_dir}/examples/all-clusters-app/ameba/main/OperationalStateManager.cpp ${chip_dir}/examples/all-clusters-app/ameba/main/ManualOperationCommand.cpp ${chip_dir}/examples/all-clusters-app/ameba/main/SmokeCOAlarmManager.cpp diff --git a/examples/all-clusters-app/ameba/main/include/ManualOperationalStateCommand.h b/examples/all-clusters-app/ameba/main/include/ManualOperationalStateCommand.h index 5d4373597a2d00..fc2825576e6b72 100644 --- a/examples/all-clusters-app/ameba/main/include/ManualOperationalStateCommand.h +++ b/examples/all-clusters-app/ameba/main/include/ManualOperationalStateCommand.h @@ -18,7 +18,8 @@ #include "controller/InvokeInteraction.h" #include "controller/ReadInteraction.h" -#include +#include "operational-state-delegate-impl.h" +#include "rvc-operational-state-delegate-impl.h" #if CONFIG_ENABLE_CHIP_SHELL #include "lib/shell/Engine.h" diff --git a/examples/all-clusters-app/linux/BUILD.gn b/examples/all-clusters-app/linux/BUILD.gn index 8b031d769773e4..3b93e7605d5c65 100644 --- a/examples/all-clusters-app/linux/BUILD.gn +++ b/examples/all-clusters-app/linux/BUILD.gn @@ -39,6 +39,7 @@ source_set("chip-all-clusters-common") { "${chip_root}/examples/all-clusters-app/all-clusters-common/src/oven-modes.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/resource-monitoring-delegates.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/rvc-modes.cpp", + "${chip_root}/examples/all-clusters-app/all-clusters-common/src/rvc-operational-state-delegate-impl.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/smco-stub.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/static-supported-modes-manager.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/static-supported-temperature-levels.cpp", diff --git a/examples/all-clusters-app/linux/main-common.cpp b/examples/all-clusters-app/linux/main-common.cpp index 49ee513ca33f95..a3040c39d0d175 100644 --- a/examples/all-clusters-app/linux/main-common.cpp +++ b/examples/all-clusters-app/linux/main-common.cpp @@ -30,6 +30,7 @@ #include "oven-modes.h" #include "resource-monitoring-delegates.h" #include "rvc-modes.h" +#include "rvc-operational-state-delegate-impl.h" #include "tcc-mode.h" #include #include diff --git a/examples/rvc-app/rvc-common/include/rvc-operational-state-delegate.h b/examples/rvc-app/rvc-common/include/rvc-operational-state-delegate.h index d69843d6de8fb8..400dfd67910234 100644 --- a/examples/rvc-app/rvc-common/include/rvc-operational-state-delegate.h +++ b/examples/rvc-app/rvc-common/include/rvc-operational-state-delegate.h @@ -34,7 +34,7 @@ typedef void (RvcDevice::*HandleOpStateCommand)(Clusters::OperationalState::Gene namespace RvcOperationalState { // This is an application level delegate to handle operational state commands according to the specific business logic. -class RvcOperationalStateDelegate : public OperationalState::Delegate +class RvcOperationalStateDelegate : public RvcOperationalState::Delegate { private: const Clusters::OperationalState::GenericOperationalState mOperationalStateList[7] = { diff --git a/examples/rvc-app/rvc-common/rvc-app.matter b/examples/rvc-app/rvc-common/rvc-app.matter index b14fcf6720fa75..2579d7253054fb 100644 --- a/examples/rvc-app/rvc-common/rvc-app.matter +++ b/examples/rvc-app/rvc-common/rvc-app.matter @@ -1354,6 +1354,7 @@ endpoint 1 { handle command Pause; handle command Resume; handle command OperationalCommandResponse; + handle command GoHome; } } diff --git a/examples/rvc-app/rvc-common/rvc-app.zap b/examples/rvc-app/rvc-common/rvc-app.zap index 9f4f43bc793e3a..7519e3a2c0c488 100644 --- a/examples/rvc-app/rvc-common/rvc-app.zap +++ b/examples/rvc-app/rvc-common/rvc-app.zap @@ -17,6 +17,12 @@ } ], "package": [ + { + "pathRelativity": "relativeToZap", + "path": "../../../src/app/zap-templates/app-templates.json", + "type": "gen-templates-json", + "version": "chip-v1" + }, { "pathRelativity": "relativeToZap", "path": "../../../src/app/zap-templates/zcl/zcl.json", @@ -24,12 +30,6 @@ "category": "matter", "version": 1, "description": "Matter SDK ZCL data" - }, - { - "pathRelativity": "relativeToZap", - "path": "../../../src/app/zap-templates/app-templates.json", - "type": "gen-templates-json", - "version": "chip-v1" } ], "endpointTypes": [ @@ -2608,6 +2608,14 @@ "source": "server", "isIncoming": 0, "isEnabled": 1 + }, + { + "name": "GoHome", + "code": 128, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 } ], "attributes": [ diff --git a/src/app/clusters/operational-state-server/operational-state-server.cpp b/src/app/clusters/operational-state-server/operational-state-server.cpp index a76d14e20d350b..896cc0ca3856b6 100644 --- a/src/app/clusters/operational-state-server/operational-state-server.cpp +++ b/src/app/clusters/operational-state-server/operational-state-server.cpp @@ -263,6 +263,10 @@ void Instance::InvokeCommand(HandlerContext & handlerContext) HandleCommand(handlerContext, [this](HandlerContext & ctx, const auto & req) { HandleStopState(ctx, req); }); break; + default: + ChipLogDetail(Zcl, "OperationalState: Entering handling derived cluster commands"); + + InvokeDerivedClusterCommand(handlerContext); } } @@ -291,7 +295,6 @@ CHIP_ERROR Instance::Read(const ConcreteReadAttributePath & aPath, AttributeValu break; case OperationalState::Attributes::OperationalState::Id: { - ChipLogError(Zcl, "OperationalState: H1"); ReturnErrorOnFailure(aEncoder.Encode(GetCurrentOperationalState())); } break; @@ -460,3 +463,42 @@ bool RvcOperationalState::Instance::IsDerivedClusterStateResumeCompatible(uint8_ return (aState == to_underlying(RvcOperationalState::OperationalStateEnum::kCharging) || aState == to_underlying(RvcOperationalState::OperationalStateEnum::kDocked)); } + +// This function is called by the base operational state cluster when a command in the derived cluster number-space is received. +void RvcOperationalState::Instance::InvokeDerivedClusterCommand(chip::app::CommandHandlerInterface::HandlerContext & handlerContext) +{ + ChipLogDetail(Zcl, "RvcOperationalState: InvokeDerivedClusterCommand"); + switch (handlerContext.mRequestPath.mCommandId) + { + case RvcOperationalState::Commands::GoHome::Id: + ChipLogDetail(Zcl, "RvcOperationalState: Entering handling GoHome command"); + + CommandHandlerInterface::HandleCommand( + handlerContext, [this](HandlerContext & ctx, const auto & req) { HandleGoHomeCommand(ctx, req); }); + break; + } +} + +void RvcOperationalState::Instance::HandleGoHomeCommand(HandlerContext & ctx, const Commands::GoHome::DecodableType & req) +{ + ChipLogDetail(Zcl, "RvcOperationalState: HandleGoHomeCommand"); + + GenericOperationalError err(to_underlying(OperationalState::ErrorStateEnum::kNoError)); + uint8_t opState = GetCurrentOperationalState(); + + // Handle the case of the device being in an invalid state + if (opState == to_underlying(OperationalStateEnum::kCharging) || opState == to_underlying(OperationalStateEnum::kDocked)) + { + err.Set(to_underlying(OperationalState::ErrorStateEnum::kCommandInvalidInState)); + } + + if (err.errorStateID == 0 && opState != to_underlying(OperationalStateEnum::kSeekingCharger)) + { + mDelegate->HandleGoHomeCommandCallback(err); + } + + Commands::OperationalCommandResponse::Type response; + response.commandResponseState = err; + + ctx.mCommandHandler.AddResponse(ctx.mRequestPath, response); +} diff --git a/src/app/clusters/operational-state-server/operational-state-server.h b/src/app/clusters/operational-state-server/operational-state-server.h index ed0993ea7aed31..e4ab6d981ca75a 100644 --- a/src/app/clusters/operational-state-server/operational-state-server.h +++ b/src/app/clusters/operational-state-server/operational-state-server.h @@ -185,6 +185,14 @@ class Instance : public CommandHandlerInterface, public AttributeAccessInterface */ virtual bool IsDerivedClusterStateResumeCompatible(uint8_t aState) { return false; }; + /** + * Handles the invocation of derived cluster commands. + * If a derived cluster defines its own commands, this method SHALL be implemented by the derived cluster's class + * to handle the derived cluster's specific commands. + * @param handlerContext The command handler context containing information about the received command. + */ + virtual void InvokeDerivedClusterCommand(HandlerContext & handlerContext) { return; }; + private: Delegate * mDelegate; @@ -196,7 +204,13 @@ class Instance : public CommandHandlerInterface, public AttributeAccessInterface uint8_t mOperationalState = 0; // assume 0 for now. GenericOperationalError mOperationalError = to_underlying(ErrorStateEnum::kNoError); - // Inherited from CommandHandlerInterface + /** + * This method is inherited from CommandHandlerInterface. + * This reimplementation does not check that the cluster ID in the HandlerContext (the cluster the command relates to) + * matches the cluster ID of the RequestT type. + * These cluster IDs may be different in the case where a command defined in the base cluster is intended for a + * derived cluster. + */ template void HandleCommand(HandlerContext & handlerContext, FuncT func); @@ -324,6 +338,15 @@ class Delegate namespace RvcOperationalState { +class Delegate : public OperationalState::Delegate +{ +public: + virtual void HandleGoHomeCommandCallback(OperationalState::GenericOperationalError & err) + { + err.Set(to_underlying(OperationalState::ErrorStateEnum::kUnknownEnumValue)); + }; +}; + class Instance : public OperationalState::Instance { public: @@ -336,8 +359,8 @@ class Instance : public OperationalState::Instance * Note: the caller must ensure that the delegate lives throughout the instance's lifetime. * @param aEndpointId The endpoint on which this cluster exists. This must match the zap configuration. */ - Instance(OperationalState::Delegate * aDelegate, EndpointId aEndpointId) : - OperationalState::Instance(aDelegate, aEndpointId, Id) + Instance(Delegate * aDelegate, EndpointId aEndpointId) : + OperationalState::Instance(aDelegate, aEndpointId, Id), mDelegate(aDelegate) {} protected: @@ -356,6 +379,20 @@ class Instance : public OperationalState::Instance * @return true if aState is pause-compatible, false otherwise. */ bool IsDerivedClusterStateResumeCompatible(uint8_t aState) override; + + /** + * Handles the invocation of RvcOperationalState specific commands + * @param handlerContext The command handler context containing information about the received command. + */ + void InvokeDerivedClusterCommand(HandlerContext & handlerContext) override; + +private: + Delegate * mDelegate; + + /** + * Handle Command: GoHome + */ + void HandleGoHomeCommand(HandlerContext & ctx, const Commands::GoHome::DecodableType & req); }; } // namespace RvcOperationalState From acd7eacde97fae189cfca9af57ab98c19cd74b0a Mon Sep 17 00:00:00 2001 From: Jakub Latusek Date: Thu, 18 Jan 2024 17:35:20 +0100 Subject: [PATCH 07/25] Add default target to example projects (#31510) * Add default target to chip-shell * bridge-app fix * Add dependencies to default group for minimal-mdns --- examples/bridge-app/linux/BUILD.gn | 4 ++++ examples/minimal-mdns/BUILD.gn | 9 +++++++++ examples/shell/standalone/BUILD.gn | 4 ++++ 3 files changed, 17 insertions(+) diff --git a/examples/bridge-app/linux/BUILD.gn b/examples/bridge-app/linux/BUILD.gn index 3912e887a846be..490c59d17ad6b1 100644 --- a/examples/bridge-app/linux/BUILD.gn +++ b/examples/bridge-app/linux/BUILD.gn @@ -44,3 +44,7 @@ executable("chip-bridge-app") { group("linux") { deps = [ ":chip-bridge-app" ] } + +group("default") { + deps = [ ":chip-bridge-app" ] +} diff --git a/examples/minimal-mdns/BUILD.gn b/examples/minimal-mdns/BUILD.gn index a60dc611990b74..372f5598339168 100644 --- a/examples/minimal-mdns/BUILD.gn +++ b/examples/minimal-mdns/BUILD.gn @@ -76,3 +76,12 @@ executable("mdns-advertiser") { output_dir = root_out_dir } + +group("default") { + deps = [ + ":mdns-advertiser", + ":minimal-mdns-client", + ":minimal-mdns-example-common", + ":minimal-mdns-server", + ] +} diff --git a/examples/shell/standalone/BUILD.gn b/examples/shell/standalone/BUILD.gn index 0602af47bb691a..cfa97b10f7c63d 100644 --- a/examples/shell/standalone/BUILD.gn +++ b/examples/shell/standalone/BUILD.gn @@ -39,3 +39,7 @@ executable("chip-shell") { group("standalone") { deps = [ ":chip-shell" ] } + +group("default") { + deps = [ ":chip-shell" ] +} From 005813fc9f643506ca09eef7c2b37e7b4709f32e Mon Sep 17 00:00:00 2001 From: eahove Date: Thu, 18 Jan 2024 10:35:42 -0600 Subject: [PATCH 08/25] Remove the konOff feature (#31462) --- .../all-clusters-app/all-clusters-common/src/oven-modes.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/examples/all-clusters-app/all-clusters-common/src/oven-modes.cpp b/examples/all-clusters-app/all-clusters-common/src/oven-modes.cpp index 017f6b8eae2ac7..a3b8e4ac2a0761 100644 --- a/examples/all-clusters-app/all-clusters-common/src/oven-modes.cpp +++ b/examples/all-clusters-app/all-clusters-common/src/oven-modes.cpp @@ -101,7 +101,6 @@ void emberAfOvenModeClusterInitCallback(chip::EndpointId endpointId) VerifyOrDie(endpointId == 1); // this cluster is only enabled for endpoint 1. VerifyOrDie(gOvenModeDelegate == nullptr && gOvenModeInstance == nullptr); gOvenModeDelegate = new OvenMode::OvenModeDelegate; - gOvenModeInstance = - new ModeBase::Instance(gOvenModeDelegate, 0x1, OvenMode::Id, chip::to_underlying(OvenMode::Feature::kOnOff)); + gOvenModeInstance = new ModeBase::Instance(gOvenModeDelegate, 0x1, OvenMode::Id, 0x0); gOvenModeInstance->Init(); } From c83f8000618102de288a3109cc0eef88a673285a Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Thu, 18 Jan 2024 12:09:11 -0500 Subject: [PATCH 09/25] Fix android compile error: format strings differ between 32-bit and 64-bit (#31514) Co-authored-by: Andrei Litvin --- src/controller/java/CHIPDeviceController-JNI.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/controller/java/CHIPDeviceController-JNI.cpp b/src/controller/java/CHIPDeviceController-JNI.cpp index adde00b6cfb4a5..fd4b0303fdce4c 100644 --- a/src/controller/java/CHIPDeviceController-JNI.cpp +++ b/src/controller/java/CHIPDeviceController-JNI.cpp @@ -230,7 +230,8 @@ JNI_METHOD(jint, onNOCChainGeneration) if (jByteArrayIpk.byteSpan().size() != sizeof(ipkValue)) { - ChipLogError(Controller, "Invalid IPK size %ld and expect %ld", jByteArrayIpk.byteSpan().size(), sizeof(ipkValue)); + ChipLogError(Controller, "Invalid IPK size %u and expect %u", static_cast(jByteArrayIpk.byteSpan().size()), + static_cast(sizeof(ipkValue))); return CHIP_ERROR_INVALID_IPK.AsInteger(); } memcpy(&ipkValue[0], jByteArrayIpk.byteSpan().data(), jByteArrayIpk.byteSpan().size()); From 91d32888e9c2326f446ef778f58d157c6a9411ba Mon Sep 17 00:00:00 2001 From: eahove Date: Thu, 18 Jan 2024 11:27:53 -0600 Subject: [PATCH 10/25] Oven: adding OvenCavityOperationalState example (#30898) * Initial OpState work Adding oven op state Python regen Fixing alignment regenerate with oven device. regenerated zap and chiptool oven opState first pass builds and runs, but running tests results in a lot of failure messages. tentative updates based on RVC updated cluster name & fix build linux builds with oven mode update. remove duplicate ovencacvity Entries remove duplicate oven cavity entry Revert "remove duplicate ovencacvity Entries" This reverts commit 87e891ebcf342f6cb70e17c36e36c8370c2b9983. oven mode is responding appropriately cleanup for ovenMode regenerate zap Removing OvenMode related changes regen zap * Fix linter error * zap regen * rerun zap tool on data_model * Restyled by clang-format * CLEAN zap-regen-all * cleanup * cleanup: removing unneeded files. * Set err in commands, removed function definition for phases, returned NullNullable * Restyled by clang-format * regen zap * Update for changes in PR31176 * fix build errors * Restyled by clang-format * zap regen * zap regen * Cleanup * revert unimportant changes * regen zap * restore third_party to master * revert settings change * reverting whitespace changes. * regen zap * removing hard coded array size * fixed compiler error * cleaned all-clusters zap --------- Co-authored-by: abeck-riis <98488327+abeck-riis@users.noreply.github.com> Co-authored-by: Restyled.io Co-authored-by: OmAmbalkar <36728913+OmAmbalkar@users.noreply.github.com> --- .../all-clusters-app.matter | 87 +- .../all-clusters-common/all-clusters-app.zap | 3019 +- .../include/oven-operational-state-delegate.h | 118 + .../src/oven-operational-state-delegate.cpp | 73 + examples/all-clusters-app/linux/BUILD.gn | 1 + .../all-clusters-app/linux/main-common.cpp | 2 + src/app/common/templates/config-data.yaml | 1 + src/app/util/util.cpp | 1 + .../data_model/controller-clusters.zap | 270 +- .../chip/devicecontroller/ChipClusters.java | 40491 ---------------- .../app-common/zap-generated/callback.h | 24 - 11 files changed, 1978 insertions(+), 42109 deletions(-) create mode 100644 examples/all-clusters-app/all-clusters-common/include/oven-operational-state-delegate.h create mode 100644 examples/all-clusters-app/all-clusters-common/src/oven-operational-state-delegate.cpp delete mode 100644 src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java diff --git a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter index c003d8d439803f..d414bb98b2ed42 100644 --- a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter +++ b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter @@ -2592,6 +2592,72 @@ cluster BooleanState = 69 { readonly attribute int16u clusterRevision = 65533; } +/** This cluster supports remotely monitoring and, where supported, changing the operational state of an Oven. */ +provisional cluster OvenCavityOperationalState = 72 { + revision 1; + + enum ErrorStateEnum : enum8 { + kNoError = 0; + kUnableToStartOrResume = 1; + kUnableToCompleteOperation = 2; + kCommandInvalidInState = 3; + } + + enum OperationalStateEnum : enum8 { + kStopped = 0; + kRunning = 1; + kPaused = 2; + kError = 3; + } + + struct ErrorStateStruct { + enum8 errorStateID = 0; + optional char_string<64> errorStateLabel = 1; + optional char_string<64> errorStateDetails = 2; + } + + struct OperationalStateStruct { + enum8 operationalStateID = 0; + optional char_string<64> operationalStateLabel = 1; + } + + critical event OperationalError = 0 { + ErrorStateStruct errorState = 0; + } + + info event OperationCompletion = 1 { + enum8 completionErrorCode = 0; + optional nullable elapsed_s totalOperationalTime = 1; + optional nullable elapsed_s pausedTime = 2; + } + + readonly attribute nullable char_string phaseList[] = 0; + readonly attribute nullable int8u currentPhase = 1; + readonly attribute optional nullable elapsed_s countdownTime = 2; + readonly attribute OperationalStateStruct operationalStateList[] = 3; + readonly attribute OperationalStateEnum operationalState = 4; + readonly attribute ErrorStateStruct operationalError = 5; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + response struct OperationalCommandResponse = 4 { + ErrorStateStruct commandResponseState = 0; + } + + /** Upon receipt, the device SHALL pause its operation if it is possible based on the current function of the server. */ + command Pause(): OperationalCommandResponse = 0; + /** Upon receipt, the device SHALL stop its operation if it is at a position where it is safe to do so and/or permitted. */ + command Stop(): OperationalCommandResponse = 1; + /** Upon receipt, the device SHALL start its operation if it is safe to do so and the device is in an operational state from which it can be started. */ + command Start(): OperationalCommandResponse = 2; + /** Upon receipt, the device SHALL resume its operation from the point it was at when it received the Pause command, or from the point when it was paused by means outside of this cluster (for example by manual button press). */ + command Resume(): OperationalCommandResponse = 3; +} + /** Attributes and commands for selecting a mode from a list of supported options. */ provisional cluster OvenMode = 73 { revision 1; @@ -7533,6 +7599,20 @@ endpoint 1 { ram attribute clusterRevision default = 1; } + server cluster OvenCavityOperationalState { + callback attribute phaseList; + callback attribute currentPhase; + callback attribute operationalStateList; + callback attribute operationalState; + callback attribute operationalError; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + server cluster OvenMode { callback attribute supportedModes; ram attribute currentMode; @@ -8105,13 +8185,6 @@ endpoint 1 { ram attribute clusterRevision default = 6; handle command SetpointRaiseLower; - handle command SetActiveScheduleRequest; - handle command SetActivePresetRequest; - handle command StartPresetsSchedulesEditRequest; - handle command CancelPresetsSchedulesEditRequest; - handle command CommitPresetsSchedulesRequest; - handle command CancelSetActivePresetRequest; - handle command SetTemperatureSetpointHoldPolicy; } server cluster FanControl { diff --git a/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap b/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap index 45499b5d44ce3e..258626061215d7 100644 --- a/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap +++ b/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap @@ -17,6 +17,12 @@ } ], "package": [ + { + "pathRelativity": "relativeToZap", + "path": "../../../src/app/zap-templates/app-templates.json", + "type": "gen-templates-json", + "version": "chip-v1" + }, { "pathRelativity": "relativeToZap", "path": "../../../src/app/zap-templates/zcl/zcl-with-test-extensions.json", @@ -24,12 +30,6 @@ "category": "matter", "version": 1, "description": "Matter SDK ZCL data with some extensions" - }, - { - "pathRelativity": "relativeToZap", - "path": "../../../src/app/zap-templates/app-templates.json", - "type": "gen-templates-json", - "version": "chip-v1" } ], "endpointTypes": [ @@ -6512,120 +6512,107 @@ ] }, { - "name": "Scenes Management", - "code": 98, + "name": "On/Off", + "code": 6, "mfgCode": null, - "define": "SCENES_CLUSTER", - "side": "server", + "define": "ON_OFF_CLUSTER", + "side": "client", "enabled": 1, - "apiMaturity": "provisional", "commands": [ { - "name": "AddScene", + "name": "Off", "code": 0, "mfgCode": null, "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "AddSceneResponse", - "code": 0, - "mfgCode": null, - "source": "server", "isIncoming": 0, "isEnabled": 1 }, { - "name": "ViewScene", + "name": "On", "code": 1, "mfgCode": null, "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "ViewSceneResponse", - "code": 1, - "mfgCode": null, - "source": "server", "isIncoming": 0, "isEnabled": 1 }, { - "name": "RemoveScene", + "name": "Toggle", "code": 2, "mfgCode": null, "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "RemoveSceneResponse", - "code": 2, - "mfgCode": null, - "source": "server", "isIncoming": 0, "isEnabled": 1 - }, + } + ], + "attributes": [ { - "name": "RemoveAllScenes", - "code": 3, + "name": "FeatureMap", + "code": 65532, "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 }, { - "name": "RemoveAllScenesResponse", - "code": 3, + "name": "ClusterRevision", + "code": 65533, "mfgCode": null, - "source": "server", - "isIncoming": 0, - "isEnabled": 1 - }, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "5", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "On/Off", + "code": 6, + "mfgCode": null, + "define": "ON_OFF_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ { - "name": "StoreScene", - "code": 4, + "name": "Off", + "code": 0, "mfgCode": null, "source": "client", "isIncoming": 1, "isEnabled": 1 }, { - "name": "StoreSceneResponse", - "code": 4, - "mfgCode": null, - "source": "server", - "isIncoming": 0, - "isEnabled": 1 - }, - { - "name": "RecallScene", - "code": 5, + "name": "On", + "code": 1, "mfgCode": null, "source": "client", "isIncoming": 1, "isEnabled": 1 }, { - "name": "GetSceneMembership", - "code": 6, + "name": "Toggle", + "code": 2, "mfgCode": null, "source": "client", "isIncoming": 1, "isEnabled": 1 }, { - "name": "GetSceneMembershipResponse", - "code": 6, - "mfgCode": null, - "source": "server", - "isIncoming": 0, - "isEnabled": 1 - }, - { - "name": "EnhancedAddScene", + "name": "OffWithEffect", "code": 64, "mfgCode": null, "source": "client", @@ -6633,15 +6620,7 @@ "isEnabled": 1 }, { - "name": "EnhancedAddSceneResponse", - "code": 64, - "mfgCode": null, - "source": "server", - "isIncoming": 0, - "isEnabled": 1 - }, - { - "name": "EnhancedViewScene", + "name": "OnWithRecallGlobalScene", "code": 65, "mfgCode": null, "source": "client", @@ -6649,66 +6628,66 @@ "isEnabled": 1 }, { - "name": "EnhancedViewSceneResponse", - "code": 65, - "mfgCode": null, - "source": "server", - "isIncoming": 0, - "isEnabled": 1 - }, - { - "name": "CopyScene", + "name": "OnWithTimedOff", "code": 66, "mfgCode": null, "source": "client", "isIncoming": 1, "isEnabled": 1 - }, - { - "name": "CopySceneResponse", - "code": 66, - "mfgCode": null, - "source": "server", - "isIncoming": 0, - "isEnabled": 1 } ], "attributes": [ { - "name": "NameSupport", - "code": 4, + "name": "OnOff", + "code": 0, "mfgCode": null, "side": "server", - "type": "NameSupportBitmap", + "type": "boolean", + "included": 1, + "storageOption": "NVM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "GlobalSceneControl", + "code": 16384, + "mfgCode": null, + "side": "server", + "type": "boolean", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x80", + "defaultValue": "0x01", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "LastConfiguredBy", - "code": 5, + "name": "OnTime", + "code": 16385, "mfgCode": null, "side": "server", - "type": "node_id", + "type": "int16u", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0x0000", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { - "name": "SceneTableSize", - "code": 6, + "name": "OffWaitTime", + "code": 16386, "mfgCode": null, "side": "server", "type": "int16u", @@ -6716,26 +6695,26 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "16", + "defaultValue": "0x0000", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { - "name": "FabricSceneInfo", - "code": 7, + "name": "StartUpOnOff", + "code": 16387, "mfgCode": null, "side": "server", - "type": "array", + "type": "StartUpOnOffEnum", "included": 1, - "storageOption": "External", + "storageOption": "NVM", "singleton": 0, "bounded": 0, - "defaultValue": null, + "defaultValue": "0xFF", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { @@ -6812,10 +6791,10 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "15", + "defaultValue": "0x0001", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { @@ -6837,44 +6816,51 @@ ] }, { - "name": "On/Off", - "code": 6, + "name": "On/off Switch Configuration", + "code": 7, "mfgCode": null, - "define": "ON_OFF_CLUSTER", - "side": "client", + "define": "ON_OFF_SWITCH_CONFIGURATION_CLUSTER", + "side": "server", "enabled": 1, - "commands": [ + "apiMaturity": "deprecated", + "attributes": [ { - "name": "Off", + "name": "switch type", "code": 0, "mfgCode": null, - "source": "client", - "isIncoming": 0, - "isEnabled": 1 + "side": "server", + "type": "enum8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 }, { - "name": "On", - "code": 1, + "name": "switch actions", + "code": 16, "mfgCode": null, - "source": "client", - "isIncoming": 0, - "isEnabled": 1 + "side": "server", + "type": "enum8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 }, - { - "name": "Toggle", - "code": 2, - "mfgCode": null, - "source": "client", - "isIncoming": 0, - "isEnabled": 1 - } - ], - "attributes": [ { "name": "FeatureMap", "code": 65532, "mfgCode": null, - "side": "client", + "side": "server", "type": "bitmap32", "included": 1, "storageOption": "RAM", @@ -6890,13 +6876,13 @@ "name": "ClusterRevision", "code": 65533, "mfgCode": null, - "side": "client", + "side": "server", "type": "int16u", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "1", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -6905,15 +6891,15 @@ ] }, { - "name": "On/Off", - "code": 6, + "name": "Level Control", + "code": 8, "mfgCode": null, - "define": "ON_OFF_CLUSTER", + "define": "LEVEL_CONTROL_CLUSTER", "side": "server", "enabled": 1, "commands": [ { - "name": "Off", + "name": "MoveToLevel", "code": 0, "mfgCode": null, "source": "client", @@ -6921,7 +6907,7 @@ "isEnabled": 1 }, { - "name": "On", + "name": "Move", "code": 1, "mfgCode": null, "source": "client", @@ -6929,7 +6915,7 @@ "isEnabled": 1 }, { - "name": "Toggle", + "name": "Step", "code": 2, "mfgCode": null, "source": "client", @@ -6937,24 +6923,40 @@ "isEnabled": 1 }, { - "name": "OffWithEffect", - "code": 64, + "name": "Stop", + "code": 3, "mfgCode": null, "source": "client", "isIncoming": 1, "isEnabled": 1 }, { - "name": "OnWithRecallGlobalScene", - "code": 65, + "name": "MoveToLevelWithOnOff", + "code": 4, "mfgCode": null, "source": "client", "isIncoming": 1, "isEnabled": 1 }, { - "name": "OnWithTimedOff", - "code": 66, + "name": "MoveWithOnOff", + "code": 5, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "StepWithOnOff", + "code": 6, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "StopWithOnOff", + "code": 7, "mfgCode": null, "source": "client", "isIncoming": 1, @@ -6963,168 +6965,168 @@ ], "attributes": [ { - "name": "OnOff", + "name": "CurrentLevel", "code": 0, "mfgCode": null, "side": "server", - "type": "boolean", + "type": "int8u", "included": 1, "storageOption": "NVM", "singleton": 0, "bounded": 0, - "defaultValue": "0x00", + "defaultValue": "0xFE", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "GlobalSceneControl", - "code": 16384, + "name": "RemainingTime", + "code": 1, "mfgCode": null, "side": "server", - "type": "boolean", + "type": "int16u", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x01", + "defaultValue": "0x0000", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "OnTime", - "code": 16385, + "name": "MinLevel", + "code": 2, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "int8u", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "0x01", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "OffWaitTime", - "code": 16386, + "name": "MaxLevel", + "code": 3, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "int8u", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "0xFE", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "StartUpOnOff", - "code": 16387, + "name": "CurrentFrequency", + "code": 4, "mfgCode": null, "side": "server", - "type": "StartUpOnOffEnum", + "type": "int16u", "included": 1, - "storageOption": "NVM", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0xFF", + "defaultValue": "0x0000", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "GeneratedCommandList", - "code": 65528, + "name": "MinFrequency", + "code": 5, "mfgCode": null, "side": "server", - "type": "array", + "type": "int16u", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": null, + "defaultValue": "0x0000", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "AcceptedCommandList", - "code": 65529, + "name": "MaxFrequency", + "code": 6, "mfgCode": null, "side": "server", - "type": "array", + "type": "int16u", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": null, + "defaultValue": "0x0000", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "EventList", - "code": 65530, + "name": "Options", + "code": 15, "mfgCode": null, "side": "server", - "type": "array", + "type": "OptionsBitmap", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": null, + "defaultValue": "0x00", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { - "name": "AttributeList", - "code": 65531, + "name": "OnOffTransitionTime", + "code": 16, "mfgCode": null, "side": "server", - "type": "array", + "type": "int16u", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": null, + "defaultValue": "0x0000", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "FeatureMap", - "code": 65532, + "name": "OnLevel", + "code": 17, "mfgCode": null, "side": "server", - "type": "bitmap32", + "type": "int8u", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x0001", + "defaultValue": "0xFF", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "ClusterRevision", - "code": 65533, + "name": "OnTransitionTime", + "code": 18, "mfgCode": null, "side": "server", "type": "int16u", @@ -7132,50 +7134,55 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 - } - ] - }, - { - "name": "On/off Switch Configuration", - "code": 7, - "mfgCode": null, - "define": "ON_OFF_SWITCH_CONFIGURATION_CLUSTER", - "side": "server", - "enabled": 1, - "apiMaturity": "deprecated", - "attributes": [ + }, { - "name": "switch type", - "code": 0, + "name": "OffTransitionTime", + "code": 19, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "int16u", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "switch actions", - "code": 16, + "name": "DefaultMoveRate", + "code": 20, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "int8u", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x00", + "defaultValue": "50", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "StartUpCurrentLevel", + "code": 16384, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "NVM", + "singleton": 0, + "bounded": 0, + "defaultValue": "255", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -7191,7 +7198,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "3", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -7207,7 +7214,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "5", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -7216,146 +7223,81 @@ ] }, { - "name": "Level Control", - "code": 8, + "name": "Binary Input (Basic)", + "code": 15, "mfgCode": null, - "define": "LEVEL_CONTROL_CLUSTER", + "define": "BINARY_INPUT_BASIC_CLUSTER", "side": "server", "enabled": 1, - "commands": [ + "apiMaturity": "deprecated", + "attributes": [ { - "name": "MoveToLevel", - "code": 0, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "Move", - "code": 1, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "Step", - "code": 2, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "Stop", - "code": 3, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "MoveToLevelWithOnOff", - "code": 4, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "MoveWithOnOff", - "code": 5, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "StepWithOnOff", - "code": 6, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "StopWithOnOff", - "code": 7, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - } - ], - "attributes": [ - { - "name": "CurrentLevel", - "code": 0, + "name": "out of service", + "code": 81, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "boolean", "included": 1, - "storageOption": "NVM", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0xFE", + "defaultValue": "0x00", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "RemainingTime", - "code": 1, + "name": "present value", + "code": 85, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "boolean", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "MinLevel", - "code": 2, + "name": "status flags", + "code": 111, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "bitmap8", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x01", + "defaultValue": "0x00", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { - "name": "MaxLevel", - "code": 3, + "name": "FeatureMap", + "code": 65532, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "bitmap32", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0xFE", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "CurrentFrequency", - "code": 4, + "name": "ClusterRevision", + "code": 65533, "mfgCode": null, "side": "server", "type": "int16u", @@ -7363,154 +7305,164 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "1", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 - }, + } + ] + }, + { + "name": "Descriptor", + "code": 29, + "mfgCode": null, + "define": "DESCRIPTOR_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ { - "name": "MinFrequency", - "code": 5, + "name": "DeviceTypeList", + "code": 0, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": null, "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { - "name": "MaxFrequency", - "code": 6, + "name": "ServerList", + "code": 1, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": null, "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { - "name": "Options", - "code": 15, + "name": "ClientList", + "code": 2, "mfgCode": null, "side": "server", - "type": "OptionsBitmap", + "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x00", + "defaultValue": null, "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "OnOffTransitionTime", - "code": 16, + "name": "PartsList", + "code": 3, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": null, "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { - "name": "OnLevel", - "code": 17, + "name": "TagList", + "code": 4, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0xFF", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "OnTransitionTime", - "code": 18, + "name": "GeneratedCommandList", + "code": 65528, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "OffTransitionTime", - "code": 19, + "name": "AcceptedCommandList", + "code": 65529, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "DefaultMoveRate", - "code": 20, + "name": "EventList", + "code": 65530, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "50", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "StartUpCurrentLevel", - "code": 16384, + "name": "AttributeList", + "code": 65531, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "array", "included": 1, - "storageOption": "NVM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "255", + "defaultValue": null, "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { @@ -7523,7 +7475,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "3", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -7536,10 +7488,10 @@ "side": "server", "type": "int16u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": null, "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -7548,57 +7500,114 @@ ] }, { - "name": "Binary Input (Basic)", - "code": 15, + "name": "Binding", + "code": 30, "mfgCode": null, - "define": "BINARY_INPUT_BASIC_CLUSTER", + "define": "BINDING_CLUSTER", "side": "server", "enabled": 1, - "apiMaturity": "deprecated", "attributes": [ { - "name": "out of service", - "code": 81, + "name": "Binding", + "code": 0, "mfgCode": null, "side": "server", - "type": "boolean", + "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x00", + "defaultValue": null, "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "present value", - "code": 85, - "mfgCode": null, + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, "side": "server", - "type": "boolean", + "type": "bitmap32", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Actions", + "code": 37, + "mfgCode": null, + "define": "ACTIONS_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "ActionList", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "status flags", - "code": 111, + "name": "EndpointLists", + "code": 1, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x00", + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SetupURL", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "long_char_string", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -7627,7 +7636,7 @@ "side": "server", "type": "int16u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -7639,80 +7648,112 @@ ] }, { - "name": "Descriptor", - "code": 29, + "name": "Power Source", + "code": 47, "mfgCode": null, - "define": "DESCRIPTOR_CLUSTER", + "define": "POWER_SOURCE_CLUSTER", "side": "server", "enabled": 1, "attributes": [ { - "name": "DeviceTypeList", + "name": "Status", "code": 0, "mfgCode": null, "side": "server", - "type": "array", + "type": "PowerSourceStatusEnum", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": null, + "defaultValue": "0", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "ServerList", + "name": "Order", "code": 1, "mfgCode": null, "side": "server", - "type": "array", + "type": "int8u", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": null, + "defaultValue": "2", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "ClientList", + "name": "Description", "code": 2, "mfgCode": null, "side": "server", - "type": "array", + "type": "char_string", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": null, + "defaultValue": "B2", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "PartsList", - "code": 3, + "name": "BatChargeLevel", + "code": 14, "mfgCode": null, "side": "server", - "type": "array", + "type": "BatChargeLevelEnum", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": null, + "defaultValue": "0", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "TagList", - "code": 4, + "name": "BatReplacementNeeded", + "code": 15, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BatReplaceability", + "code": 16, + "mfgCode": null, + "side": "server", + "type": "BatReplaceabilityEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EndpointList", + "code": 31, "mfgCode": null, "side": "server", "type": "array", @@ -7800,7 +7841,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "2", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -7813,39 +7854,64 @@ "side": "server", "type": "int16u", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": null, + "defaultValue": "2", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 } + ], + "events": [ + { + "name": "BatFaultChange", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1 + } ] }, { - "name": "Binding", - "code": 30, + "name": "Switch", + "code": 59, "mfgCode": null, - "define": "BINDING_CLUSTER", + "define": "SWITCH_CLUSTER", "side": "server", "enabled": 1, "attributes": [ { - "name": "Binding", + "name": "NumberOfPositions", "code": 0, "mfgCode": null, "side": "server", - "type": "array", + "type": "int8u", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": null, + "defaultValue": "2", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CurrentPosition", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { @@ -7858,10 +7924,10 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "1", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { @@ -7880,18 +7946,27 @@ "maxInterval": 65344, "reportableChange": 0 } + ], + "events": [ + { + "name": "SwitchLatched", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1 + } ] }, { - "name": "Actions", - "code": 37, + "name": "Fixed Label", + "code": 64, "mfgCode": null, - "define": "ACTIONS_CLUSTER", + "define": "FIXED_LABEL_CLUSTER", "side": "server", "enabled": 1, "attributes": [ { - "name": "ActionList", + "name": "LabelList", "code": 0, "mfgCode": null, "side": "server", @@ -7907,43 +7982,69 @@ "reportableChange": 0 }, { - "name": "EndpointLists", - "code": 1, + "name": "FeatureMap", + "code": 65532, "mfgCode": null, "side": "server", - "type": "array", + "type": "bitmap32", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": null, + "defaultValue": "0", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "SetupURL", - "code": 2, + "name": "ClusterRevision", + "code": 65533, "mfgCode": null, "side": "server", - "type": "long_char_string", + "type": "int16u", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "1", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", + } + ] + }, + { + "name": "User Label", + "code": 65, + "mfgCode": null, + "define": "USER_LABEL_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "LabelList", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -7961,97 +8062,124 @@ "side": "server", "type": "int16u", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, "defaultValue": "1", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 } ] }, { - "name": "Power Source", - "code": 47, + "name": "Boolean State", + "code": 69, "mfgCode": null, - "define": "POWER_SOURCE_CLUSTER", + "define": "BOOLEAN_STATE_CLUSTER", "side": "server", "enabled": 1, "attributes": [ { - "name": "Status", + "name": "StateValue", "code": 0, "mfgCode": null, "side": "server", - "type": "PowerSourceStatusEnum", + "type": "boolean", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, "defaultValue": "0", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "Order", - "code": 1, + "name": "FeatureMap", + "code": 65532, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "bitmap32", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "2", + "defaultValue": "0", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "Description", - "code": 2, + "name": "ClusterRevision", + "code": 65533, "mfgCode": null, "side": "server", - "type": "char_string", + "type": "int16u", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "B2", + "defaultValue": "1", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Oven Cavity Operational State", + "code": 72, + "mfgCode": null, + "define": "OPERATIONAL_STATE_OVEN_CLUSTER", + "side": "server", + "enabled": 1, + "apiMaturity": "provisional", + "attributes": [ + { + "name": "PhaseList", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "BatChargeLevel", - "code": 14, + "name": "CurrentPhase", + "code": 1, "mfgCode": null, "side": "server", - "type": "BatChargeLevelEnum", + "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "BatReplacementNeeded", - "code": 15, + "name": "OperationalStateList", + "code": 3, "mfgCode": null, "side": "server", - "type": "boolean", + "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -8061,13 +8189,13 @@ "reportableChange": 0 }, { - "name": "BatReplaceability", - "code": 16, + "name": "OperationalState", + "code": 4, "mfgCode": null, "side": "server", - "type": "BatReplaceabilityEnum", + "type": "OperationalStateEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -8077,16 +8205,16 @@ "reportableChange": 0 }, { - "name": "EndpointList", - "code": 31, + "name": "OperationalError", + "code": 5, "mfgCode": null, "side": "server", - "type": "array", + "type": "ErrorStateStruct", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": null, + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -8102,7 +8230,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": null, + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -8118,7 +8246,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": null, + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -8134,7 +8262,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": null, + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -8150,7 +8278,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": null, + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -8166,7 +8294,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "2", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -8182,49 +8310,41 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "2", + "defaultValue": "1", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 } - ], - "events": [ - { - "name": "BatFaultChange", - "code": 1, - "mfgCode": null, - "side": "server", - "included": 1 - } ] }, { - "name": "Switch", - "code": 59, + "name": "Oven Mode", + "code": 73, "mfgCode": null, - "define": "SWITCH_CLUSTER", + "define": "OVEN_MODE_CLUSTER", "side": "server", "enabled": 1, + "apiMaturity": "provisional", "attributes": [ { - "name": "NumberOfPositions", + "name": "SupportedModes", "code": 0, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "2", + "defaultValue": null, "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "CurrentPosition", + "name": "CurrentMode", "code": 1, "mfgCode": null, "side": "server", @@ -8235,64 +8355,61 @@ "bounded": 0, "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "FeatureMap", - "code": 65532, + "name": "GeneratedCommandList", + "code": 65528, "mfgCode": null, "side": "server", - "type": "bitmap32", + "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": null, "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "ClusterRevision", - "code": 65533, + "name": "AcceptedCommandList", + "code": 65529, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": null, "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 - } - ], - "events": [ + }, { - "name": "SwitchLatched", - "code": 0, + "name": "EventList", + "code": 65530, "mfgCode": null, "side": "server", - "included": 1 - } - ] - }, - { - "name": "Fixed Label", - "code": 64, - "mfgCode": null, - "define": "FIXED_LABEL_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { - "name": "LabelList", - "code": 0, + "name": "AttributeList", + "code": 65531, "mfgCode": null, "side": "server", "type": "array", @@ -8302,263 +8419,8 @@ "bounded": 0, "defaultValue": null, "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "User Label", - "code": 65, - "mfgCode": null, - "define": "USER_LABEL_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ - { - "name": "LabelList", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "Boolean State", - "code": 69, - "mfgCode": null, - "define": "BOOLEAN_STATE_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ - { - "name": "StateValue", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "boolean", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "Oven Mode", - "code": 73, - "mfgCode": null, - "define": "OVEN_MODE_CLUSTER", - "side": "server", - "enabled": 1, - "apiMaturity": "provisional", - "attributes": [ - { - "name": "SupportedModes", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "CurrentMode", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "GeneratedCommandList", - "code": 65528, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AcceptedCommandList", - "code": 65529, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "EventList", - "code": 65530, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AttributeList", - "code": 65531, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { @@ -11468,93 +11330,222 @@ ] }, { - "name": "HEPA Filter Monitoring", - "code": 113, + "name": "Scenes Management", + "code": 98, "mfgCode": null, - "define": "HEPA_FILTER_MONITORING_CLUSTER", + "define": "SCENES_CLUSTER", "side": "server", "enabled": 1, + "apiMaturity": "provisional", "commands": [ { - "name": "ResetCondition", + "name": "AddScene", "code": 0, "mfgCode": null, "source": "client", "isIncoming": 1, "isEnabled": 1 - } - ], - "attributes": [ + }, { - "name": "Condition", + "name": "AddSceneResponse", "code": 0, "mfgCode": null, - "side": "server", - "type": "percent", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 + "source": "server", + "isIncoming": 0, + "isEnabled": 1 }, { - "name": "DegradationDirection", + "name": "ViewScene", + "code": 1, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "ViewSceneResponse", "code": 1, "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "RemoveScene", + "code": 2, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "RemoveSceneResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "RemoveAllScenes", + "code": 3, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "RemoveAllScenesResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "StoreScene", + "code": 4, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "StoreSceneResponse", + "code": 4, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "RecallScene", + "code": 5, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "GetSceneMembership", + "code": 6, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "GetSceneMembershipResponse", + "code": 6, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "EnhancedAddScene", + "code": 64, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "EnhancedAddSceneResponse", + "code": 64, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "EnhancedViewScene", + "code": 65, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "EnhancedViewSceneResponse", + "code": 65, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "CopyScene", + "code": 66, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "CopySceneResponse", + "code": 66, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "NameSupport", + "code": 4, + "mfgCode": null, "side": "server", - "type": "DegradationDirectionEnum", + "type": "NameSupportBitmap", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": null, + "defaultValue": "0x80", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { - "name": "ChangeIndication", - "code": 2, + "name": "LastConfiguredBy", + "code": 5, "mfgCode": null, "side": "server", - "type": "ChangeIndicationEnum", + "type": "node_id", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": null, + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "InPlaceIndicator", - "code": 3, + "name": "SceneTableSize", + "code": 6, "mfgCode": null, "side": "server", - "type": "boolean", + "type": "int16u", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": null, + "defaultValue": "16", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "LastChangedTime", - "code": 4, + "name": "FabricSceneInfo", + "code": 7, "mfgCode": null, "side": "server", - "type": "epoch_s", + "type": "array", "included": 1, "storageOption": "External", "singleton": 0, @@ -11566,8 +11557,8 @@ "reportableChange": 0 }, { - "name": "ReplacementProductList", - "code": 5, + "name": "GeneratedCommandList", + "code": 65528, "mfgCode": null, "side": "server", "type": "array", @@ -11582,8 +11573,8 @@ "reportableChange": 0 }, { - "name": "GeneratedCommandList", - "code": 65528, + "name": "AcceptedCommandList", + "code": 65529, "mfgCode": null, "side": "server", "type": "array", @@ -11598,8 +11589,8 @@ "reportableChange": 0 }, { - "name": "AcceptedCommandList", - "code": 65529, + "name": "EventList", + "code": 65530, "mfgCode": null, "side": "server", "type": "array", @@ -11636,10 +11627,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": null, + "defaultValue": "15", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -11655,19 +11646,19 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "5", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 } ] }, { - "name": "Activated Carbon Filter Monitoring", - "code": 114, + "name": "HEPA Filter Monitoring", + "code": 113, "mfgCode": null, - "define": "ACTIVATED_CARBON_FILTER_MONITORING_CLUSTER", + "define": "HEPA_FILTER_MONITORING_CLUSTER", "side": "server", "enabled": 1, "commands": [ @@ -11860,50 +11851,246 @@ ] }, { - "name": "Boolean State Configuration", - "code": 128, + "name": "Activated Carbon Filter Monitoring", + "code": 114, "mfgCode": null, - "define": "BOOLEAN_STATE_CONFIGURATION_CLUSTER", + "define": "ACTIVATED_CARBON_FILTER_MONITORING_CLUSTER", "side": "server", "enabled": 1, - "apiMaturity": "provisional", "commands": [ { - "name": "SuppressAlarm", + "name": "ResetCondition", "code": 0, "mfgCode": null, "source": "client", "isIncoming": 1, "isEnabled": 1 - }, - { - "name": "EnableDisableAlarm", - "code": 1, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 } ], "attributes": [ { - "name": "CurrentSensitivityLevel", + "name": "Condition", "code": 0, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "percent", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "2", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "SupportedSensitivityLevels", + "name": "DegradationDirection", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "DegradationDirectionEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ChangeIndication", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "ChangeIndicationEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "InPlaceIndicator", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LastChangedTime", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "epoch_s", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ReplacementProductList", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Boolean State Configuration", + "code": 128, + "mfgCode": null, + "define": "BOOLEAN_STATE_CONFIGURATION_CLUSTER", + "side": "server", + "enabled": 1, + "apiMaturity": "provisional", + "commands": [ + { + "name": "SuppressAlarm", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "EnableDisableAlarm", + "code": 1, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "CurrentSensitivityLevel", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportedSensitivityLevels", "code": 1, "mfgCode": null, "side": "server", @@ -14578,131 +14765,59 @@ "source": "client", "isIncoming": 1, "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "LocalTemperature", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "temperature", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 }, { - "name": "GetRelayStatusLogResponse", - "code": 1, + "name": "AbsMinHeatSetpointLimit", + "code": 3, "mfgCode": null, - "source": "server", - "isIncoming": 0, - "isEnabled": 0 + "side": "server", + "type": "temperature", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x02BC", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 }, { - "name": "GetRelayStatusLog", + "name": "AbsMaxHeatSetpointLimit", "code": 4, "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 0 + "side": "server", + "type": "temperature", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0BB8", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 }, { - "name": "SetActiveScheduleRequest", - "code": 5, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 0 - }, - { - "name": "SetActivePresetRequest", - "code": 6, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 0 - }, - { - "name": "StartPresetsSchedulesEditRequest", - "code": 7, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 0 - }, - { - "name": "CancelPresetsSchedulesEditRequest", - "code": 8, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 0 - }, - { - "name": "CommitPresetsSchedulesRequest", - "code": 9, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 0 - }, - { - "name": "CancelSetActivePresetRequest", - "code": 10, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 0 - }, - { - "name": "SetTemperatureSetpointHoldPolicy", - "code": 11, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 0 - } - ], - "attributes": [ - { - "name": "LocalTemperature", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "temperature", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "AbsMinHeatSetpointLimit", - "code": 3, - "mfgCode": null, - "side": "server", - "type": "temperature", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x02BC", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "AbsMaxHeatSetpointLimit", - "code": 4, - "mfgCode": null, - "side": "server", - "type": "temperature", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0BB8", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "AbsMinCoolSetpointLimit", + "name": "AbsMinCoolSetpointLimit", "code": 5, "mfgCode": null, "side": "server", @@ -22312,367 +22427,42 @@ "name": "RemoveGroupResponse", "code": 3, "mfgCode": null, - "source": "server", - "isIncoming": 0, - "isEnabled": 1 - }, - { - "name": "RemoveAllGroups", - "code": 4, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "AddGroupIfIdentifying", - "code": 5, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - } - ], - "attributes": [ - { - "name": "NameSupport", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "NameSupportBitmap", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "GeneratedCommandList", - "code": 65528, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AcceptedCommandList", - "code": 65529, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "EventList", - "code": 65530, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AttributeList", - "code": 65531, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "4", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Scenes Management", - "code": 98, - "mfgCode": null, - "define": "SCENES_CLUSTER", - "side": "server", - "enabled": 1, - "apiMaturity": "provisional", - "commands": [ - { - "name": "AddScene", - "code": 0, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "AddSceneResponse", - "code": 0, - "mfgCode": null, - "source": "server", - "isIncoming": 0, - "isEnabled": 1 - }, - { - "name": "ViewScene", - "code": 1, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "ViewSceneResponse", - "code": 1, - "mfgCode": null, - "source": "server", - "isIncoming": 0, - "isEnabled": 1 - }, - { - "name": "RemoveScene", - "code": 2, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "RemoveSceneResponse", - "code": 2, - "mfgCode": null, - "source": "server", - "isIncoming": 0, - "isEnabled": 1 - }, - { - "name": "RemoveAllScenes", - "code": 3, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "RemoveAllScenesResponse", - "code": 3, - "mfgCode": null, - "source": "server", - "isIncoming": 0, - "isEnabled": 1 - }, - { - "name": "StoreScene", - "code": 4, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "StoreSceneResponse", - "code": 4, - "mfgCode": null, - "source": "server", - "isIncoming": 0, - "isEnabled": 1 - }, - { - "name": "RecallScene", - "code": 5, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "GetSceneMembership", - "code": 6, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "GetSceneMembershipResponse", - "code": 6, - "mfgCode": null, - "source": "server", - "isIncoming": 0, - "isEnabled": 1 - }, - { - "name": "EnhancedAddScene", - "code": 64, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "EnhancedAddSceneResponse", - "code": 64, - "mfgCode": null, - "source": "server", - "isIncoming": 0, - "isEnabled": 1 - }, - { - "name": "EnhancedViewScene", - "code": 65, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "EnhancedViewSceneResponse", - "code": 65, - "mfgCode": null, - "source": "server", - "isIncoming": 0, - "isEnabled": 1 - }, - { - "name": "CopyScene", - "code": 66, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "CopySceneResponse", - "code": 66, - "mfgCode": null, - "source": "server", - "isIncoming": 0, - "isEnabled": 1 - } - ], - "attributes": [ - { - "name": "NameSupport", - "code": 4, - "mfgCode": null, - "side": "server", - "type": "NameSupportBitmap", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x80", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "LastConfiguredBy", - "code": 5, - "mfgCode": null, - "side": "server", - "type": "node_id", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "SceneTableSize", - "code": 6, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "16", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 + "source": "server", + "isIncoming": 0, + "isEnabled": 1 }, { - "name": "FabricSceneInfo", - "code": 7, + "name": "RemoveAllGroups", + "code": 4, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "AddGroupIfIdentifying", + "code": 5, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "NameSupport", + "code": 0, "mfgCode": null, "side": "server", - "type": "array", + "type": "NameSupportBitmap", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": null, + "defaultValue": "", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { @@ -22749,7 +22539,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "15", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -22765,7 +22555,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "4", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -23050,40 +22840,258 @@ "reportableChange": 0 }, { - "name": "ClientList", - "code": 2, + "name": "ClientList", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PartsList", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TagList", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Power Source", + "code": 47, + "mfgCode": null, + "define": "POWER_SOURCE_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "Status", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "PowerSourceStatusEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Order", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Description", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "B3", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BatChargeLevel", + "code": 14, + "mfgCode": null, + "side": "server", + "type": "BatChargeLevelEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BatReplacementNeeded", + "code": 15, "mfgCode": null, "side": "server", - "type": "array", + "type": "boolean", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": null, + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "PartsList", - "code": 3, + "name": "BatReplaceability", + "code": 16, "mfgCode": null, "side": "server", - "type": "array", + "type": "BatReplaceabilityEnum", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": null, + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "TagList", - "code": 4, + "name": "EndpointList", + "code": 31, "mfgCode": null, "side": "server", "type": "array", @@ -23171,7 +23179,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "2", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -23184,10 +23192,10 @@ "side": "server", "type": "int16u", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": null, + "defaultValue": "2", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -23196,83 +23204,190 @@ ] }, { - "name": "Power Source", - "code": 47, + "name": "Scenes Management", + "code": 98, "mfgCode": null, - "define": "POWER_SOURCE_CLUSTER", + "define": "SCENES_CLUSTER", "side": "server", "enabled": 1, - "attributes": [ + "apiMaturity": "provisional", + "commands": [ { - "name": "Status", + "name": "AddScene", "code": 0, "mfgCode": null, - "side": "server", - "type": "PowerSourceStatusEnum", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 + "source": "client", + "isIncoming": 1, + "isEnabled": 1 }, { - "name": "Order", + "name": "AddSceneResponse", + "code": 0, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "ViewScene", "code": 1, "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 + "source": "client", + "isIncoming": 1, + "isEnabled": 1 }, { - "name": "Description", + "name": "ViewSceneResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "RemoveScene", "code": 2, "mfgCode": null, - "side": "server", - "type": "char_string", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "B3", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 + "source": "client", + "isIncoming": 1, + "isEnabled": 1 }, { - "name": "BatChargeLevel", - "code": 14, + "name": "RemoveSceneResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "RemoveAllScenes", + "code": 3, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "RemoveAllScenesResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "StoreScene", + "code": 4, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "StoreSceneResponse", + "code": 4, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "RecallScene", + "code": 5, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "GetSceneMembership", + "code": 6, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "GetSceneMembershipResponse", + "code": 6, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "EnhancedAddScene", + "code": 64, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "EnhancedAddSceneResponse", + "code": 64, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "EnhancedViewScene", + "code": 65, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "EnhancedViewSceneResponse", + "code": 65, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "CopyScene", + "code": 66, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "CopySceneResponse", + "code": 66, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "NameSupport", + "code": 4, "mfgCode": null, "side": "server", - "type": "BatChargeLevelEnum", + "type": "NameSupportBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "0x80", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { - "name": "BatReplacementNeeded", - "code": 15, + "name": "LastConfiguredBy", + "code": 5, "mfgCode": null, "side": "server", - "type": "boolean", + "type": "node_id", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -23284,24 +23399,24 @@ "reportableChange": 0 }, { - "name": "BatReplaceability", - "code": 16, + "name": "SceneTableSize", + "code": 6, "mfgCode": null, "side": "server", - "type": "BatReplaceabilityEnum", + "type": "int16u", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "16", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "EndpointList", - "code": 31, + "name": "FabricSceneInfo", + "code": 7, "mfgCode": null, "side": "server", "type": "array", @@ -23389,7 +23504,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "2", + "defaultValue": "15", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -23405,10 +23520,10 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "2", + "defaultValue": "5", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 } ] diff --git a/examples/all-clusters-app/all-clusters-common/include/oven-operational-state-delegate.h b/examples/all-clusters-app/all-clusters-common/include/oven-operational-state-delegate.h new file mode 100644 index 00000000000000..6d7338214f77ae --- /dev/null +++ b/examples/all-clusters-app/all-clusters-common/include/oven-operational-state-delegate.h @@ -0,0 +1,118 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * All rights reserved. + * + * 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. + */ + +#pragma once + +#include +#include +#include +#include + +namespace chip { +namespace app { +namespace Clusters { + +namespace OvenCavityOperationalState { + +// This is an application level delegate to handle operational state commands according to the specific business logic. +class OvenCavityOperationalStateDelegate : public OperationalState::Delegate +{ +private: + inline static const Clusters::OperationalState::GenericOperationalState mOperationalStateList[] = { + OperationalState::GenericOperationalState(to_underlying(OperationalState::OperationalStateEnum::kStopped)), + OperationalState::GenericOperationalState(to_underlying(OperationalState::OperationalStateEnum::kRunning)), + OperationalState::GenericOperationalState(to_underlying(OperationalState::OperationalStateEnum::kPaused)), + OperationalState::GenericOperationalState(to_underlying(OperationalState::OperationalStateEnum::kError)) + }; + +public: + /** + * Get the countdown time. This attribute is not supported in our example app. + * @return Null. + */ + DataModel::Nullable GetCountdownTime() override { return DataModel::NullNullable; }; + + /** + * Fills in the provided GenericOperationalState with the state at index `index` if there is one, + * or returns CHIP_ERROR_NOT_FOUND if the index is out of range for the list of states. + * Note: This is used by the SDK to populate the operational state list attribute. If the contents of this list changes, + * the device SHALL call the Instance's ReportOperationalStateListChange method to report that this attribute has changed. + * @param index The index of the state, with 0 representing the first state. + * @param operationalState The GenericOperationalState is filled. + */ + CHIP_ERROR GetOperationalStateAtIndex(size_t index, + Clusters::OperationalState::GenericOperationalState & operationalState) override; + + /** + * Fills in the provided MutableCharSpan with the phase at index `index` if there is one, + * or returns CHIP_ERROR_NOT_FOUND if the index is out of range for the list of phases. + * Note: This is used by the SDK to populate the phase list attribute. If the contents of this list changes, the + * device SHALL call the Instance's ReportPhaseListChange method to report that this attribute has changed. + * @param index The index of the phase, with 0 representing the first phase. + * @param operationalPhase The MutableCharSpan is filled. + */ + CHIP_ERROR GetOperationalPhaseAtIndex(size_t index, MutableCharSpan & operationalPhase) override; + + // command callback + /** + * Handle Command Callback in application: Pause + * @param[out] get operational error after callback. + */ + void HandlePauseStateCallback(Clusters::OperationalState::GenericOperationalError & err) override + { + // This command in not supported. + err.Set(to_underlying(ErrorStateEnum::kCommandInvalidInState)); + }; + + /** + * Handle Command Callback in application: Resume + * @param[out] get operational error after callback. + */ + void HandleResumeStateCallback(Clusters::OperationalState::GenericOperationalError & err) override + { + // This command in not supported. + err.Set(to_underlying(ErrorStateEnum::kCommandInvalidInState)); + }; + + /** + * Handle Command Callback in application: Start + * @param[out] get operational error after callback. + */ + void HandleStartStateCallback(Clusters::OperationalState::GenericOperationalError & err) override + { + // This command in not supported. + err.Set(to_underlying(ErrorStateEnum::kCommandInvalidInState)); + }; + + /** + * Handle Command Callback in application: Stop + * @param[out] get operational error after callback. + */ + void HandleStopStateCallback(Clusters::OperationalState::GenericOperationalError & err) override + { + // This command in not supported. + err.Set(to_underlying(ErrorStateEnum::kCommandInvalidInState)); + }; +}; + +void Shutdown(); + +} // namespace OvenCavityOperationalState +} // namespace Clusters +} // namespace app +} // namespace chip diff --git a/examples/all-clusters-app/all-clusters-common/src/oven-operational-state-delegate.cpp b/examples/all-clusters-app/all-clusters-common/src/oven-operational-state-delegate.cpp new file mode 100644 index 00000000000000..ecae5c88006ef4 --- /dev/null +++ b/examples/all-clusters-app/all-clusters-common/src/oven-operational-state-delegate.cpp @@ -0,0 +1,73 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * All rights reserved. + * + * 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. + */ +#include + +using namespace chip; +using namespace chip::app; +using namespace chip::app::Clusters; +using namespace chip::app::Clusters::OvenCavityOperationalState; + +static OperationalState::Instance * gOvenCavityOperationalStateInstance = nullptr; +static OvenCavityOperationalStateDelegate * gOvenCavityOperationalStateDelegate = nullptr; + +void OvenCavityOperationalState::Shutdown() +{ + if (gOvenCavityOperationalStateInstance != nullptr) + { + delete gOvenCavityOperationalStateInstance; + gOvenCavityOperationalStateInstance = nullptr; + } + if (gOvenCavityOperationalStateDelegate != nullptr) + { + delete gOvenCavityOperationalStateDelegate; + gOvenCavityOperationalStateDelegate = nullptr; + } +} + +void emberAfOvenCavityOperationalStateClusterInitCallback(chip::EndpointId endpointId) +{ + VerifyOrDie(endpointId == 1); // this cluster is only enabled for endpoint 1. + VerifyOrDie(gOvenCavityOperationalStateInstance == nullptr && gOvenCavityOperationalStateDelegate == nullptr); + + gOvenCavityOperationalStateDelegate = new OvenCavityOperationalStateDelegate; + EndpointId operationalStateEndpoint = 0x01; + gOvenCavityOperationalStateInstance = + new OvenCavityOperationalState::Instance(gOvenCavityOperationalStateDelegate, operationalStateEndpoint); + + gOvenCavityOperationalStateInstance->SetOperationalState(to_underlying(OperationalState::OperationalStateEnum::kStopped)); + + gOvenCavityOperationalStateInstance->Init(); +} + +CHIP_ERROR +OvenCavityOperationalStateDelegate::GetOperationalStateAtIndex(size_t index, + OperationalState::GenericOperationalState & operationalState) +{ + if (index >= ArraySize(mOperationalStateList)) + { + return CHIP_ERROR_NOT_FOUND; + } + operationalState = mOperationalStateList[index]; + return CHIP_NO_ERROR; +} + +CHIP_ERROR +OvenCavityOperationalStateDelegate::GetOperationalPhaseAtIndex(size_t index, MutableCharSpan & operationalPhase) +{ + return CHIP_ERROR_NOT_FOUND; +} diff --git a/examples/all-clusters-app/linux/BUILD.gn b/examples/all-clusters-app/linux/BUILD.gn index 3b93e7605d5c65..44f258069c7063 100644 --- a/examples/all-clusters-app/linux/BUILD.gn +++ b/examples/all-clusters-app/linux/BUILD.gn @@ -37,6 +37,7 @@ source_set("chip-all-clusters-common") { "${chip_root}/examples/all-clusters-app/all-clusters-common/src/microwave-oven-mode.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/operational-state-delegate-impl.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/oven-modes.cpp", + "${chip_root}/examples/all-clusters-app/all-clusters-common/src/oven-operational-state-delegate.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/resource-monitoring-delegates.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/rvc-modes.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/rvc-operational-state-delegate-impl.cpp", diff --git a/examples/all-clusters-app/linux/main-common.cpp b/examples/all-clusters-app/linux/main-common.cpp index a3040c39d0d175..e408c36ff417fa 100644 --- a/examples/all-clusters-app/linux/main-common.cpp +++ b/examples/all-clusters-app/linux/main-common.cpp @@ -28,6 +28,7 @@ #include "microwave-oven-mode.h" #include "operational-state-delegate-impl.h" #include "oven-modes.h" +#include "oven-operational-state-delegate.h" #include "resource-monitoring-delegates.h" #include "rvc-modes.h" #include "rvc-operational-state-delegate-impl.h" @@ -248,6 +249,7 @@ void ApplicationShutdown() Clusters::OperationalState::Shutdown(); Clusters::RvcOperationalState::Shutdown(); Clusters::OvenMode::Shutdown(); + Clusters::OvenCavityOperationalState::Shutdown(); if (sChipNamedPipeCommands.Stop() != CHIP_NO_ERROR) { diff --git a/src/app/common/templates/config-data.yaml b/src/app/common/templates/config-data.yaml index 2605704fa89e0a..2ee03c124bb769 100644 --- a/src/app/common/templates/config-data.yaml +++ b/src/app/common/templates/config-data.yaml @@ -24,6 +24,7 @@ CommandHandlerInterfaceOnlyClusters: - Dishwasher Mode - Laundry Washer Mode - Oven Mode + - Oven Cavity Operational State - Refrigerator And Temperature Controlled Cabinet Mode - Operational State - Activated Carbon Filter Monitoring diff --git a/src/app/util/util.cpp b/src/app/util/util.cpp index e7fa8c2b2374d8..329de98697c376 100644 --- a/src/app/util/util.cpp +++ b/src/app/util/util.cpp @@ -158,6 +158,7 @@ void MatterRefrigeratorAndTemperatureControlledCabinetModePluginServerInitCallba void MatterOperationalStatePluginServerInitCallback() {} void MatterRvcOperationalStatePluginServerInitCallback() {} void MatterOvenModePluginServerInitCallback() {} +void MatterOvenCavityOperationalStatePluginServerInitCallback() {} void MatterDishwasherAlarmPluginServerInitCallback() {} void MatterMicrowaveOvenModePluginServerInitCallback() {} // **************************************** diff --git a/src/controller/data_model/controller-clusters.zap b/src/controller/data_model/controller-clusters.zap index 9c1c09406ad207..4b960749772d23 100644 --- a/src/controller/data_model/controller-clusters.zap +++ b/src/controller/data_model/controller-clusters.zap @@ -212,139 +212,6 @@ } ] }, - { - "name": "Scenes Management", - "code": 98, - "mfgCode": null, - "define": "SCENES_CLUSTER", - "side": "client", - "enabled": 1, - "apiMaturity": "provisional", - "commands": [ - { - "name": "AddScene", - "code": 0, - "mfgCode": null, - "source": "client", - "isIncoming": 0, - "isEnabled": 1 - }, - { - "name": "AddSceneResponse", - "code": 0, - "mfgCode": null, - "source": "server", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "ViewScene", - "code": 1, - "mfgCode": null, - "source": "client", - "isIncoming": 0, - "isEnabled": 1 - }, - { - "name": "ViewSceneResponse", - "code": 1, - "mfgCode": null, - "source": "server", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "RemoveScene", - "code": 2, - "mfgCode": null, - "source": "client", - "isIncoming": 0, - "isEnabled": 1 - }, - { - "name": "RemoveSceneResponse", - "code": 2, - "mfgCode": null, - "source": "server", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "RemoveAllScenes", - "code": 3, - "mfgCode": null, - "source": "client", - "isIncoming": 0, - "isEnabled": 1 - }, - { - "name": "RemoveAllScenesResponse", - "code": 3, - "mfgCode": null, - "source": "server", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "StoreScene", - "code": 4, - "mfgCode": null, - "source": "client", - "isIncoming": 0, - "isEnabled": 1 - }, - { - "name": "StoreSceneResponse", - "code": 4, - "mfgCode": null, - "source": "server", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "RecallScene", - "code": 5, - "mfgCode": null, - "source": "client", - "isIncoming": 0, - "isEnabled": 1 - }, - { - "name": "GetSceneMembership", - "code": 6, - "mfgCode": null, - "source": "client", - "isIncoming": 0, - "isEnabled": 1 - }, - { - "name": "GetSceneMembershipResponse", - "code": 6, - "mfgCode": null, - "source": "server", - "isIncoming": 1, - "isEnabled": 1 - } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "5", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, { "name": "On/Off", "code": 6, @@ -3040,6 +2907,139 @@ } ] }, + { + "name": "Scenes Management", + "code": 98, + "mfgCode": null, + "define": "SCENES_CLUSTER", + "side": "client", + "enabled": 1, + "apiMaturity": "provisional", + "commands": [ + { + "name": "AddScene", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "AddSceneResponse", + "code": 0, + "mfgCode": null, + "source": "server", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "ViewScene", + "code": 1, + "mfgCode": null, + "source": "client", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "ViewSceneResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "RemoveScene", + "code": 2, + "mfgCode": null, + "source": "client", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "RemoveSceneResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "RemoveAllScenes", + "code": 3, + "mfgCode": null, + "source": "client", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "RemoveAllScenesResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "StoreScene", + "code": 4, + "mfgCode": null, + "source": "client", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "StoreSceneResponse", + "code": 4, + "mfgCode": null, + "source": "server", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "RecallScene", + "code": 5, + "mfgCode": null, + "source": "client", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "GetSceneMembership", + "code": 6, + "mfgCode": null, + "source": "client", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "GetSceneMembershipResponse", + "code": 6, + "mfgCode": null, + "source": "server", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "5", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, { "name": "HEPA Filter Monitoring", "code": 113, @@ -3140,7 +3140,7 @@ "side": "client", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -3201,7 +3201,7 @@ "side": "client", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java b/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java deleted file mode 100644 index 5f4c1939a70cb6..00000000000000 --- a/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java +++ /dev/null @@ -1,40491 +0,0 @@ -/* - * - * Copyright (c) 2022 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// THIS FILE IS GENERATED BY ZAP -package chip.devicecontroller; - -import javax.annotation.Nullable; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Optional; - -public class ChipClusters { - - public interface DefaultClusterCallback { - void onSuccess(); - void onError(Exception error); - } - - public interface CharStringAttributeCallback { - /** Indicates a successful read for a CHAR_STRING attribute. */ - void onSuccess(String value); - void onError(Exception error); - default void onSubscriptionEstablished(long subscriptionId) {} - } - - public interface OctetStringAttributeCallback { - /** Indicates a successful read for an OCTET_STRING attribute. */ - void onSuccess(byte[] value); - void onError(Exception error); - default void onSubscriptionEstablished(long subscriptionId) {} - } - - public interface IntegerAttributeCallback { - void onSuccess(int value); - void onError(Exception error); - default void onSubscriptionEstablished(long subscriptionId) {} - } - - public interface LongAttributeCallback { - void onSuccess(long value); - void onError(Exception error); - default void onSubscriptionEstablished(long subscriptionId) {} - } - - public interface BooleanAttributeCallback { - void onSuccess(boolean value); - void onError(Exception error); - default void onSubscriptionEstablished(long subscriptionId) {} - } - - public interface FloatAttributeCallback { - void onSuccess(float value); - void onError(Exception error); - default void onSubscriptionEstablished(long subscriptionId) {} - } - - public interface DoubleAttributeCallback { - void onSuccess(double value); - void onError(Exception error); - default void onSubscriptionEstablished(long subscriptionId) {} - } - - public static abstract class BaseChipCluster { - protected long chipClusterPtr; - - public BaseChipCluster(long devicePtr, int endpointId) { - chipClusterPtr = initWithDevice(devicePtr, endpointId); - } - - /** - * Sets the timeout, in milliseconds, after which commands sent through this cluster will fail - * with a timeout (regardless of whether or not a response has been received). If set to an - * empty optional, the default timeout will be used. - */ - public void setCommandTimeout(Optional timeoutMillis) { - setCommandTimeout(chipClusterPtr, timeoutMillis); - } - - private native void setCommandTimeout(long clusterPtr, Optional timeoutMillis); - - /** Returns the current timeout (in milliseconds) for commands sent through this cluster. */ - public Optional getCommandTimeout() { - Optional timeout = getCommandTimeout(chipClusterPtr); - return timeout == null ? Optional.empty() : timeout; - } - - private native Optional getCommandTimeout(long clusterPtr); - - public abstract long initWithDevice(long devicePtr, int endpointId); - - public native void deleteCluster(long chipClusterPtr); - - @SuppressWarnings("deprecation") - protected void finalize() throws Throwable { - super.finalize(); - - if (chipClusterPtr != 0) { - deleteCluster(chipClusterPtr); - chipClusterPtr = 0; - } - } - } - - public static class IdentifyCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 0x00000003L; - - public IdentifyCluster(long devicePtr, int endpointId) { - super(devicePtr, endpointId); - } - - @Override - public native long initWithDevice(long devicePtr, int endpointId); - - public void identify(DefaultClusterCallback callback - , Integer identifyTime) { - identify(chipClusterPtr, callback, identifyTime, null); - } - - public void identify(DefaultClusterCallback callback - , Integer identifyTime - , int timedInvokeTimeoutMs) { - identify(chipClusterPtr, callback, identifyTime, timedInvokeTimeoutMs); - } - - public void triggerEffect(DefaultClusterCallback callback - , Integer effectIdentifier, Integer effectVariant) { - triggerEffect(chipClusterPtr, callback, effectIdentifier, effectVariant, null); - } - - public void triggerEffect(DefaultClusterCallback callback - , Integer effectIdentifier, Integer effectVariant - , int timedInvokeTimeoutMs) { - triggerEffect(chipClusterPtr, callback, effectIdentifier, effectVariant, timedInvokeTimeoutMs); - } - private native void identify(long chipClusterPtr, DefaultClusterCallback Callback - , Integer identifyTime - , @Nullable Integer timedInvokeTimeoutMs); - private native void triggerEffect(long chipClusterPtr, DefaultClusterCallback Callback - , Integer effectIdentifier, Integer effectVariant - , @Nullable Integer timedInvokeTimeoutMs); - - public interface GeneratedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AcceptedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface EventListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AttributeListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - - public void readIdentifyTimeAttribute( - IntegerAttributeCallback callback - ) { - readIdentifyTimeAttribute(chipClusterPtr, callback); - } - public void writeIdentifyTimeAttribute(DefaultClusterCallback callback, Integer value) { - writeIdentifyTimeAttribute(chipClusterPtr, callback, value, null); - } - - public void writeIdentifyTimeAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeIdentifyTimeAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeIdentifyTimeAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeIdentifyTimeAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readIdentifyTypeAttribute( - IntegerAttributeCallback callback - ) { - readIdentifyTypeAttribute(chipClusterPtr, callback); - } - public void subscribeIdentifyTypeAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeIdentifyTypeAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - ) { - readGeneratedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - ) { - readAcceptedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readEventListAttribute( - EventListAttributeCallback callback - ) { - readEventListAttribute(chipClusterPtr, callback); - } - public void subscribeEventListAttribute( - EventListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAttributeListAttribute( - AttributeListAttributeCallback callback - ) { - readAttributeListAttribute(chipClusterPtr, callback); - } - public void subscribeAttributeListAttribute( - AttributeListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readFeatureMapAttribute( - LongAttributeCallback callback - ) { - readFeatureMapAttribute(chipClusterPtr, callback); - } - public void subscribeFeatureMapAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readClusterRevisionAttribute( - IntegerAttributeCallback callback - ) { - readClusterRevisionAttribute(chipClusterPtr, callback); - } - public void subscribeClusterRevisionAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - private native void readIdentifyTimeAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - - private native void writeIdentifyTimeAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeIdentifyTimeAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readIdentifyTypeAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeIdentifyTypeAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - ); - private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - ); - private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - ); - private native void subscribeEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - ); - private native void subscribeAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - } - - public static class GroupsCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 0x00000004L; - - public GroupsCluster(long devicePtr, int endpointId) { - super(devicePtr, endpointId); - } - - @Override - public native long initWithDevice(long devicePtr, int endpointId); - - public void addGroup(AddGroupResponseCallback callback - , Integer groupID, String groupName) { - addGroup(chipClusterPtr, callback, groupID, groupName, null); - } - - public void addGroup(AddGroupResponseCallback callback - , Integer groupID, String groupName - , int timedInvokeTimeoutMs) { - addGroup(chipClusterPtr, callback, groupID, groupName, timedInvokeTimeoutMs); - } - - public void viewGroup(ViewGroupResponseCallback callback - , Integer groupID) { - viewGroup(chipClusterPtr, callback, groupID, null); - } - - public void viewGroup(ViewGroupResponseCallback callback - , Integer groupID - , int timedInvokeTimeoutMs) { - viewGroup(chipClusterPtr, callback, groupID, timedInvokeTimeoutMs); - } - - public void getGroupMembership(GetGroupMembershipResponseCallback callback - , ArrayList groupList) { - getGroupMembership(chipClusterPtr, callback, groupList, null); - } - - public void getGroupMembership(GetGroupMembershipResponseCallback callback - , ArrayList groupList - , int timedInvokeTimeoutMs) { - getGroupMembership(chipClusterPtr, callback, groupList, timedInvokeTimeoutMs); - } - - public void removeGroup(RemoveGroupResponseCallback callback - , Integer groupID) { - removeGroup(chipClusterPtr, callback, groupID, null); - } - - public void removeGroup(RemoveGroupResponseCallback callback - , Integer groupID - , int timedInvokeTimeoutMs) { - removeGroup(chipClusterPtr, callback, groupID, timedInvokeTimeoutMs); - } - - public void removeAllGroups(DefaultClusterCallback callback - ) { - removeAllGroups(chipClusterPtr, callback, null); - } - - public void removeAllGroups(DefaultClusterCallback callback - - , int timedInvokeTimeoutMs) { - removeAllGroups(chipClusterPtr, callback, timedInvokeTimeoutMs); - } - - public void addGroupIfIdentifying(DefaultClusterCallback callback - , Integer groupID, String groupName) { - addGroupIfIdentifying(chipClusterPtr, callback, groupID, groupName, null); - } - - public void addGroupIfIdentifying(DefaultClusterCallback callback - , Integer groupID, String groupName - , int timedInvokeTimeoutMs) { - addGroupIfIdentifying(chipClusterPtr, callback, groupID, groupName, timedInvokeTimeoutMs); - } - private native void addGroup(long chipClusterPtr, AddGroupResponseCallback Callback - , Integer groupID, String groupName - , @Nullable Integer timedInvokeTimeoutMs); - private native void viewGroup(long chipClusterPtr, ViewGroupResponseCallback Callback - , Integer groupID - , @Nullable Integer timedInvokeTimeoutMs); - private native void getGroupMembership(long chipClusterPtr, GetGroupMembershipResponseCallback Callback - , ArrayList groupList - , @Nullable Integer timedInvokeTimeoutMs); - private native void removeGroup(long chipClusterPtr, RemoveGroupResponseCallback Callback - , Integer groupID - , @Nullable Integer timedInvokeTimeoutMs); - private native void removeAllGroups(long chipClusterPtr, DefaultClusterCallback Callback - - , @Nullable Integer timedInvokeTimeoutMs); - private native void addGroupIfIdentifying(long chipClusterPtr, DefaultClusterCallback Callback - , Integer groupID, String groupName - , @Nullable Integer timedInvokeTimeoutMs); - public interface AddGroupResponseCallback { - void onSuccess(Integer status, Integer groupID); - - void onError(Exception error); - } - - public interface ViewGroupResponseCallback { - void onSuccess(Integer status, Integer groupID, String groupName); - - void onError(Exception error); - } - - public interface GetGroupMembershipResponseCallback { - void onSuccess(@Nullable Integer capacity, ArrayList groupList); - - void onError(Exception error); - } - - public interface RemoveGroupResponseCallback { - void onSuccess(Integer status, Integer groupID); - - void onError(Exception error); - } - - - public interface GeneratedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AcceptedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface EventListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AttributeListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - - public void readNameSupportAttribute( - IntegerAttributeCallback callback - ) { - readNameSupportAttribute(chipClusterPtr, callback); - } - public void subscribeNameSupportAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeNameSupportAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - ) { - readGeneratedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - ) { - readAcceptedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readEventListAttribute( - EventListAttributeCallback callback - ) { - readEventListAttribute(chipClusterPtr, callback); - } - public void subscribeEventListAttribute( - EventListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAttributeListAttribute( - AttributeListAttributeCallback callback - ) { - readAttributeListAttribute(chipClusterPtr, callback); - } - public void subscribeAttributeListAttribute( - AttributeListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readFeatureMapAttribute( - LongAttributeCallback callback - ) { - readFeatureMapAttribute(chipClusterPtr, callback); - } - public void subscribeFeatureMapAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readClusterRevisionAttribute( - IntegerAttributeCallback callback - ) { - readClusterRevisionAttribute(chipClusterPtr, callback); - } - public void subscribeClusterRevisionAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - private native void readNameSupportAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeNameSupportAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - ); - private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - ); - private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - ); - private native void subscribeEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - ); - private native void subscribeAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - } - - public static class ScenesCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 0x00000005L; - - public ScenesCluster(long devicePtr, int endpointId) { - super(devicePtr, endpointId); - } - - @Override - public native long initWithDevice(long devicePtr, int endpointId); - - public void addScene(AddSceneResponseCallback callback - , Integer groupID, Integer sceneID, Integer transitionTime, String sceneName, ArrayList extensionFieldSets) { - addScene(chipClusterPtr, callback, groupID, sceneID, transitionTime, sceneName, extensionFieldSets, null); - } - - public void addScene(AddSceneResponseCallback callback - , Integer groupID, Integer sceneID, Integer transitionTime, String sceneName, ArrayList extensionFieldSets - , int timedInvokeTimeoutMs) { - addScene(chipClusterPtr, callback, groupID, sceneID, transitionTime, sceneName, extensionFieldSets, timedInvokeTimeoutMs); - } - - public void viewScene(ViewSceneResponseCallback callback - , Integer groupID, Integer sceneID) { - viewScene(chipClusterPtr, callback, groupID, sceneID, null); - } - - public void viewScene(ViewSceneResponseCallback callback - , Integer groupID, Integer sceneID - , int timedInvokeTimeoutMs) { - viewScene(chipClusterPtr, callback, groupID, sceneID, timedInvokeTimeoutMs); - } - - public void removeScene(RemoveSceneResponseCallback callback - , Integer groupID, Integer sceneID) { - removeScene(chipClusterPtr, callback, groupID, sceneID, null); - } - - public void removeScene(RemoveSceneResponseCallback callback - , Integer groupID, Integer sceneID - , int timedInvokeTimeoutMs) { - removeScene(chipClusterPtr, callback, groupID, sceneID, timedInvokeTimeoutMs); - } - - public void removeAllScenes(RemoveAllScenesResponseCallback callback - , Integer groupID) { - removeAllScenes(chipClusterPtr, callback, groupID, null); - } - - public void removeAllScenes(RemoveAllScenesResponseCallback callback - , Integer groupID - , int timedInvokeTimeoutMs) { - removeAllScenes(chipClusterPtr, callback, groupID, timedInvokeTimeoutMs); - } - - public void storeScene(StoreSceneResponseCallback callback - , Integer groupID, Integer sceneID) { - storeScene(chipClusterPtr, callback, groupID, sceneID, null); - } - - public void storeScene(StoreSceneResponseCallback callback - , Integer groupID, Integer sceneID - , int timedInvokeTimeoutMs) { - storeScene(chipClusterPtr, callback, groupID, sceneID, timedInvokeTimeoutMs); - } - - public void recallScene(DefaultClusterCallback callback - , Integer groupID, Integer sceneID, @Nullable Optional transitionTime) { - recallScene(chipClusterPtr, callback, groupID, sceneID, transitionTime, null); - } - - public void recallScene(DefaultClusterCallback callback - , Integer groupID, Integer sceneID, @Nullable Optional transitionTime - , int timedInvokeTimeoutMs) { - recallScene(chipClusterPtr, callback, groupID, sceneID, transitionTime, timedInvokeTimeoutMs); - } - - public void getSceneMembership(GetSceneMembershipResponseCallback callback - , Integer groupID) { - getSceneMembership(chipClusterPtr, callback, groupID, null); - } - - public void getSceneMembership(GetSceneMembershipResponseCallback callback - , Integer groupID - , int timedInvokeTimeoutMs) { - getSceneMembership(chipClusterPtr, callback, groupID, timedInvokeTimeoutMs); - } - - public void enhancedAddScene(EnhancedAddSceneResponseCallback callback - , Integer groupID, Integer sceneID, Integer transitionTime, String sceneName, ArrayList extensionFieldSets) { - enhancedAddScene(chipClusterPtr, callback, groupID, sceneID, transitionTime, sceneName, extensionFieldSets, null); - } - - public void enhancedAddScene(EnhancedAddSceneResponseCallback callback - , Integer groupID, Integer sceneID, Integer transitionTime, String sceneName, ArrayList extensionFieldSets - , int timedInvokeTimeoutMs) { - enhancedAddScene(chipClusterPtr, callback, groupID, sceneID, transitionTime, sceneName, extensionFieldSets, timedInvokeTimeoutMs); - } - - public void enhancedViewScene(EnhancedViewSceneResponseCallback callback - , Integer groupID, Integer sceneID) { - enhancedViewScene(chipClusterPtr, callback, groupID, sceneID, null); - } - - public void enhancedViewScene(EnhancedViewSceneResponseCallback callback - , Integer groupID, Integer sceneID - , int timedInvokeTimeoutMs) { - enhancedViewScene(chipClusterPtr, callback, groupID, sceneID, timedInvokeTimeoutMs); - } - - public void copyScene(CopySceneResponseCallback callback - , Integer mode, Integer groupIdentifierFrom, Integer sceneIdentifierFrom, Integer groupIdentifierTo, Integer sceneIdentifierTo) { - copyScene(chipClusterPtr, callback, mode, groupIdentifierFrom, sceneIdentifierFrom, groupIdentifierTo, sceneIdentifierTo, null); - } - - public void copyScene(CopySceneResponseCallback callback - , Integer mode, Integer groupIdentifierFrom, Integer sceneIdentifierFrom, Integer groupIdentifierTo, Integer sceneIdentifierTo - , int timedInvokeTimeoutMs) { - copyScene(chipClusterPtr, callback, mode, groupIdentifierFrom, sceneIdentifierFrom, groupIdentifierTo, sceneIdentifierTo, timedInvokeTimeoutMs); - } - private native void addScene(long chipClusterPtr, AddSceneResponseCallback Callback - , Integer groupID, Integer sceneID, Integer transitionTime, String sceneName, ArrayList extensionFieldSets - , @Nullable Integer timedInvokeTimeoutMs); - private native void viewScene(long chipClusterPtr, ViewSceneResponseCallback Callback - , Integer groupID, Integer sceneID - , @Nullable Integer timedInvokeTimeoutMs); - private native void removeScene(long chipClusterPtr, RemoveSceneResponseCallback Callback - , Integer groupID, Integer sceneID - , @Nullable Integer timedInvokeTimeoutMs); - private native void removeAllScenes(long chipClusterPtr, RemoveAllScenesResponseCallback Callback - , Integer groupID - , @Nullable Integer timedInvokeTimeoutMs); - private native void storeScene(long chipClusterPtr, StoreSceneResponseCallback Callback - , Integer groupID, Integer sceneID - , @Nullable Integer timedInvokeTimeoutMs); - private native void recallScene(long chipClusterPtr, DefaultClusterCallback Callback - , Integer groupID, Integer sceneID, @Nullable Optional transitionTime - , @Nullable Integer timedInvokeTimeoutMs); - private native void getSceneMembership(long chipClusterPtr, GetSceneMembershipResponseCallback Callback - , Integer groupID - , @Nullable Integer timedInvokeTimeoutMs); - private native void enhancedAddScene(long chipClusterPtr, EnhancedAddSceneResponseCallback Callback - , Integer groupID, Integer sceneID, Integer transitionTime, String sceneName, ArrayList extensionFieldSets - , @Nullable Integer timedInvokeTimeoutMs); - private native void enhancedViewScene(long chipClusterPtr, EnhancedViewSceneResponseCallback Callback - , Integer groupID, Integer sceneID - , @Nullable Integer timedInvokeTimeoutMs); - private native void copyScene(long chipClusterPtr, CopySceneResponseCallback Callback - , Integer mode, Integer groupIdentifierFrom, Integer sceneIdentifierFrom, Integer groupIdentifierTo, Integer sceneIdentifierTo - , @Nullable Integer timedInvokeTimeoutMs); - public interface AddSceneResponseCallback { - void onSuccess(Integer status, Integer groupID, Integer sceneID); - - void onError(Exception error); - } - - public interface ViewSceneResponseCallback { - void onSuccess(Integer status, Integer groupID, Integer sceneID, Optional transitionTime, Optional sceneName, Optional> extensionFieldSets); - - void onError(Exception error); - } - - public interface RemoveSceneResponseCallback { - void onSuccess(Integer status, Integer groupID, Integer sceneID); - - void onError(Exception error); - } - - public interface RemoveAllScenesResponseCallback { - void onSuccess(Integer status, Integer groupID); - - void onError(Exception error); - } - - public interface StoreSceneResponseCallback { - void onSuccess(Integer status, Integer groupID, Integer sceneID); - - void onError(Exception error); - } - - public interface GetSceneMembershipResponseCallback { - void onSuccess(Integer status, @Nullable Integer capacity, Integer groupID, Optional> sceneList); - - void onError(Exception error); - } - - public interface EnhancedAddSceneResponseCallback { - void onSuccess(Integer status, Integer groupID, Integer sceneID); - - void onError(Exception error); - } - - public interface EnhancedViewSceneResponseCallback { - void onSuccess(Integer status, Integer groupID, Integer sceneID, Optional transitionTime, Optional sceneName, Optional> extensionFieldSets); - - void onError(Exception error); - } - - public interface CopySceneResponseCallback { - void onSuccess(Integer status, Integer groupIdentifierFrom, Integer sceneIdentifierFrom); - - void onError(Exception error); - } - - - public interface LastConfiguredByAttributeCallback { - void onSuccess(@Nullable Long value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface GeneratedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AcceptedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface EventListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AttributeListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - - public void readSceneCountAttribute( - IntegerAttributeCallback callback - ) { - readSceneCountAttribute(chipClusterPtr, callback); - } - public void subscribeSceneCountAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeSceneCountAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readCurrentSceneAttribute( - IntegerAttributeCallback callback - ) { - readCurrentSceneAttribute(chipClusterPtr, callback); - } - public void subscribeCurrentSceneAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeCurrentSceneAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readCurrentGroupAttribute( - IntegerAttributeCallback callback - ) { - readCurrentGroupAttribute(chipClusterPtr, callback); - } - public void subscribeCurrentGroupAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeCurrentGroupAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readSceneValidAttribute( - BooleanAttributeCallback callback - ) { - readSceneValidAttribute(chipClusterPtr, callback); - } - public void subscribeSceneValidAttribute( - BooleanAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeSceneValidAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readNameSupportAttribute( - IntegerAttributeCallback callback - ) { - readNameSupportAttribute(chipClusterPtr, callback); - } - public void subscribeNameSupportAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeNameSupportAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readLastConfiguredByAttribute( - LastConfiguredByAttributeCallback callback - ) { - readLastConfiguredByAttribute(chipClusterPtr, callback); - } - public void subscribeLastConfiguredByAttribute( - LastConfiguredByAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeLastConfiguredByAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readSceneTableSizeAttribute( - IntegerAttributeCallback callback - ) { - readSceneTableSizeAttribute(chipClusterPtr, callback); - } - public void subscribeSceneTableSizeAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeSceneTableSizeAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readRemainingCapacityAttribute( - IntegerAttributeCallback callback - ) { - readRemainingCapacityAttribute(chipClusterPtr, callback); - } - public void subscribeRemainingCapacityAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeRemainingCapacityAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - ) { - readGeneratedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - ) { - readAcceptedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readEventListAttribute( - EventListAttributeCallback callback - ) { - readEventListAttribute(chipClusterPtr, callback); - } - public void subscribeEventListAttribute( - EventListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAttributeListAttribute( - AttributeListAttributeCallback callback - ) { - readAttributeListAttribute(chipClusterPtr, callback); - } - public void subscribeAttributeListAttribute( - AttributeListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readFeatureMapAttribute( - LongAttributeCallback callback - ) { - readFeatureMapAttribute(chipClusterPtr, callback); - } - public void subscribeFeatureMapAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readClusterRevisionAttribute( - IntegerAttributeCallback callback - ) { - readClusterRevisionAttribute(chipClusterPtr, callback); - } - public void subscribeClusterRevisionAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - private native void readSceneCountAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeSceneCountAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readCurrentSceneAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeCurrentSceneAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readCurrentGroupAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeCurrentGroupAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readSceneValidAttribute(long chipClusterPtr, - BooleanAttributeCallback callback - ); - private native void subscribeSceneValidAttribute(long chipClusterPtr, - BooleanAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readNameSupportAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeNameSupportAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readLastConfiguredByAttribute(long chipClusterPtr, - LastConfiguredByAttributeCallback callback - ); - private native void subscribeLastConfiguredByAttribute(long chipClusterPtr, - LastConfiguredByAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readSceneTableSizeAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeSceneTableSizeAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readRemainingCapacityAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeRemainingCapacityAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - ); - private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - ); - private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - ); - private native void subscribeEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - ); - private native void subscribeAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - } - - public static class OnOffCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 0x00000006L; - - public OnOffCluster(long devicePtr, int endpointId) { - super(devicePtr, endpointId); - } - - @Override - public native long initWithDevice(long devicePtr, int endpointId); - - public void off(DefaultClusterCallback callback - ) { - off(chipClusterPtr, callback, null); - } - - public void off(DefaultClusterCallback callback - - , int timedInvokeTimeoutMs) { - off(chipClusterPtr, callback, timedInvokeTimeoutMs); - } - - public void on(DefaultClusterCallback callback - ) { - on(chipClusterPtr, callback, null); - } - - public void on(DefaultClusterCallback callback - - , int timedInvokeTimeoutMs) { - on(chipClusterPtr, callback, timedInvokeTimeoutMs); - } - - public void toggle(DefaultClusterCallback callback - ) { - toggle(chipClusterPtr, callback, null); - } - - public void toggle(DefaultClusterCallback callback - - , int timedInvokeTimeoutMs) { - toggle(chipClusterPtr, callback, timedInvokeTimeoutMs); - } - - public void offWithEffect(DefaultClusterCallback callback - , Integer effectIdentifier, Integer effectVariant) { - offWithEffect(chipClusterPtr, callback, effectIdentifier, effectVariant, null); - } - - public void offWithEffect(DefaultClusterCallback callback - , Integer effectIdentifier, Integer effectVariant - , int timedInvokeTimeoutMs) { - offWithEffect(chipClusterPtr, callback, effectIdentifier, effectVariant, timedInvokeTimeoutMs); - } - - public void onWithRecallGlobalScene(DefaultClusterCallback callback - ) { - onWithRecallGlobalScene(chipClusterPtr, callback, null); - } - - public void onWithRecallGlobalScene(DefaultClusterCallback callback - - , int timedInvokeTimeoutMs) { - onWithRecallGlobalScene(chipClusterPtr, callback, timedInvokeTimeoutMs); - } - - public void onWithTimedOff(DefaultClusterCallback callback - , Integer onOffControl, Integer onTime, Integer offWaitTime) { - onWithTimedOff(chipClusterPtr, callback, onOffControl, onTime, offWaitTime, null); - } - - public void onWithTimedOff(DefaultClusterCallback callback - , Integer onOffControl, Integer onTime, Integer offWaitTime - , int timedInvokeTimeoutMs) { - onWithTimedOff(chipClusterPtr, callback, onOffControl, onTime, offWaitTime, timedInvokeTimeoutMs); - } - private native void off(long chipClusterPtr, DefaultClusterCallback Callback - - , @Nullable Integer timedInvokeTimeoutMs); - private native void on(long chipClusterPtr, DefaultClusterCallback Callback - - , @Nullable Integer timedInvokeTimeoutMs); - private native void toggle(long chipClusterPtr, DefaultClusterCallback Callback - - , @Nullable Integer timedInvokeTimeoutMs); - private native void offWithEffect(long chipClusterPtr, DefaultClusterCallback Callback - , Integer effectIdentifier, Integer effectVariant - , @Nullable Integer timedInvokeTimeoutMs); - private native void onWithRecallGlobalScene(long chipClusterPtr, DefaultClusterCallback Callback - - , @Nullable Integer timedInvokeTimeoutMs); - private native void onWithTimedOff(long chipClusterPtr, DefaultClusterCallback Callback - , Integer onOffControl, Integer onTime, Integer offWaitTime - , @Nullable Integer timedInvokeTimeoutMs); - - public interface StartUpOnOffAttributeCallback { - void onSuccess(@Nullable Integer value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface GeneratedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AcceptedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface EventListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AttributeListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - - public void readOnOffAttribute( - BooleanAttributeCallback callback - ) { - readOnOffAttribute(chipClusterPtr, callback); - } - public void subscribeOnOffAttribute( - BooleanAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeOnOffAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readGlobalSceneControlAttribute( - BooleanAttributeCallback callback - ) { - readGlobalSceneControlAttribute(chipClusterPtr, callback); - } - public void subscribeGlobalSceneControlAttribute( - BooleanAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeGlobalSceneControlAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readOnTimeAttribute( - IntegerAttributeCallback callback - ) { - readOnTimeAttribute(chipClusterPtr, callback); - } - public void writeOnTimeAttribute(DefaultClusterCallback callback, Integer value) { - writeOnTimeAttribute(chipClusterPtr, callback, value, null); - } - - public void writeOnTimeAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeOnTimeAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeOnTimeAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeOnTimeAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readOffWaitTimeAttribute( - IntegerAttributeCallback callback - ) { - readOffWaitTimeAttribute(chipClusterPtr, callback); - } - public void writeOffWaitTimeAttribute(DefaultClusterCallback callback, Integer value) { - writeOffWaitTimeAttribute(chipClusterPtr, callback, value, null); - } - - public void writeOffWaitTimeAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeOffWaitTimeAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeOffWaitTimeAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeOffWaitTimeAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readStartUpOnOffAttribute( - StartUpOnOffAttributeCallback callback - ) { - readStartUpOnOffAttribute(chipClusterPtr, callback); - } - public void writeStartUpOnOffAttribute(DefaultClusterCallback callback, Integer value) { - writeStartUpOnOffAttribute(chipClusterPtr, callback, value, null); - } - - public void writeStartUpOnOffAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeStartUpOnOffAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeStartUpOnOffAttribute( - StartUpOnOffAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeStartUpOnOffAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - ) { - readGeneratedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - ) { - readAcceptedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readEventListAttribute( - EventListAttributeCallback callback - ) { - readEventListAttribute(chipClusterPtr, callback); - } - public void subscribeEventListAttribute( - EventListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAttributeListAttribute( - AttributeListAttributeCallback callback - ) { - readAttributeListAttribute(chipClusterPtr, callback); - } - public void subscribeAttributeListAttribute( - AttributeListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readFeatureMapAttribute( - LongAttributeCallback callback - ) { - readFeatureMapAttribute(chipClusterPtr, callback); - } - public void subscribeFeatureMapAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readClusterRevisionAttribute( - IntegerAttributeCallback callback - ) { - readClusterRevisionAttribute(chipClusterPtr, callback); - } - public void subscribeClusterRevisionAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - private native void readOnOffAttribute(long chipClusterPtr, - BooleanAttributeCallback callback - ); - private native void subscribeOnOffAttribute(long chipClusterPtr, - BooleanAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readGlobalSceneControlAttribute(long chipClusterPtr, - BooleanAttributeCallback callback - ); - private native void subscribeGlobalSceneControlAttribute(long chipClusterPtr, - BooleanAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readOnTimeAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - - private native void writeOnTimeAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeOnTimeAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readOffWaitTimeAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - - private native void writeOffWaitTimeAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeOffWaitTimeAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readStartUpOnOffAttribute(long chipClusterPtr, - StartUpOnOffAttributeCallback callback - ); - - private native void writeStartUpOnOffAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeStartUpOnOffAttribute(long chipClusterPtr, - StartUpOnOffAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - ); - private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - ); - private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - ); - private native void subscribeEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - ); - private native void subscribeAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - } - - public static class OnOffSwitchConfigurationCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 0x00000007L; - - public OnOffSwitchConfigurationCluster(long devicePtr, int endpointId) { - super(devicePtr, endpointId); - } - - @Override - public native long initWithDevice(long devicePtr, int endpointId); - - public interface GeneratedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AcceptedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface EventListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AttributeListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - - public void readSwitchTypeAttribute( - IntegerAttributeCallback callback - ) { - readSwitchTypeAttribute(chipClusterPtr, callback); - } - public void subscribeSwitchTypeAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeSwitchTypeAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readSwitchActionsAttribute( - IntegerAttributeCallback callback - ) { - readSwitchActionsAttribute(chipClusterPtr, callback); - } - public void writeSwitchActionsAttribute(DefaultClusterCallback callback, Integer value) { - writeSwitchActionsAttribute(chipClusterPtr, callback, value, null); - } - - public void writeSwitchActionsAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeSwitchActionsAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeSwitchActionsAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeSwitchActionsAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - ) { - readGeneratedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - ) { - readAcceptedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readEventListAttribute( - EventListAttributeCallback callback - ) { - readEventListAttribute(chipClusterPtr, callback); - } - public void subscribeEventListAttribute( - EventListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAttributeListAttribute( - AttributeListAttributeCallback callback - ) { - readAttributeListAttribute(chipClusterPtr, callback); - } - public void subscribeAttributeListAttribute( - AttributeListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readFeatureMapAttribute( - LongAttributeCallback callback - ) { - readFeatureMapAttribute(chipClusterPtr, callback); - } - public void subscribeFeatureMapAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readClusterRevisionAttribute( - IntegerAttributeCallback callback - ) { - readClusterRevisionAttribute(chipClusterPtr, callback); - } - public void subscribeClusterRevisionAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - private native void readSwitchTypeAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeSwitchTypeAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readSwitchActionsAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - - private native void writeSwitchActionsAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeSwitchActionsAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - ); - private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - ); - private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - ); - private native void subscribeEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - ); - private native void subscribeAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - } - - public static class LevelControlCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 0x00000008L; - - public LevelControlCluster(long devicePtr, int endpointId) { - super(devicePtr, endpointId); - } - - @Override - public native long initWithDevice(long devicePtr, int endpointId); - - public void moveToLevel(DefaultClusterCallback callback - , Integer level, @Nullable Integer transitionTime, Integer optionsMask, Integer optionsOverride) { - moveToLevel(chipClusterPtr, callback, level, transitionTime, optionsMask, optionsOverride, null); - } - - public void moveToLevel(DefaultClusterCallback callback - , Integer level, @Nullable Integer transitionTime, Integer optionsMask, Integer optionsOverride - , int timedInvokeTimeoutMs) { - moveToLevel(chipClusterPtr, callback, level, transitionTime, optionsMask, optionsOverride, timedInvokeTimeoutMs); - } - - public void move(DefaultClusterCallback callback - , Integer moveMode, @Nullable Integer rate, Integer optionsMask, Integer optionsOverride) { - move(chipClusterPtr, callback, moveMode, rate, optionsMask, optionsOverride, null); - } - - public void move(DefaultClusterCallback callback - , Integer moveMode, @Nullable Integer rate, Integer optionsMask, Integer optionsOverride - , int timedInvokeTimeoutMs) { - move(chipClusterPtr, callback, moveMode, rate, optionsMask, optionsOverride, timedInvokeTimeoutMs); - } - - public void step(DefaultClusterCallback callback - , Integer stepMode, Integer stepSize, @Nullable Integer transitionTime, Integer optionsMask, Integer optionsOverride) { - step(chipClusterPtr, callback, stepMode, stepSize, transitionTime, optionsMask, optionsOverride, null); - } - - public void step(DefaultClusterCallback callback - , Integer stepMode, Integer stepSize, @Nullable Integer transitionTime, Integer optionsMask, Integer optionsOverride - , int timedInvokeTimeoutMs) { - step(chipClusterPtr, callback, stepMode, stepSize, transitionTime, optionsMask, optionsOverride, timedInvokeTimeoutMs); - } - - public void stop(DefaultClusterCallback callback - , Integer optionsMask, Integer optionsOverride) { - stop(chipClusterPtr, callback, optionsMask, optionsOverride, null); - } - - public void stop(DefaultClusterCallback callback - , Integer optionsMask, Integer optionsOverride - , int timedInvokeTimeoutMs) { - stop(chipClusterPtr, callback, optionsMask, optionsOverride, timedInvokeTimeoutMs); - } - - public void moveToLevelWithOnOff(DefaultClusterCallback callback - , Integer level, @Nullable Integer transitionTime, Integer optionsMask, Integer optionsOverride) { - moveToLevelWithOnOff(chipClusterPtr, callback, level, transitionTime, optionsMask, optionsOverride, null); - } - - public void moveToLevelWithOnOff(DefaultClusterCallback callback - , Integer level, @Nullable Integer transitionTime, Integer optionsMask, Integer optionsOverride - , int timedInvokeTimeoutMs) { - moveToLevelWithOnOff(chipClusterPtr, callback, level, transitionTime, optionsMask, optionsOverride, timedInvokeTimeoutMs); - } - - public void moveWithOnOff(DefaultClusterCallback callback - , Integer moveMode, @Nullable Integer rate, Integer optionsMask, Integer optionsOverride) { - moveWithOnOff(chipClusterPtr, callback, moveMode, rate, optionsMask, optionsOverride, null); - } - - public void moveWithOnOff(DefaultClusterCallback callback - , Integer moveMode, @Nullable Integer rate, Integer optionsMask, Integer optionsOverride - , int timedInvokeTimeoutMs) { - moveWithOnOff(chipClusterPtr, callback, moveMode, rate, optionsMask, optionsOverride, timedInvokeTimeoutMs); - } - - public void stepWithOnOff(DefaultClusterCallback callback - , Integer stepMode, Integer stepSize, @Nullable Integer transitionTime, Integer optionsMask, Integer optionsOverride) { - stepWithOnOff(chipClusterPtr, callback, stepMode, stepSize, transitionTime, optionsMask, optionsOverride, null); - } - - public void stepWithOnOff(DefaultClusterCallback callback - , Integer stepMode, Integer stepSize, @Nullable Integer transitionTime, Integer optionsMask, Integer optionsOverride - , int timedInvokeTimeoutMs) { - stepWithOnOff(chipClusterPtr, callback, stepMode, stepSize, transitionTime, optionsMask, optionsOverride, timedInvokeTimeoutMs); - } - - public void stopWithOnOff(DefaultClusterCallback callback - , Integer optionsMask, Integer optionsOverride) { - stopWithOnOff(chipClusterPtr, callback, optionsMask, optionsOverride, null); - } - - public void stopWithOnOff(DefaultClusterCallback callback - , Integer optionsMask, Integer optionsOverride - , int timedInvokeTimeoutMs) { - stopWithOnOff(chipClusterPtr, callback, optionsMask, optionsOverride, timedInvokeTimeoutMs); - } - - public void moveToClosestFrequency(DefaultClusterCallback callback - , Integer frequency) { - moveToClosestFrequency(chipClusterPtr, callback, frequency, null); - } - - public void moveToClosestFrequency(DefaultClusterCallback callback - , Integer frequency - , int timedInvokeTimeoutMs) { - moveToClosestFrequency(chipClusterPtr, callback, frequency, timedInvokeTimeoutMs); - } - private native void moveToLevel(long chipClusterPtr, DefaultClusterCallback Callback - , Integer level, @Nullable Integer transitionTime, Integer optionsMask, Integer optionsOverride - , @Nullable Integer timedInvokeTimeoutMs); - private native void move(long chipClusterPtr, DefaultClusterCallback Callback - , Integer moveMode, @Nullable Integer rate, Integer optionsMask, Integer optionsOverride - , @Nullable Integer timedInvokeTimeoutMs); - private native void step(long chipClusterPtr, DefaultClusterCallback Callback - , Integer stepMode, Integer stepSize, @Nullable Integer transitionTime, Integer optionsMask, Integer optionsOverride - , @Nullable Integer timedInvokeTimeoutMs); - private native void stop(long chipClusterPtr, DefaultClusterCallback Callback - , Integer optionsMask, Integer optionsOverride - , @Nullable Integer timedInvokeTimeoutMs); - private native void moveToLevelWithOnOff(long chipClusterPtr, DefaultClusterCallback Callback - , Integer level, @Nullable Integer transitionTime, Integer optionsMask, Integer optionsOverride - , @Nullable Integer timedInvokeTimeoutMs); - private native void moveWithOnOff(long chipClusterPtr, DefaultClusterCallback Callback - , Integer moveMode, @Nullable Integer rate, Integer optionsMask, Integer optionsOverride - , @Nullable Integer timedInvokeTimeoutMs); - private native void stepWithOnOff(long chipClusterPtr, DefaultClusterCallback Callback - , Integer stepMode, Integer stepSize, @Nullable Integer transitionTime, Integer optionsMask, Integer optionsOverride - , @Nullable Integer timedInvokeTimeoutMs); - private native void stopWithOnOff(long chipClusterPtr, DefaultClusterCallback Callback - , Integer optionsMask, Integer optionsOverride - , @Nullable Integer timedInvokeTimeoutMs); - private native void moveToClosestFrequency(long chipClusterPtr, DefaultClusterCallback Callback - , Integer frequency - , @Nullable Integer timedInvokeTimeoutMs); - - public interface CurrentLevelAttributeCallback { - void onSuccess(@Nullable Integer value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface OnLevelAttributeCallback { - void onSuccess(@Nullable Integer value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface OnTransitionTimeAttributeCallback { - void onSuccess(@Nullable Integer value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface OffTransitionTimeAttributeCallback { - void onSuccess(@Nullable Integer value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface DefaultMoveRateAttributeCallback { - void onSuccess(@Nullable Integer value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface StartUpCurrentLevelAttributeCallback { - void onSuccess(@Nullable Integer value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface GeneratedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AcceptedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface EventListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AttributeListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - - public void readCurrentLevelAttribute( - CurrentLevelAttributeCallback callback - ) { - readCurrentLevelAttribute(chipClusterPtr, callback); - } - public void subscribeCurrentLevelAttribute( - CurrentLevelAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeCurrentLevelAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readRemainingTimeAttribute( - IntegerAttributeCallback callback - ) { - readRemainingTimeAttribute(chipClusterPtr, callback); - } - public void subscribeRemainingTimeAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeRemainingTimeAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readMinLevelAttribute( - IntegerAttributeCallback callback - ) { - readMinLevelAttribute(chipClusterPtr, callback); - } - public void subscribeMinLevelAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeMinLevelAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readMaxLevelAttribute( - IntegerAttributeCallback callback - ) { - readMaxLevelAttribute(chipClusterPtr, callback); - } - public void subscribeMaxLevelAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeMaxLevelAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readCurrentFrequencyAttribute( - IntegerAttributeCallback callback - ) { - readCurrentFrequencyAttribute(chipClusterPtr, callback); - } - public void subscribeCurrentFrequencyAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeCurrentFrequencyAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readMinFrequencyAttribute( - IntegerAttributeCallback callback - ) { - readMinFrequencyAttribute(chipClusterPtr, callback); - } - public void subscribeMinFrequencyAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeMinFrequencyAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readMaxFrequencyAttribute( - IntegerAttributeCallback callback - ) { - readMaxFrequencyAttribute(chipClusterPtr, callback); - } - public void subscribeMaxFrequencyAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeMaxFrequencyAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readOptionsAttribute( - IntegerAttributeCallback callback - ) { - readOptionsAttribute(chipClusterPtr, callback); - } - public void writeOptionsAttribute(DefaultClusterCallback callback, Integer value) { - writeOptionsAttribute(chipClusterPtr, callback, value, null); - } - - public void writeOptionsAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeOptionsAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeOptionsAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeOptionsAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readOnOffTransitionTimeAttribute( - IntegerAttributeCallback callback - ) { - readOnOffTransitionTimeAttribute(chipClusterPtr, callback); - } - public void writeOnOffTransitionTimeAttribute(DefaultClusterCallback callback, Integer value) { - writeOnOffTransitionTimeAttribute(chipClusterPtr, callback, value, null); - } - - public void writeOnOffTransitionTimeAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeOnOffTransitionTimeAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeOnOffTransitionTimeAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeOnOffTransitionTimeAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readOnLevelAttribute( - OnLevelAttributeCallback callback - ) { - readOnLevelAttribute(chipClusterPtr, callback); - } - public void writeOnLevelAttribute(DefaultClusterCallback callback, Integer value) { - writeOnLevelAttribute(chipClusterPtr, callback, value, null); - } - - public void writeOnLevelAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeOnLevelAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeOnLevelAttribute( - OnLevelAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeOnLevelAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readOnTransitionTimeAttribute( - OnTransitionTimeAttributeCallback callback - ) { - readOnTransitionTimeAttribute(chipClusterPtr, callback); - } - public void writeOnTransitionTimeAttribute(DefaultClusterCallback callback, Integer value) { - writeOnTransitionTimeAttribute(chipClusterPtr, callback, value, null); - } - - public void writeOnTransitionTimeAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeOnTransitionTimeAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeOnTransitionTimeAttribute( - OnTransitionTimeAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeOnTransitionTimeAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readOffTransitionTimeAttribute( - OffTransitionTimeAttributeCallback callback - ) { - readOffTransitionTimeAttribute(chipClusterPtr, callback); - } - public void writeOffTransitionTimeAttribute(DefaultClusterCallback callback, Integer value) { - writeOffTransitionTimeAttribute(chipClusterPtr, callback, value, null); - } - - public void writeOffTransitionTimeAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeOffTransitionTimeAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeOffTransitionTimeAttribute( - OffTransitionTimeAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeOffTransitionTimeAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readDefaultMoveRateAttribute( - DefaultMoveRateAttributeCallback callback - ) { - readDefaultMoveRateAttribute(chipClusterPtr, callback); - } - public void writeDefaultMoveRateAttribute(DefaultClusterCallback callback, Integer value) { - writeDefaultMoveRateAttribute(chipClusterPtr, callback, value, null); - } - - public void writeDefaultMoveRateAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeDefaultMoveRateAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeDefaultMoveRateAttribute( - DefaultMoveRateAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeDefaultMoveRateAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readStartUpCurrentLevelAttribute( - StartUpCurrentLevelAttributeCallback callback - ) { - readStartUpCurrentLevelAttribute(chipClusterPtr, callback); - } - public void writeStartUpCurrentLevelAttribute(DefaultClusterCallback callback, Integer value) { - writeStartUpCurrentLevelAttribute(chipClusterPtr, callback, value, null); - } - - public void writeStartUpCurrentLevelAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeStartUpCurrentLevelAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeStartUpCurrentLevelAttribute( - StartUpCurrentLevelAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeStartUpCurrentLevelAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - ) { - readGeneratedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - ) { - readAcceptedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readEventListAttribute( - EventListAttributeCallback callback - ) { - readEventListAttribute(chipClusterPtr, callback); - } - public void subscribeEventListAttribute( - EventListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAttributeListAttribute( - AttributeListAttributeCallback callback - ) { - readAttributeListAttribute(chipClusterPtr, callback); - } - public void subscribeAttributeListAttribute( - AttributeListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readFeatureMapAttribute( - LongAttributeCallback callback - ) { - readFeatureMapAttribute(chipClusterPtr, callback); - } - public void subscribeFeatureMapAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readClusterRevisionAttribute( - IntegerAttributeCallback callback - ) { - readClusterRevisionAttribute(chipClusterPtr, callback); - } - public void subscribeClusterRevisionAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - private native void readCurrentLevelAttribute(long chipClusterPtr, - CurrentLevelAttributeCallback callback - ); - private native void subscribeCurrentLevelAttribute(long chipClusterPtr, - CurrentLevelAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readRemainingTimeAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeRemainingTimeAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readMinLevelAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeMinLevelAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readMaxLevelAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeMaxLevelAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readCurrentFrequencyAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeCurrentFrequencyAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readMinFrequencyAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeMinFrequencyAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readMaxFrequencyAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeMaxFrequencyAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readOptionsAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - - private native void writeOptionsAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeOptionsAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readOnOffTransitionTimeAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - - private native void writeOnOffTransitionTimeAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeOnOffTransitionTimeAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readOnLevelAttribute(long chipClusterPtr, - OnLevelAttributeCallback callback - ); - - private native void writeOnLevelAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeOnLevelAttribute(long chipClusterPtr, - OnLevelAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readOnTransitionTimeAttribute(long chipClusterPtr, - OnTransitionTimeAttributeCallback callback - ); - - private native void writeOnTransitionTimeAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeOnTransitionTimeAttribute(long chipClusterPtr, - OnTransitionTimeAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readOffTransitionTimeAttribute(long chipClusterPtr, - OffTransitionTimeAttributeCallback callback - ); - - private native void writeOffTransitionTimeAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeOffTransitionTimeAttribute(long chipClusterPtr, - OffTransitionTimeAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readDefaultMoveRateAttribute(long chipClusterPtr, - DefaultMoveRateAttributeCallback callback - ); - - private native void writeDefaultMoveRateAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeDefaultMoveRateAttribute(long chipClusterPtr, - DefaultMoveRateAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readStartUpCurrentLevelAttribute(long chipClusterPtr, - StartUpCurrentLevelAttributeCallback callback - ); - - private native void writeStartUpCurrentLevelAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeStartUpCurrentLevelAttribute(long chipClusterPtr, - StartUpCurrentLevelAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - ); - private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - ); - private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - ); - private native void subscribeEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - ); - private native void subscribeAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - } - - public static class BinaryInputBasicCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 0x0000000FL; - - public BinaryInputBasicCluster(long devicePtr, int endpointId) { - super(devicePtr, endpointId); - } - - @Override - public native long initWithDevice(long devicePtr, int endpointId); - - public interface GeneratedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AcceptedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface EventListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AttributeListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - - public void readActiveTextAttribute( - CharStringAttributeCallback callback - ) { - readActiveTextAttribute(chipClusterPtr, callback); - } - public void writeActiveTextAttribute(DefaultClusterCallback callback, String value) { - writeActiveTextAttribute(chipClusterPtr, callback, value, null); - } - - public void writeActiveTextAttribute(DefaultClusterCallback callback, String value, int timedWriteTimeoutMs) { - writeActiveTextAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeActiveTextAttribute( - CharStringAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeActiveTextAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readDescriptionAttribute( - CharStringAttributeCallback callback - ) { - readDescriptionAttribute(chipClusterPtr, callback); - } - public void writeDescriptionAttribute(DefaultClusterCallback callback, String value) { - writeDescriptionAttribute(chipClusterPtr, callback, value, null); - } - - public void writeDescriptionAttribute(DefaultClusterCallback callback, String value, int timedWriteTimeoutMs) { - writeDescriptionAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeDescriptionAttribute( - CharStringAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeDescriptionAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readInactiveTextAttribute( - CharStringAttributeCallback callback - ) { - readInactiveTextAttribute(chipClusterPtr, callback); - } - public void writeInactiveTextAttribute(DefaultClusterCallback callback, String value) { - writeInactiveTextAttribute(chipClusterPtr, callback, value, null); - } - - public void writeInactiveTextAttribute(DefaultClusterCallback callback, String value, int timedWriteTimeoutMs) { - writeInactiveTextAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeInactiveTextAttribute( - CharStringAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeInactiveTextAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readOutOfServiceAttribute( - BooleanAttributeCallback callback - ) { - readOutOfServiceAttribute(chipClusterPtr, callback); - } - public void writeOutOfServiceAttribute(DefaultClusterCallback callback, Boolean value) { - writeOutOfServiceAttribute(chipClusterPtr, callback, value, null); - } - - public void writeOutOfServiceAttribute(DefaultClusterCallback callback, Boolean value, int timedWriteTimeoutMs) { - writeOutOfServiceAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeOutOfServiceAttribute( - BooleanAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeOutOfServiceAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readPolarityAttribute( - IntegerAttributeCallback callback - ) { - readPolarityAttribute(chipClusterPtr, callback); - } - public void subscribePolarityAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribePolarityAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readPresentValueAttribute( - BooleanAttributeCallback callback - ) { - readPresentValueAttribute(chipClusterPtr, callback); - } - public void writePresentValueAttribute(DefaultClusterCallback callback, Boolean value) { - writePresentValueAttribute(chipClusterPtr, callback, value, null); - } - - public void writePresentValueAttribute(DefaultClusterCallback callback, Boolean value, int timedWriteTimeoutMs) { - writePresentValueAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribePresentValueAttribute( - BooleanAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribePresentValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readReliabilityAttribute( - IntegerAttributeCallback callback - ) { - readReliabilityAttribute(chipClusterPtr, callback); - } - public void writeReliabilityAttribute(DefaultClusterCallback callback, Integer value) { - writeReliabilityAttribute(chipClusterPtr, callback, value, null); - } - - public void writeReliabilityAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeReliabilityAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeReliabilityAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeReliabilityAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readStatusFlagsAttribute( - IntegerAttributeCallback callback - ) { - readStatusFlagsAttribute(chipClusterPtr, callback); - } - public void subscribeStatusFlagsAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeStatusFlagsAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readApplicationTypeAttribute( - LongAttributeCallback callback - ) { - readApplicationTypeAttribute(chipClusterPtr, callback); - } - public void subscribeApplicationTypeAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeApplicationTypeAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - ) { - readGeneratedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - ) { - readAcceptedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readEventListAttribute( - EventListAttributeCallback callback - ) { - readEventListAttribute(chipClusterPtr, callback); - } - public void subscribeEventListAttribute( - EventListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAttributeListAttribute( - AttributeListAttributeCallback callback - ) { - readAttributeListAttribute(chipClusterPtr, callback); - } - public void subscribeAttributeListAttribute( - AttributeListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readFeatureMapAttribute( - LongAttributeCallback callback - ) { - readFeatureMapAttribute(chipClusterPtr, callback); - } - public void subscribeFeatureMapAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readClusterRevisionAttribute( - IntegerAttributeCallback callback - ) { - readClusterRevisionAttribute(chipClusterPtr, callback); - } - public void subscribeClusterRevisionAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - private native void readActiveTextAttribute(long chipClusterPtr, - CharStringAttributeCallback callback - ); - - private native void writeActiveTextAttribute(long chipClusterPtr, DefaultClusterCallback callback, String value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeActiveTextAttribute(long chipClusterPtr, - CharStringAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readDescriptionAttribute(long chipClusterPtr, - CharStringAttributeCallback callback - ); - - private native void writeDescriptionAttribute(long chipClusterPtr, DefaultClusterCallback callback, String value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeDescriptionAttribute(long chipClusterPtr, - CharStringAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readInactiveTextAttribute(long chipClusterPtr, - CharStringAttributeCallback callback - ); - - private native void writeInactiveTextAttribute(long chipClusterPtr, DefaultClusterCallback callback, String value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeInactiveTextAttribute(long chipClusterPtr, - CharStringAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readOutOfServiceAttribute(long chipClusterPtr, - BooleanAttributeCallback callback - ); - - private native void writeOutOfServiceAttribute(long chipClusterPtr, DefaultClusterCallback callback, Boolean value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeOutOfServiceAttribute(long chipClusterPtr, - BooleanAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readPolarityAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribePolarityAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readPresentValueAttribute(long chipClusterPtr, - BooleanAttributeCallback callback - ); - - private native void writePresentValueAttribute(long chipClusterPtr, DefaultClusterCallback callback, Boolean value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribePresentValueAttribute(long chipClusterPtr, - BooleanAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readReliabilityAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - - private native void writeReliabilityAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeReliabilityAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readStatusFlagsAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeStatusFlagsAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readApplicationTypeAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeApplicationTypeAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - ); - private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - ); - private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - ); - private native void subscribeEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - ); - private native void subscribeAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - } - - public static class PulseWidthModulationCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 0x0000001CL; - - public PulseWidthModulationCluster(long devicePtr, int endpointId) { - super(devicePtr, endpointId); - } - - @Override - public native long initWithDevice(long devicePtr, int endpointId); - - public interface GeneratedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AcceptedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface EventListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AttributeListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - - public void readGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - ) { - readGeneratedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - ) { - readAcceptedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readEventListAttribute( - EventListAttributeCallback callback - ) { - readEventListAttribute(chipClusterPtr, callback); - } - public void subscribeEventListAttribute( - EventListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAttributeListAttribute( - AttributeListAttributeCallback callback - ) { - readAttributeListAttribute(chipClusterPtr, callback); - } - public void subscribeAttributeListAttribute( - AttributeListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readFeatureMapAttribute( - LongAttributeCallback callback - ) { - readFeatureMapAttribute(chipClusterPtr, callback); - } - public void subscribeFeatureMapAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readClusterRevisionAttribute( - IntegerAttributeCallback callback - ) { - readClusterRevisionAttribute(chipClusterPtr, callback); - } - public void subscribeClusterRevisionAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - private native void readGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - ); - private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - ); - private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - ); - private native void subscribeEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - ); - private native void subscribeAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - } - - public static class DescriptorCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 0x0000001DL; - - public DescriptorCluster(long devicePtr, int endpointId) { - super(devicePtr, endpointId); - } - - @Override - public native long initWithDevice(long devicePtr, int endpointId); - - public interface DeviceTypeListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface ServerListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface ClientListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface PartsListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface TagListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface GeneratedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AcceptedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface EventListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AttributeListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - - public void readDeviceTypeListAttribute( - DeviceTypeListAttributeCallback callback - ) { - readDeviceTypeListAttribute(chipClusterPtr, callback); - } - public void subscribeDeviceTypeListAttribute( - DeviceTypeListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeDeviceTypeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readServerListAttribute( - ServerListAttributeCallback callback - ) { - readServerListAttribute(chipClusterPtr, callback); - } - public void subscribeServerListAttribute( - ServerListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeServerListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readClientListAttribute( - ClientListAttributeCallback callback - ) { - readClientListAttribute(chipClusterPtr, callback); - } - public void subscribeClientListAttribute( - ClientListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeClientListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readPartsListAttribute( - PartsListAttributeCallback callback - ) { - readPartsListAttribute(chipClusterPtr, callback); - } - public void subscribePartsListAttribute( - PartsListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribePartsListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readTagListAttribute( - TagListAttributeCallback callback - ) { - readTagListAttribute(chipClusterPtr, callback); - } - public void subscribeTagListAttribute( - TagListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeTagListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - ) { - readGeneratedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - ) { - readAcceptedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readEventListAttribute( - EventListAttributeCallback callback - ) { - readEventListAttribute(chipClusterPtr, callback); - } - public void subscribeEventListAttribute( - EventListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAttributeListAttribute( - AttributeListAttributeCallback callback - ) { - readAttributeListAttribute(chipClusterPtr, callback); - } - public void subscribeAttributeListAttribute( - AttributeListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readFeatureMapAttribute( - LongAttributeCallback callback - ) { - readFeatureMapAttribute(chipClusterPtr, callback); - } - public void subscribeFeatureMapAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readClusterRevisionAttribute( - IntegerAttributeCallback callback - ) { - readClusterRevisionAttribute(chipClusterPtr, callback); - } - public void subscribeClusterRevisionAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - private native void readDeviceTypeListAttribute(long chipClusterPtr, - DeviceTypeListAttributeCallback callback - ); - private native void subscribeDeviceTypeListAttribute(long chipClusterPtr, - DeviceTypeListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readServerListAttribute(long chipClusterPtr, - ServerListAttributeCallback callback - ); - private native void subscribeServerListAttribute(long chipClusterPtr, - ServerListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readClientListAttribute(long chipClusterPtr, - ClientListAttributeCallback callback - ); - private native void subscribeClientListAttribute(long chipClusterPtr, - ClientListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readPartsListAttribute(long chipClusterPtr, - PartsListAttributeCallback callback - ); - private native void subscribePartsListAttribute(long chipClusterPtr, - PartsListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readTagListAttribute(long chipClusterPtr, - TagListAttributeCallback callback - ); - private native void subscribeTagListAttribute(long chipClusterPtr, - TagListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - ); - private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - ); - private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - ); - private native void subscribeEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - ); - private native void subscribeAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - } - - public static class BindingCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 0x0000001EL; - - public BindingCluster(long devicePtr, int endpointId) { - super(devicePtr, endpointId); - } - - @Override - public native long initWithDevice(long devicePtr, int endpointId); - - public interface BindingAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface GeneratedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AcceptedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface EventListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AttributeListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - - public void readBindingAttribute( - BindingAttributeCallback callback - ) { - readBindingAttribute(chipClusterPtr, callback, true); - } - public void readBindingAttributeWithFabricFilter( - BindingAttributeCallback callback - , - boolean isFabricFiltered - ) { - readBindingAttribute(chipClusterPtr, callback, isFabricFiltered); - } - public void writeBindingAttribute(DefaultClusterCallback callback, ArrayList value) { - writeBindingAttribute(chipClusterPtr, callback, value, null); - } - - public void writeBindingAttribute(DefaultClusterCallback callback, ArrayList value, int timedWriteTimeoutMs) { - writeBindingAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeBindingAttribute( - BindingAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeBindingAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - ) { - readGeneratedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - ) { - readAcceptedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readEventListAttribute( - EventListAttributeCallback callback - ) { - readEventListAttribute(chipClusterPtr, callback); - } - public void subscribeEventListAttribute( - EventListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAttributeListAttribute( - AttributeListAttributeCallback callback - ) { - readAttributeListAttribute(chipClusterPtr, callback); - } - public void subscribeAttributeListAttribute( - AttributeListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readFeatureMapAttribute( - LongAttributeCallback callback - ) { - readFeatureMapAttribute(chipClusterPtr, callback); - } - public void subscribeFeatureMapAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readClusterRevisionAttribute( - IntegerAttributeCallback callback - ) { - readClusterRevisionAttribute(chipClusterPtr, callback); - } - public void subscribeClusterRevisionAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - private native void readBindingAttribute(long chipClusterPtr, - BindingAttributeCallback callback - , boolean isFabricFiltered - ); - - private native void writeBindingAttribute(long chipClusterPtr, DefaultClusterCallback callback, ArrayList value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeBindingAttribute(long chipClusterPtr, - BindingAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - ); - private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - ); - private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - ); - private native void subscribeEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - ); - private native void subscribeAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - } - - public static class AccessControlCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 0x0000001FL; - - public AccessControlCluster(long devicePtr, int endpointId) { - super(devicePtr, endpointId); - } - - @Override - public native long initWithDevice(long devicePtr, int endpointId); - - public interface AclAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface ExtensionAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface GeneratedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AcceptedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface EventListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AttributeListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - - public void readAclAttribute( - AclAttributeCallback callback - ) { - readAclAttribute(chipClusterPtr, callback, true); - } - public void readAclAttributeWithFabricFilter( - AclAttributeCallback callback - , - boolean isFabricFiltered - ) { - readAclAttribute(chipClusterPtr, callback, isFabricFiltered); - } - public void writeAclAttribute(DefaultClusterCallback callback, ArrayList value) { - writeAclAttribute(chipClusterPtr, callback, value, null); - } - - public void writeAclAttribute(DefaultClusterCallback callback, ArrayList value, int timedWriteTimeoutMs) { - writeAclAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeAclAttribute( - AclAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAclAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readExtensionAttribute( - ExtensionAttributeCallback callback - ) { - readExtensionAttribute(chipClusterPtr, callback, true); - } - public void readExtensionAttributeWithFabricFilter( - ExtensionAttributeCallback callback - , - boolean isFabricFiltered - ) { - readExtensionAttribute(chipClusterPtr, callback, isFabricFiltered); - } - public void writeExtensionAttribute(DefaultClusterCallback callback, ArrayList value) { - writeExtensionAttribute(chipClusterPtr, callback, value, null); - } - - public void writeExtensionAttribute(DefaultClusterCallback callback, ArrayList value, int timedWriteTimeoutMs) { - writeExtensionAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeExtensionAttribute( - ExtensionAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeExtensionAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readSubjectsPerAccessControlEntryAttribute( - IntegerAttributeCallback callback - ) { - readSubjectsPerAccessControlEntryAttribute(chipClusterPtr, callback); - } - public void subscribeSubjectsPerAccessControlEntryAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeSubjectsPerAccessControlEntryAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readTargetsPerAccessControlEntryAttribute( - IntegerAttributeCallback callback - ) { - readTargetsPerAccessControlEntryAttribute(chipClusterPtr, callback); - } - public void subscribeTargetsPerAccessControlEntryAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeTargetsPerAccessControlEntryAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAccessControlEntriesPerFabricAttribute( - IntegerAttributeCallback callback - ) { - readAccessControlEntriesPerFabricAttribute(chipClusterPtr, callback); - } - public void subscribeAccessControlEntriesPerFabricAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeAccessControlEntriesPerFabricAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - ) { - readGeneratedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - ) { - readAcceptedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readEventListAttribute( - EventListAttributeCallback callback - ) { - readEventListAttribute(chipClusterPtr, callback); - } - public void subscribeEventListAttribute( - EventListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAttributeListAttribute( - AttributeListAttributeCallback callback - ) { - readAttributeListAttribute(chipClusterPtr, callback); - } - public void subscribeAttributeListAttribute( - AttributeListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readFeatureMapAttribute( - LongAttributeCallback callback - ) { - readFeatureMapAttribute(chipClusterPtr, callback); - } - public void subscribeFeatureMapAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readClusterRevisionAttribute( - IntegerAttributeCallback callback - ) { - readClusterRevisionAttribute(chipClusterPtr, callback); - } - public void subscribeClusterRevisionAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - private native void readAclAttribute(long chipClusterPtr, - AclAttributeCallback callback - , boolean isFabricFiltered - ); - - private native void writeAclAttribute(long chipClusterPtr, DefaultClusterCallback callback, ArrayList value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeAclAttribute(long chipClusterPtr, - AclAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readExtensionAttribute(long chipClusterPtr, - ExtensionAttributeCallback callback - , boolean isFabricFiltered - ); - - private native void writeExtensionAttribute(long chipClusterPtr, DefaultClusterCallback callback, ArrayList value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeExtensionAttribute(long chipClusterPtr, - ExtensionAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readSubjectsPerAccessControlEntryAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeSubjectsPerAccessControlEntryAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readTargetsPerAccessControlEntryAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeTargetsPerAccessControlEntryAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readAccessControlEntriesPerFabricAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeAccessControlEntriesPerFabricAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - ); - private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - ); - private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - ); - private native void subscribeEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - ); - private native void subscribeAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - } - - public static class ActionsCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 0x00000025L; - - public ActionsCluster(long devicePtr, int endpointId) { - super(devicePtr, endpointId); - } - - @Override - public native long initWithDevice(long devicePtr, int endpointId); - - public void instantAction(DefaultClusterCallback callback - , Integer actionID, Optional invokeID) { - instantAction(chipClusterPtr, callback, actionID, invokeID, null); - } - - public void instantAction(DefaultClusterCallback callback - , Integer actionID, Optional invokeID - , int timedInvokeTimeoutMs) { - instantAction(chipClusterPtr, callback, actionID, invokeID, timedInvokeTimeoutMs); - } - - public void instantActionWithTransition(DefaultClusterCallback callback - , Integer actionID, Optional invokeID, Integer transitionTime) { - instantActionWithTransition(chipClusterPtr, callback, actionID, invokeID, transitionTime, null); - } - - public void instantActionWithTransition(DefaultClusterCallback callback - , Integer actionID, Optional invokeID, Integer transitionTime - , int timedInvokeTimeoutMs) { - instantActionWithTransition(chipClusterPtr, callback, actionID, invokeID, transitionTime, timedInvokeTimeoutMs); - } - - public void startAction(DefaultClusterCallback callback - , Integer actionID, Optional invokeID) { - startAction(chipClusterPtr, callback, actionID, invokeID, null); - } - - public void startAction(DefaultClusterCallback callback - , Integer actionID, Optional invokeID - , int timedInvokeTimeoutMs) { - startAction(chipClusterPtr, callback, actionID, invokeID, timedInvokeTimeoutMs); - } - - public void startActionWithDuration(DefaultClusterCallback callback - , Integer actionID, Optional invokeID, Long duration) { - startActionWithDuration(chipClusterPtr, callback, actionID, invokeID, duration, null); - } - - public void startActionWithDuration(DefaultClusterCallback callback - , Integer actionID, Optional invokeID, Long duration - , int timedInvokeTimeoutMs) { - startActionWithDuration(chipClusterPtr, callback, actionID, invokeID, duration, timedInvokeTimeoutMs); - } - - public void stopAction(DefaultClusterCallback callback - , Integer actionID, Optional invokeID) { - stopAction(chipClusterPtr, callback, actionID, invokeID, null); - } - - public void stopAction(DefaultClusterCallback callback - , Integer actionID, Optional invokeID - , int timedInvokeTimeoutMs) { - stopAction(chipClusterPtr, callback, actionID, invokeID, timedInvokeTimeoutMs); - } - - public void pauseAction(DefaultClusterCallback callback - , Integer actionID, Optional invokeID) { - pauseAction(chipClusterPtr, callback, actionID, invokeID, null); - } - - public void pauseAction(DefaultClusterCallback callback - , Integer actionID, Optional invokeID - , int timedInvokeTimeoutMs) { - pauseAction(chipClusterPtr, callback, actionID, invokeID, timedInvokeTimeoutMs); - } - - public void pauseActionWithDuration(DefaultClusterCallback callback - , Integer actionID, Optional invokeID, Long duration) { - pauseActionWithDuration(chipClusterPtr, callback, actionID, invokeID, duration, null); - } - - public void pauseActionWithDuration(DefaultClusterCallback callback - , Integer actionID, Optional invokeID, Long duration - , int timedInvokeTimeoutMs) { - pauseActionWithDuration(chipClusterPtr, callback, actionID, invokeID, duration, timedInvokeTimeoutMs); - } - - public void resumeAction(DefaultClusterCallback callback - , Integer actionID, Optional invokeID) { - resumeAction(chipClusterPtr, callback, actionID, invokeID, null); - } - - public void resumeAction(DefaultClusterCallback callback - , Integer actionID, Optional invokeID - , int timedInvokeTimeoutMs) { - resumeAction(chipClusterPtr, callback, actionID, invokeID, timedInvokeTimeoutMs); - } - - public void enableAction(DefaultClusterCallback callback - , Integer actionID, Optional invokeID) { - enableAction(chipClusterPtr, callback, actionID, invokeID, null); - } - - public void enableAction(DefaultClusterCallback callback - , Integer actionID, Optional invokeID - , int timedInvokeTimeoutMs) { - enableAction(chipClusterPtr, callback, actionID, invokeID, timedInvokeTimeoutMs); - } - - public void enableActionWithDuration(DefaultClusterCallback callback - , Integer actionID, Optional invokeID, Long duration) { - enableActionWithDuration(chipClusterPtr, callback, actionID, invokeID, duration, null); - } - - public void enableActionWithDuration(DefaultClusterCallback callback - , Integer actionID, Optional invokeID, Long duration - , int timedInvokeTimeoutMs) { - enableActionWithDuration(chipClusterPtr, callback, actionID, invokeID, duration, timedInvokeTimeoutMs); - } - - public void disableAction(DefaultClusterCallback callback - , Integer actionID, Optional invokeID) { - disableAction(chipClusterPtr, callback, actionID, invokeID, null); - } - - public void disableAction(DefaultClusterCallback callback - , Integer actionID, Optional invokeID - , int timedInvokeTimeoutMs) { - disableAction(chipClusterPtr, callback, actionID, invokeID, timedInvokeTimeoutMs); - } - - public void disableActionWithDuration(DefaultClusterCallback callback - , Integer actionID, Optional invokeID, Long duration) { - disableActionWithDuration(chipClusterPtr, callback, actionID, invokeID, duration, null); - } - - public void disableActionWithDuration(DefaultClusterCallback callback - , Integer actionID, Optional invokeID, Long duration - , int timedInvokeTimeoutMs) { - disableActionWithDuration(chipClusterPtr, callback, actionID, invokeID, duration, timedInvokeTimeoutMs); - } - private native void instantAction(long chipClusterPtr, DefaultClusterCallback Callback - , Integer actionID, Optional invokeID - , @Nullable Integer timedInvokeTimeoutMs); - private native void instantActionWithTransition(long chipClusterPtr, DefaultClusterCallback Callback - , Integer actionID, Optional invokeID, Integer transitionTime - , @Nullable Integer timedInvokeTimeoutMs); - private native void startAction(long chipClusterPtr, DefaultClusterCallback Callback - , Integer actionID, Optional invokeID - , @Nullable Integer timedInvokeTimeoutMs); - private native void startActionWithDuration(long chipClusterPtr, DefaultClusterCallback Callback - , Integer actionID, Optional invokeID, Long duration - , @Nullable Integer timedInvokeTimeoutMs); - private native void stopAction(long chipClusterPtr, DefaultClusterCallback Callback - , Integer actionID, Optional invokeID - , @Nullable Integer timedInvokeTimeoutMs); - private native void pauseAction(long chipClusterPtr, DefaultClusterCallback Callback - , Integer actionID, Optional invokeID - , @Nullable Integer timedInvokeTimeoutMs); - private native void pauseActionWithDuration(long chipClusterPtr, DefaultClusterCallback Callback - , Integer actionID, Optional invokeID, Long duration - , @Nullable Integer timedInvokeTimeoutMs); - private native void resumeAction(long chipClusterPtr, DefaultClusterCallback Callback - , Integer actionID, Optional invokeID - , @Nullable Integer timedInvokeTimeoutMs); - private native void enableAction(long chipClusterPtr, DefaultClusterCallback Callback - , Integer actionID, Optional invokeID - , @Nullable Integer timedInvokeTimeoutMs); - private native void enableActionWithDuration(long chipClusterPtr, DefaultClusterCallback Callback - , Integer actionID, Optional invokeID, Long duration - , @Nullable Integer timedInvokeTimeoutMs); - private native void disableAction(long chipClusterPtr, DefaultClusterCallback Callback - , Integer actionID, Optional invokeID - , @Nullable Integer timedInvokeTimeoutMs); - private native void disableActionWithDuration(long chipClusterPtr, DefaultClusterCallback Callback - , Integer actionID, Optional invokeID, Long duration - , @Nullable Integer timedInvokeTimeoutMs); - - public interface ActionListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface EndpointListsAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface GeneratedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AcceptedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface EventListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AttributeListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - - public void readActionListAttribute( - ActionListAttributeCallback callback - ) { - readActionListAttribute(chipClusterPtr, callback); - } - public void subscribeActionListAttribute( - ActionListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeActionListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readEndpointListsAttribute( - EndpointListsAttributeCallback callback - ) { - readEndpointListsAttribute(chipClusterPtr, callback); - } - public void subscribeEndpointListsAttribute( - EndpointListsAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeEndpointListsAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readSetupURLAttribute( - CharStringAttributeCallback callback - ) { - readSetupURLAttribute(chipClusterPtr, callback); - } - public void subscribeSetupURLAttribute( - CharStringAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeSetupURLAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - ) { - readGeneratedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - ) { - readAcceptedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readEventListAttribute( - EventListAttributeCallback callback - ) { - readEventListAttribute(chipClusterPtr, callback); - } - public void subscribeEventListAttribute( - EventListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAttributeListAttribute( - AttributeListAttributeCallback callback - ) { - readAttributeListAttribute(chipClusterPtr, callback); - } - public void subscribeAttributeListAttribute( - AttributeListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readFeatureMapAttribute( - LongAttributeCallback callback - ) { - readFeatureMapAttribute(chipClusterPtr, callback); - } - public void subscribeFeatureMapAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readClusterRevisionAttribute( - IntegerAttributeCallback callback - ) { - readClusterRevisionAttribute(chipClusterPtr, callback); - } - public void subscribeClusterRevisionAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - private native void readActionListAttribute(long chipClusterPtr, - ActionListAttributeCallback callback - ); - private native void subscribeActionListAttribute(long chipClusterPtr, - ActionListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readEndpointListsAttribute(long chipClusterPtr, - EndpointListsAttributeCallback callback - ); - private native void subscribeEndpointListsAttribute(long chipClusterPtr, - EndpointListsAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readSetupURLAttribute(long chipClusterPtr, - CharStringAttributeCallback callback - ); - private native void subscribeSetupURLAttribute(long chipClusterPtr, - CharStringAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - ); - private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - ); - private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - ); - private native void subscribeEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - ); - private native void subscribeAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - } - - public static class BasicInformationCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 0x00000028L; - - public BasicInformationCluster(long devicePtr, int endpointId) { - super(devicePtr, endpointId); - } - - @Override - public native long initWithDevice(long devicePtr, int endpointId); - - public void mfgSpecificPing(DefaultClusterCallback callback - ) { - mfgSpecificPing(chipClusterPtr, callback, null); - } - - public void mfgSpecificPing(DefaultClusterCallback callback - - , int timedInvokeTimeoutMs) { - mfgSpecificPing(chipClusterPtr, callback, timedInvokeTimeoutMs); - } - private native void mfgSpecificPing(long chipClusterPtr, DefaultClusterCallback Callback - - , @Nullable Integer timedInvokeTimeoutMs); - - public interface GeneratedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AcceptedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface EventListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AttributeListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - - public void readDataModelRevisionAttribute( - IntegerAttributeCallback callback - ) { - readDataModelRevisionAttribute(chipClusterPtr, callback); - } - public void subscribeDataModelRevisionAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeDataModelRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readVendorNameAttribute( - CharStringAttributeCallback callback - ) { - readVendorNameAttribute(chipClusterPtr, callback); - } - public void subscribeVendorNameAttribute( - CharStringAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeVendorNameAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readVendorIDAttribute( - IntegerAttributeCallback callback - ) { - readVendorIDAttribute(chipClusterPtr, callback); - } - public void subscribeVendorIDAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeVendorIDAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readProductNameAttribute( - CharStringAttributeCallback callback - ) { - readProductNameAttribute(chipClusterPtr, callback); - } - public void subscribeProductNameAttribute( - CharStringAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeProductNameAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readProductIDAttribute( - IntegerAttributeCallback callback - ) { - readProductIDAttribute(chipClusterPtr, callback); - } - public void subscribeProductIDAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeProductIDAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readNodeLabelAttribute( - CharStringAttributeCallback callback - ) { - readNodeLabelAttribute(chipClusterPtr, callback); - } - public void writeNodeLabelAttribute(DefaultClusterCallback callback, String value) { - writeNodeLabelAttribute(chipClusterPtr, callback, value, null); - } - - public void writeNodeLabelAttribute(DefaultClusterCallback callback, String value, int timedWriteTimeoutMs) { - writeNodeLabelAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeNodeLabelAttribute( - CharStringAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeNodeLabelAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readLocationAttribute( - CharStringAttributeCallback callback - ) { - readLocationAttribute(chipClusterPtr, callback); - } - public void writeLocationAttribute(DefaultClusterCallback callback, String value) { - writeLocationAttribute(chipClusterPtr, callback, value, null); - } - - public void writeLocationAttribute(DefaultClusterCallback callback, String value, int timedWriteTimeoutMs) { - writeLocationAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeLocationAttribute( - CharStringAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeLocationAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readHardwareVersionAttribute( - IntegerAttributeCallback callback - ) { - readHardwareVersionAttribute(chipClusterPtr, callback); - } - public void subscribeHardwareVersionAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeHardwareVersionAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readHardwareVersionStringAttribute( - CharStringAttributeCallback callback - ) { - readHardwareVersionStringAttribute(chipClusterPtr, callback); - } - public void subscribeHardwareVersionStringAttribute( - CharStringAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeHardwareVersionStringAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readSoftwareVersionAttribute( - LongAttributeCallback callback - ) { - readSoftwareVersionAttribute(chipClusterPtr, callback); - } - public void subscribeSoftwareVersionAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeSoftwareVersionAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readSoftwareVersionStringAttribute( - CharStringAttributeCallback callback - ) { - readSoftwareVersionStringAttribute(chipClusterPtr, callback); - } - public void subscribeSoftwareVersionStringAttribute( - CharStringAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeSoftwareVersionStringAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readManufacturingDateAttribute( - CharStringAttributeCallback callback - ) { - readManufacturingDateAttribute(chipClusterPtr, callback); - } - public void subscribeManufacturingDateAttribute( - CharStringAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeManufacturingDateAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readPartNumberAttribute( - CharStringAttributeCallback callback - ) { - readPartNumberAttribute(chipClusterPtr, callback); - } - public void subscribePartNumberAttribute( - CharStringAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribePartNumberAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readProductURLAttribute( - CharStringAttributeCallback callback - ) { - readProductURLAttribute(chipClusterPtr, callback); - } - public void subscribeProductURLAttribute( - CharStringAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeProductURLAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readProductLabelAttribute( - CharStringAttributeCallback callback - ) { - readProductLabelAttribute(chipClusterPtr, callback); - } - public void subscribeProductLabelAttribute( - CharStringAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeProductLabelAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readSerialNumberAttribute( - CharStringAttributeCallback callback - ) { - readSerialNumberAttribute(chipClusterPtr, callback); - } - public void subscribeSerialNumberAttribute( - CharStringAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeSerialNumberAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readLocalConfigDisabledAttribute( - BooleanAttributeCallback callback - ) { - readLocalConfigDisabledAttribute(chipClusterPtr, callback); - } - public void writeLocalConfigDisabledAttribute(DefaultClusterCallback callback, Boolean value) { - writeLocalConfigDisabledAttribute(chipClusterPtr, callback, value, null); - } - - public void writeLocalConfigDisabledAttribute(DefaultClusterCallback callback, Boolean value, int timedWriteTimeoutMs) { - writeLocalConfigDisabledAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeLocalConfigDisabledAttribute( - BooleanAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeLocalConfigDisabledAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readReachableAttribute( - BooleanAttributeCallback callback - ) { - readReachableAttribute(chipClusterPtr, callback); - } - public void subscribeReachableAttribute( - BooleanAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeReachableAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readUniqueIDAttribute( - CharStringAttributeCallback callback - ) { - readUniqueIDAttribute(chipClusterPtr, callback); - } - public void subscribeUniqueIDAttribute( - CharStringAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeUniqueIDAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - ) { - readGeneratedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - ) { - readAcceptedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readEventListAttribute( - EventListAttributeCallback callback - ) { - readEventListAttribute(chipClusterPtr, callback); - } - public void subscribeEventListAttribute( - EventListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAttributeListAttribute( - AttributeListAttributeCallback callback - ) { - readAttributeListAttribute(chipClusterPtr, callback); - } - public void subscribeAttributeListAttribute( - AttributeListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readFeatureMapAttribute( - LongAttributeCallback callback - ) { - readFeatureMapAttribute(chipClusterPtr, callback); - } - public void subscribeFeatureMapAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readClusterRevisionAttribute( - IntegerAttributeCallback callback - ) { - readClusterRevisionAttribute(chipClusterPtr, callback); - } - public void subscribeClusterRevisionAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - private native void readDataModelRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeDataModelRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readVendorNameAttribute(long chipClusterPtr, - CharStringAttributeCallback callback - ); - private native void subscribeVendorNameAttribute(long chipClusterPtr, - CharStringAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readVendorIDAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeVendorIDAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readProductNameAttribute(long chipClusterPtr, - CharStringAttributeCallback callback - ); - private native void subscribeProductNameAttribute(long chipClusterPtr, - CharStringAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readProductIDAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeProductIDAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readNodeLabelAttribute(long chipClusterPtr, - CharStringAttributeCallback callback - ); - - private native void writeNodeLabelAttribute(long chipClusterPtr, DefaultClusterCallback callback, String value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeNodeLabelAttribute(long chipClusterPtr, - CharStringAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readLocationAttribute(long chipClusterPtr, - CharStringAttributeCallback callback - ); - - private native void writeLocationAttribute(long chipClusterPtr, DefaultClusterCallback callback, String value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeLocationAttribute(long chipClusterPtr, - CharStringAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readHardwareVersionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeHardwareVersionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readHardwareVersionStringAttribute(long chipClusterPtr, - CharStringAttributeCallback callback - ); - private native void subscribeHardwareVersionStringAttribute(long chipClusterPtr, - CharStringAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readSoftwareVersionAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeSoftwareVersionAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readSoftwareVersionStringAttribute(long chipClusterPtr, - CharStringAttributeCallback callback - ); - private native void subscribeSoftwareVersionStringAttribute(long chipClusterPtr, - CharStringAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readManufacturingDateAttribute(long chipClusterPtr, - CharStringAttributeCallback callback - ); - private native void subscribeManufacturingDateAttribute(long chipClusterPtr, - CharStringAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readPartNumberAttribute(long chipClusterPtr, - CharStringAttributeCallback callback - ); - private native void subscribePartNumberAttribute(long chipClusterPtr, - CharStringAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readProductURLAttribute(long chipClusterPtr, - CharStringAttributeCallback callback - ); - private native void subscribeProductURLAttribute(long chipClusterPtr, - CharStringAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readProductLabelAttribute(long chipClusterPtr, - CharStringAttributeCallback callback - ); - private native void subscribeProductLabelAttribute(long chipClusterPtr, - CharStringAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readSerialNumberAttribute(long chipClusterPtr, - CharStringAttributeCallback callback - ); - private native void subscribeSerialNumberAttribute(long chipClusterPtr, - CharStringAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readLocalConfigDisabledAttribute(long chipClusterPtr, - BooleanAttributeCallback callback - ); - - private native void writeLocalConfigDisabledAttribute(long chipClusterPtr, DefaultClusterCallback callback, Boolean value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeLocalConfigDisabledAttribute(long chipClusterPtr, - BooleanAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readReachableAttribute(long chipClusterPtr, - BooleanAttributeCallback callback - ); - private native void subscribeReachableAttribute(long chipClusterPtr, - BooleanAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readUniqueIDAttribute(long chipClusterPtr, - CharStringAttributeCallback callback - ); - private native void subscribeUniqueIDAttribute(long chipClusterPtr, - CharStringAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - ); - private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - ); - private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - ); - private native void subscribeEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - ); - private native void subscribeAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - } - - public static class OtaSoftwareUpdateProviderCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 0x00000029L; - - public OtaSoftwareUpdateProviderCluster(long devicePtr, int endpointId) { - super(devicePtr, endpointId); - } - - @Override - public native long initWithDevice(long devicePtr, int endpointId); - - public void queryImage(QueryImageResponseCallback callback - , Integer vendorID, Integer productID, Long softwareVersion, ArrayList protocolsSupported, Optional hardwareVersion, Optional location, Optional requestorCanConsent, Optional metadataForProvider) { - queryImage(chipClusterPtr, callback, vendorID, productID, softwareVersion, protocolsSupported, hardwareVersion, location, requestorCanConsent, metadataForProvider, null); - } - - public void queryImage(QueryImageResponseCallback callback - , Integer vendorID, Integer productID, Long softwareVersion, ArrayList protocolsSupported, Optional hardwareVersion, Optional location, Optional requestorCanConsent, Optional metadataForProvider - , int timedInvokeTimeoutMs) { - queryImage(chipClusterPtr, callback, vendorID, productID, softwareVersion, protocolsSupported, hardwareVersion, location, requestorCanConsent, metadataForProvider, timedInvokeTimeoutMs); - } - - public void applyUpdateRequest(ApplyUpdateResponseCallback callback - , byte[] updateToken, Long newVersion) { - applyUpdateRequest(chipClusterPtr, callback, updateToken, newVersion, null); - } - - public void applyUpdateRequest(ApplyUpdateResponseCallback callback - , byte[] updateToken, Long newVersion - , int timedInvokeTimeoutMs) { - applyUpdateRequest(chipClusterPtr, callback, updateToken, newVersion, timedInvokeTimeoutMs); - } - - public void notifyUpdateApplied(DefaultClusterCallback callback - , byte[] updateToken, Long softwareVersion) { - notifyUpdateApplied(chipClusterPtr, callback, updateToken, softwareVersion, null); - } - - public void notifyUpdateApplied(DefaultClusterCallback callback - , byte[] updateToken, Long softwareVersion - , int timedInvokeTimeoutMs) { - notifyUpdateApplied(chipClusterPtr, callback, updateToken, softwareVersion, timedInvokeTimeoutMs); - } - private native void queryImage(long chipClusterPtr, QueryImageResponseCallback Callback - , Integer vendorID, Integer productID, Long softwareVersion, ArrayList protocolsSupported, Optional hardwareVersion, Optional location, Optional requestorCanConsent, Optional metadataForProvider - , @Nullable Integer timedInvokeTimeoutMs); - private native void applyUpdateRequest(long chipClusterPtr, ApplyUpdateResponseCallback Callback - , byte[] updateToken, Long newVersion - , @Nullable Integer timedInvokeTimeoutMs); - private native void notifyUpdateApplied(long chipClusterPtr, DefaultClusterCallback Callback - , byte[] updateToken, Long softwareVersion - , @Nullable Integer timedInvokeTimeoutMs); - public interface QueryImageResponseCallback { - void onSuccess(Integer status, Optional delayedActionTime, Optional imageURI, Optional softwareVersion, Optional softwareVersionString, Optional updateToken, Optional userConsentNeeded, Optional metadataForRequestor); - - void onError(Exception error); - } - - public interface ApplyUpdateResponseCallback { - void onSuccess(Integer action, Long delayedActionTime); - - void onError(Exception error); - } - - - public interface GeneratedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AcceptedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface EventListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AttributeListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - - public void readGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - ) { - readGeneratedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - ) { - readAcceptedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readEventListAttribute( - EventListAttributeCallback callback - ) { - readEventListAttribute(chipClusterPtr, callback); - } - public void subscribeEventListAttribute( - EventListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAttributeListAttribute( - AttributeListAttributeCallback callback - ) { - readAttributeListAttribute(chipClusterPtr, callback); - } - public void subscribeAttributeListAttribute( - AttributeListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readFeatureMapAttribute( - LongAttributeCallback callback - ) { - readFeatureMapAttribute(chipClusterPtr, callback); - } - public void subscribeFeatureMapAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readClusterRevisionAttribute( - IntegerAttributeCallback callback - ) { - readClusterRevisionAttribute(chipClusterPtr, callback); - } - public void subscribeClusterRevisionAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - private native void readGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - ); - private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - ); - private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - ); - private native void subscribeEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - ); - private native void subscribeAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - } - - public static class OtaSoftwareUpdateRequestorCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 0x0000002AL; - - public OtaSoftwareUpdateRequestorCluster(long devicePtr, int endpointId) { - super(devicePtr, endpointId); - } - - @Override - public native long initWithDevice(long devicePtr, int endpointId); - - public void announceOTAProvider(DefaultClusterCallback callback - , Long providerNodeID, Integer vendorID, Integer announcementReason, Optional metadataForNode, Integer endpoint) { - announceOTAProvider(chipClusterPtr, callback, providerNodeID, vendorID, announcementReason, metadataForNode, endpoint, null); - } - - public void announceOTAProvider(DefaultClusterCallback callback - , Long providerNodeID, Integer vendorID, Integer announcementReason, Optional metadataForNode, Integer endpoint - , int timedInvokeTimeoutMs) { - announceOTAProvider(chipClusterPtr, callback, providerNodeID, vendorID, announcementReason, metadataForNode, endpoint, timedInvokeTimeoutMs); - } - private native void announceOTAProvider(long chipClusterPtr, DefaultClusterCallback Callback - , Long providerNodeID, Integer vendorID, Integer announcementReason, Optional metadataForNode, Integer endpoint - , @Nullable Integer timedInvokeTimeoutMs); - - public interface DefaultOTAProvidersAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface UpdateStateProgressAttributeCallback { - void onSuccess(@Nullable Integer value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface GeneratedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AcceptedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface EventListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AttributeListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - - public void readDefaultOTAProvidersAttribute( - DefaultOTAProvidersAttributeCallback callback - ) { - readDefaultOTAProvidersAttribute(chipClusterPtr, callback, true); - } - public void readDefaultOTAProvidersAttributeWithFabricFilter( - DefaultOTAProvidersAttributeCallback callback - , - boolean isFabricFiltered - ) { - readDefaultOTAProvidersAttribute(chipClusterPtr, callback, isFabricFiltered); - } - public void writeDefaultOTAProvidersAttribute(DefaultClusterCallback callback, ArrayList value) { - writeDefaultOTAProvidersAttribute(chipClusterPtr, callback, value, null); - } - - public void writeDefaultOTAProvidersAttribute(DefaultClusterCallback callback, ArrayList value, int timedWriteTimeoutMs) { - writeDefaultOTAProvidersAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeDefaultOTAProvidersAttribute( - DefaultOTAProvidersAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeDefaultOTAProvidersAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readUpdatePossibleAttribute( - BooleanAttributeCallback callback - ) { - readUpdatePossibleAttribute(chipClusterPtr, callback); - } - public void subscribeUpdatePossibleAttribute( - BooleanAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeUpdatePossibleAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readUpdateStateAttribute( - IntegerAttributeCallback callback - ) { - readUpdateStateAttribute(chipClusterPtr, callback); - } - public void subscribeUpdateStateAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeUpdateStateAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readUpdateStateProgressAttribute( - UpdateStateProgressAttributeCallback callback - ) { - readUpdateStateProgressAttribute(chipClusterPtr, callback); - } - public void subscribeUpdateStateProgressAttribute( - UpdateStateProgressAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeUpdateStateProgressAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - ) { - readGeneratedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - ) { - readAcceptedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readEventListAttribute( - EventListAttributeCallback callback - ) { - readEventListAttribute(chipClusterPtr, callback); - } - public void subscribeEventListAttribute( - EventListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAttributeListAttribute( - AttributeListAttributeCallback callback - ) { - readAttributeListAttribute(chipClusterPtr, callback); - } - public void subscribeAttributeListAttribute( - AttributeListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readFeatureMapAttribute( - LongAttributeCallback callback - ) { - readFeatureMapAttribute(chipClusterPtr, callback); - } - public void subscribeFeatureMapAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readClusterRevisionAttribute( - IntegerAttributeCallback callback - ) { - readClusterRevisionAttribute(chipClusterPtr, callback); - } - public void subscribeClusterRevisionAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - private native void readDefaultOTAProvidersAttribute(long chipClusterPtr, - DefaultOTAProvidersAttributeCallback callback - , boolean isFabricFiltered - ); - - private native void writeDefaultOTAProvidersAttribute(long chipClusterPtr, DefaultClusterCallback callback, ArrayList value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeDefaultOTAProvidersAttribute(long chipClusterPtr, - DefaultOTAProvidersAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readUpdatePossibleAttribute(long chipClusterPtr, - BooleanAttributeCallback callback - ); - private native void subscribeUpdatePossibleAttribute(long chipClusterPtr, - BooleanAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readUpdateStateAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeUpdateStateAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readUpdateStateProgressAttribute(long chipClusterPtr, - UpdateStateProgressAttributeCallback callback - ); - private native void subscribeUpdateStateProgressAttribute(long chipClusterPtr, - UpdateStateProgressAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - ); - private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - ); - private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - ); - private native void subscribeEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - ); - private native void subscribeAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - } - - public static class LocalizationConfigurationCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 0x0000002BL; - - public LocalizationConfigurationCluster(long devicePtr, int endpointId) { - super(devicePtr, endpointId); - } - - @Override - public native long initWithDevice(long devicePtr, int endpointId); - - public interface SupportedLocalesAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface GeneratedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AcceptedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface EventListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AttributeListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - - public void readActiveLocaleAttribute( - CharStringAttributeCallback callback - ) { - readActiveLocaleAttribute(chipClusterPtr, callback); - } - public void writeActiveLocaleAttribute(DefaultClusterCallback callback, String value) { - writeActiveLocaleAttribute(chipClusterPtr, callback, value, null); - } - - public void writeActiveLocaleAttribute(DefaultClusterCallback callback, String value, int timedWriteTimeoutMs) { - writeActiveLocaleAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeActiveLocaleAttribute( - CharStringAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeActiveLocaleAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readSupportedLocalesAttribute( - SupportedLocalesAttributeCallback callback - ) { - readSupportedLocalesAttribute(chipClusterPtr, callback); - } - public void subscribeSupportedLocalesAttribute( - SupportedLocalesAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeSupportedLocalesAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - ) { - readGeneratedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - ) { - readAcceptedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readEventListAttribute( - EventListAttributeCallback callback - ) { - readEventListAttribute(chipClusterPtr, callback); - } - public void subscribeEventListAttribute( - EventListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAttributeListAttribute( - AttributeListAttributeCallback callback - ) { - readAttributeListAttribute(chipClusterPtr, callback); - } - public void subscribeAttributeListAttribute( - AttributeListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readFeatureMapAttribute( - LongAttributeCallback callback - ) { - readFeatureMapAttribute(chipClusterPtr, callback); - } - public void subscribeFeatureMapAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readClusterRevisionAttribute( - IntegerAttributeCallback callback - ) { - readClusterRevisionAttribute(chipClusterPtr, callback); - } - public void subscribeClusterRevisionAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - private native void readActiveLocaleAttribute(long chipClusterPtr, - CharStringAttributeCallback callback - ); - - private native void writeActiveLocaleAttribute(long chipClusterPtr, DefaultClusterCallback callback, String value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeActiveLocaleAttribute(long chipClusterPtr, - CharStringAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readSupportedLocalesAttribute(long chipClusterPtr, - SupportedLocalesAttributeCallback callback - ); - private native void subscribeSupportedLocalesAttribute(long chipClusterPtr, - SupportedLocalesAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - ); - private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - ); - private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - ); - private native void subscribeEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - ); - private native void subscribeAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - } - - public static class TimeFormatLocalizationCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 0x0000002CL; - - public TimeFormatLocalizationCluster(long devicePtr, int endpointId) { - super(devicePtr, endpointId); - } - - @Override - public native long initWithDevice(long devicePtr, int endpointId); - - public interface SupportedCalendarTypesAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface GeneratedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AcceptedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface EventListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AttributeListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - - public void readHourFormatAttribute( - IntegerAttributeCallback callback - ) { - readHourFormatAttribute(chipClusterPtr, callback); - } - public void writeHourFormatAttribute(DefaultClusterCallback callback, Integer value) { - writeHourFormatAttribute(chipClusterPtr, callback, value, null); - } - - public void writeHourFormatAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeHourFormatAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeHourFormatAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeHourFormatAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readActiveCalendarTypeAttribute( - IntegerAttributeCallback callback - ) { - readActiveCalendarTypeAttribute(chipClusterPtr, callback); - } - public void writeActiveCalendarTypeAttribute(DefaultClusterCallback callback, Integer value) { - writeActiveCalendarTypeAttribute(chipClusterPtr, callback, value, null); - } - - public void writeActiveCalendarTypeAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeActiveCalendarTypeAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeActiveCalendarTypeAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeActiveCalendarTypeAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readSupportedCalendarTypesAttribute( - SupportedCalendarTypesAttributeCallback callback - ) { - readSupportedCalendarTypesAttribute(chipClusterPtr, callback); - } - public void subscribeSupportedCalendarTypesAttribute( - SupportedCalendarTypesAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeSupportedCalendarTypesAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - ) { - readGeneratedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - ) { - readAcceptedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readEventListAttribute( - EventListAttributeCallback callback - ) { - readEventListAttribute(chipClusterPtr, callback); - } - public void subscribeEventListAttribute( - EventListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAttributeListAttribute( - AttributeListAttributeCallback callback - ) { - readAttributeListAttribute(chipClusterPtr, callback); - } - public void subscribeAttributeListAttribute( - AttributeListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readFeatureMapAttribute( - LongAttributeCallback callback - ) { - readFeatureMapAttribute(chipClusterPtr, callback); - } - public void subscribeFeatureMapAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readClusterRevisionAttribute( - IntegerAttributeCallback callback - ) { - readClusterRevisionAttribute(chipClusterPtr, callback); - } - public void subscribeClusterRevisionAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - private native void readHourFormatAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - - private native void writeHourFormatAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeHourFormatAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readActiveCalendarTypeAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - - private native void writeActiveCalendarTypeAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeActiveCalendarTypeAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readSupportedCalendarTypesAttribute(long chipClusterPtr, - SupportedCalendarTypesAttributeCallback callback - ); - private native void subscribeSupportedCalendarTypesAttribute(long chipClusterPtr, - SupportedCalendarTypesAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - ); - private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - ); - private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - ); - private native void subscribeEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - ); - private native void subscribeAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - } - - public static class UnitLocalizationCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 0x0000002DL; - - public UnitLocalizationCluster(long devicePtr, int endpointId) { - super(devicePtr, endpointId); - } - - @Override - public native long initWithDevice(long devicePtr, int endpointId); - - public interface GeneratedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AcceptedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface EventListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AttributeListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - - public void readTemperatureUnitAttribute( - IntegerAttributeCallback callback - ) { - readTemperatureUnitAttribute(chipClusterPtr, callback); - } - public void writeTemperatureUnitAttribute(DefaultClusterCallback callback, Integer value) { - writeTemperatureUnitAttribute(chipClusterPtr, callback, value, null); - } - - public void writeTemperatureUnitAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeTemperatureUnitAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeTemperatureUnitAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeTemperatureUnitAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - ) { - readGeneratedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - ) { - readAcceptedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readEventListAttribute( - EventListAttributeCallback callback - ) { - readEventListAttribute(chipClusterPtr, callback); - } - public void subscribeEventListAttribute( - EventListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAttributeListAttribute( - AttributeListAttributeCallback callback - ) { - readAttributeListAttribute(chipClusterPtr, callback); - } - public void subscribeAttributeListAttribute( - AttributeListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readFeatureMapAttribute( - LongAttributeCallback callback - ) { - readFeatureMapAttribute(chipClusterPtr, callback); - } - public void subscribeFeatureMapAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readClusterRevisionAttribute( - IntegerAttributeCallback callback - ) { - readClusterRevisionAttribute(chipClusterPtr, callback); - } - public void subscribeClusterRevisionAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - private native void readTemperatureUnitAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - - private native void writeTemperatureUnitAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeTemperatureUnitAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - ); - private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - ); - private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - ); - private native void subscribeEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - ); - private native void subscribeAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - } - - public static class PowerSourceConfigurationCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 0x0000002EL; - - public PowerSourceConfigurationCluster(long devicePtr, int endpointId) { - super(devicePtr, endpointId); - } - - @Override - public native long initWithDevice(long devicePtr, int endpointId); - - public interface SourcesAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface GeneratedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AcceptedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface EventListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AttributeListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - - public void readSourcesAttribute( - SourcesAttributeCallback callback - ) { - readSourcesAttribute(chipClusterPtr, callback); - } - public void subscribeSourcesAttribute( - SourcesAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeSourcesAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - ) { - readGeneratedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - ) { - readAcceptedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readEventListAttribute( - EventListAttributeCallback callback - ) { - readEventListAttribute(chipClusterPtr, callback); - } - public void subscribeEventListAttribute( - EventListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAttributeListAttribute( - AttributeListAttributeCallback callback - ) { - readAttributeListAttribute(chipClusterPtr, callback); - } - public void subscribeAttributeListAttribute( - AttributeListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readFeatureMapAttribute( - LongAttributeCallback callback - ) { - readFeatureMapAttribute(chipClusterPtr, callback); - } - public void subscribeFeatureMapAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readClusterRevisionAttribute( - IntegerAttributeCallback callback - ) { - readClusterRevisionAttribute(chipClusterPtr, callback); - } - public void subscribeClusterRevisionAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - private native void readSourcesAttribute(long chipClusterPtr, - SourcesAttributeCallback callback - ); - private native void subscribeSourcesAttribute(long chipClusterPtr, - SourcesAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - ); - private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - ); - private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - ); - private native void subscribeEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - ); - private native void subscribeAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - } - - public static class PowerSourceCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 0x0000002FL; - - public PowerSourceCluster(long devicePtr, int endpointId) { - super(devicePtr, endpointId); - } - - @Override - public native long initWithDevice(long devicePtr, int endpointId); - - public interface WiredAssessedInputVoltageAttributeCallback { - void onSuccess(@Nullable Long value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface WiredAssessedInputFrequencyAttributeCallback { - void onSuccess(@Nullable Integer value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface WiredAssessedCurrentAttributeCallback { - void onSuccess(@Nullable Long value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface ActiveWiredFaultsAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface BatVoltageAttributeCallback { - void onSuccess(@Nullable Long value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface BatPercentRemainingAttributeCallback { - void onSuccess(@Nullable Integer value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface BatTimeRemainingAttributeCallback { - void onSuccess(@Nullable Long value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface ActiveBatFaultsAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface BatTimeToFullChargeAttributeCallback { - void onSuccess(@Nullable Long value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface BatChargingCurrentAttributeCallback { - void onSuccess(@Nullable Long value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface ActiveBatChargeFaultsAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface EndpointListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface GeneratedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AcceptedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface EventListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AttributeListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - - public void readStatusAttribute( - IntegerAttributeCallback callback - ) { - readStatusAttribute(chipClusterPtr, callback); - } - public void subscribeStatusAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeStatusAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readOrderAttribute( - IntegerAttributeCallback callback - ) { - readOrderAttribute(chipClusterPtr, callback); - } - public void subscribeOrderAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeOrderAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readDescriptionAttribute( - CharStringAttributeCallback callback - ) { - readDescriptionAttribute(chipClusterPtr, callback); - } - public void subscribeDescriptionAttribute( - CharStringAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeDescriptionAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readWiredAssessedInputVoltageAttribute( - WiredAssessedInputVoltageAttributeCallback callback - ) { - readWiredAssessedInputVoltageAttribute(chipClusterPtr, callback); - } - public void subscribeWiredAssessedInputVoltageAttribute( - WiredAssessedInputVoltageAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeWiredAssessedInputVoltageAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readWiredAssessedInputFrequencyAttribute( - WiredAssessedInputFrequencyAttributeCallback callback - ) { - readWiredAssessedInputFrequencyAttribute(chipClusterPtr, callback); - } - public void subscribeWiredAssessedInputFrequencyAttribute( - WiredAssessedInputFrequencyAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeWiredAssessedInputFrequencyAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readWiredCurrentTypeAttribute( - IntegerAttributeCallback callback - ) { - readWiredCurrentTypeAttribute(chipClusterPtr, callback); - } - public void subscribeWiredCurrentTypeAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeWiredCurrentTypeAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readWiredAssessedCurrentAttribute( - WiredAssessedCurrentAttributeCallback callback - ) { - readWiredAssessedCurrentAttribute(chipClusterPtr, callback); - } - public void subscribeWiredAssessedCurrentAttribute( - WiredAssessedCurrentAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeWiredAssessedCurrentAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readWiredNominalVoltageAttribute( - LongAttributeCallback callback - ) { - readWiredNominalVoltageAttribute(chipClusterPtr, callback); - } - public void subscribeWiredNominalVoltageAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeWiredNominalVoltageAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readWiredMaximumCurrentAttribute( - LongAttributeCallback callback - ) { - readWiredMaximumCurrentAttribute(chipClusterPtr, callback); - } - public void subscribeWiredMaximumCurrentAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeWiredMaximumCurrentAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readWiredPresentAttribute( - BooleanAttributeCallback callback - ) { - readWiredPresentAttribute(chipClusterPtr, callback); - } - public void subscribeWiredPresentAttribute( - BooleanAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeWiredPresentAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readActiveWiredFaultsAttribute( - ActiveWiredFaultsAttributeCallback callback - ) { - readActiveWiredFaultsAttribute(chipClusterPtr, callback); - } - public void subscribeActiveWiredFaultsAttribute( - ActiveWiredFaultsAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeActiveWiredFaultsAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readBatVoltageAttribute( - BatVoltageAttributeCallback callback - ) { - readBatVoltageAttribute(chipClusterPtr, callback); - } - public void subscribeBatVoltageAttribute( - BatVoltageAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeBatVoltageAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readBatPercentRemainingAttribute( - BatPercentRemainingAttributeCallback callback - ) { - readBatPercentRemainingAttribute(chipClusterPtr, callback); - } - public void subscribeBatPercentRemainingAttribute( - BatPercentRemainingAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeBatPercentRemainingAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readBatTimeRemainingAttribute( - BatTimeRemainingAttributeCallback callback - ) { - readBatTimeRemainingAttribute(chipClusterPtr, callback); - } - public void subscribeBatTimeRemainingAttribute( - BatTimeRemainingAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeBatTimeRemainingAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readBatChargeLevelAttribute( - IntegerAttributeCallback callback - ) { - readBatChargeLevelAttribute(chipClusterPtr, callback); - } - public void subscribeBatChargeLevelAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeBatChargeLevelAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readBatReplacementNeededAttribute( - BooleanAttributeCallback callback - ) { - readBatReplacementNeededAttribute(chipClusterPtr, callback); - } - public void subscribeBatReplacementNeededAttribute( - BooleanAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeBatReplacementNeededAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readBatReplaceabilityAttribute( - IntegerAttributeCallback callback - ) { - readBatReplaceabilityAttribute(chipClusterPtr, callback); - } - public void subscribeBatReplaceabilityAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeBatReplaceabilityAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readBatPresentAttribute( - BooleanAttributeCallback callback - ) { - readBatPresentAttribute(chipClusterPtr, callback); - } - public void subscribeBatPresentAttribute( - BooleanAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeBatPresentAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readActiveBatFaultsAttribute( - ActiveBatFaultsAttributeCallback callback - ) { - readActiveBatFaultsAttribute(chipClusterPtr, callback); - } - public void subscribeActiveBatFaultsAttribute( - ActiveBatFaultsAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeActiveBatFaultsAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readBatReplacementDescriptionAttribute( - CharStringAttributeCallback callback - ) { - readBatReplacementDescriptionAttribute(chipClusterPtr, callback); - } - public void subscribeBatReplacementDescriptionAttribute( - CharStringAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeBatReplacementDescriptionAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readBatCommonDesignationAttribute( - IntegerAttributeCallback callback - ) { - readBatCommonDesignationAttribute(chipClusterPtr, callback); - } - public void subscribeBatCommonDesignationAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeBatCommonDesignationAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readBatANSIDesignationAttribute( - CharStringAttributeCallback callback - ) { - readBatANSIDesignationAttribute(chipClusterPtr, callback); - } - public void subscribeBatANSIDesignationAttribute( - CharStringAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeBatANSIDesignationAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readBatIECDesignationAttribute( - CharStringAttributeCallback callback - ) { - readBatIECDesignationAttribute(chipClusterPtr, callback); - } - public void subscribeBatIECDesignationAttribute( - CharStringAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeBatIECDesignationAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readBatApprovedChemistryAttribute( - IntegerAttributeCallback callback - ) { - readBatApprovedChemistryAttribute(chipClusterPtr, callback); - } - public void subscribeBatApprovedChemistryAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeBatApprovedChemistryAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readBatCapacityAttribute( - LongAttributeCallback callback - ) { - readBatCapacityAttribute(chipClusterPtr, callback); - } - public void subscribeBatCapacityAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeBatCapacityAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readBatQuantityAttribute( - IntegerAttributeCallback callback - ) { - readBatQuantityAttribute(chipClusterPtr, callback); - } - public void subscribeBatQuantityAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeBatQuantityAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readBatChargeStateAttribute( - IntegerAttributeCallback callback - ) { - readBatChargeStateAttribute(chipClusterPtr, callback); - } - public void subscribeBatChargeStateAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeBatChargeStateAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readBatTimeToFullChargeAttribute( - BatTimeToFullChargeAttributeCallback callback - ) { - readBatTimeToFullChargeAttribute(chipClusterPtr, callback); - } - public void subscribeBatTimeToFullChargeAttribute( - BatTimeToFullChargeAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeBatTimeToFullChargeAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readBatFunctionalWhileChargingAttribute( - BooleanAttributeCallback callback - ) { - readBatFunctionalWhileChargingAttribute(chipClusterPtr, callback); - } - public void subscribeBatFunctionalWhileChargingAttribute( - BooleanAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeBatFunctionalWhileChargingAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readBatChargingCurrentAttribute( - BatChargingCurrentAttributeCallback callback - ) { - readBatChargingCurrentAttribute(chipClusterPtr, callback); - } - public void subscribeBatChargingCurrentAttribute( - BatChargingCurrentAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeBatChargingCurrentAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readActiveBatChargeFaultsAttribute( - ActiveBatChargeFaultsAttributeCallback callback - ) { - readActiveBatChargeFaultsAttribute(chipClusterPtr, callback); - } - public void subscribeActiveBatChargeFaultsAttribute( - ActiveBatChargeFaultsAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeActiveBatChargeFaultsAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readEndpointListAttribute( - EndpointListAttributeCallback callback - ) { - readEndpointListAttribute(chipClusterPtr, callback); - } - public void subscribeEndpointListAttribute( - EndpointListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeEndpointListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - ) { - readGeneratedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - ) { - readAcceptedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readEventListAttribute( - EventListAttributeCallback callback - ) { - readEventListAttribute(chipClusterPtr, callback); - } - public void subscribeEventListAttribute( - EventListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAttributeListAttribute( - AttributeListAttributeCallback callback - ) { - readAttributeListAttribute(chipClusterPtr, callback); - } - public void subscribeAttributeListAttribute( - AttributeListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readFeatureMapAttribute( - LongAttributeCallback callback - ) { - readFeatureMapAttribute(chipClusterPtr, callback); - } - public void subscribeFeatureMapAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readClusterRevisionAttribute( - IntegerAttributeCallback callback - ) { - readClusterRevisionAttribute(chipClusterPtr, callback); - } - public void subscribeClusterRevisionAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - private native void readStatusAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeStatusAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readOrderAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeOrderAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readDescriptionAttribute(long chipClusterPtr, - CharStringAttributeCallback callback - ); - private native void subscribeDescriptionAttribute(long chipClusterPtr, - CharStringAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readWiredAssessedInputVoltageAttribute(long chipClusterPtr, - WiredAssessedInputVoltageAttributeCallback callback - ); - private native void subscribeWiredAssessedInputVoltageAttribute(long chipClusterPtr, - WiredAssessedInputVoltageAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readWiredAssessedInputFrequencyAttribute(long chipClusterPtr, - WiredAssessedInputFrequencyAttributeCallback callback - ); - private native void subscribeWiredAssessedInputFrequencyAttribute(long chipClusterPtr, - WiredAssessedInputFrequencyAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readWiredCurrentTypeAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeWiredCurrentTypeAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readWiredAssessedCurrentAttribute(long chipClusterPtr, - WiredAssessedCurrentAttributeCallback callback - ); - private native void subscribeWiredAssessedCurrentAttribute(long chipClusterPtr, - WiredAssessedCurrentAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readWiredNominalVoltageAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeWiredNominalVoltageAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readWiredMaximumCurrentAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeWiredMaximumCurrentAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readWiredPresentAttribute(long chipClusterPtr, - BooleanAttributeCallback callback - ); - private native void subscribeWiredPresentAttribute(long chipClusterPtr, - BooleanAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readActiveWiredFaultsAttribute(long chipClusterPtr, - ActiveWiredFaultsAttributeCallback callback - ); - private native void subscribeActiveWiredFaultsAttribute(long chipClusterPtr, - ActiveWiredFaultsAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readBatVoltageAttribute(long chipClusterPtr, - BatVoltageAttributeCallback callback - ); - private native void subscribeBatVoltageAttribute(long chipClusterPtr, - BatVoltageAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readBatPercentRemainingAttribute(long chipClusterPtr, - BatPercentRemainingAttributeCallback callback - ); - private native void subscribeBatPercentRemainingAttribute(long chipClusterPtr, - BatPercentRemainingAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readBatTimeRemainingAttribute(long chipClusterPtr, - BatTimeRemainingAttributeCallback callback - ); - private native void subscribeBatTimeRemainingAttribute(long chipClusterPtr, - BatTimeRemainingAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readBatChargeLevelAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeBatChargeLevelAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readBatReplacementNeededAttribute(long chipClusterPtr, - BooleanAttributeCallback callback - ); - private native void subscribeBatReplacementNeededAttribute(long chipClusterPtr, - BooleanAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readBatReplaceabilityAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeBatReplaceabilityAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readBatPresentAttribute(long chipClusterPtr, - BooleanAttributeCallback callback - ); - private native void subscribeBatPresentAttribute(long chipClusterPtr, - BooleanAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readActiveBatFaultsAttribute(long chipClusterPtr, - ActiveBatFaultsAttributeCallback callback - ); - private native void subscribeActiveBatFaultsAttribute(long chipClusterPtr, - ActiveBatFaultsAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readBatReplacementDescriptionAttribute(long chipClusterPtr, - CharStringAttributeCallback callback - ); - private native void subscribeBatReplacementDescriptionAttribute(long chipClusterPtr, - CharStringAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readBatCommonDesignationAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeBatCommonDesignationAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readBatANSIDesignationAttribute(long chipClusterPtr, - CharStringAttributeCallback callback - ); - private native void subscribeBatANSIDesignationAttribute(long chipClusterPtr, - CharStringAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readBatIECDesignationAttribute(long chipClusterPtr, - CharStringAttributeCallback callback - ); - private native void subscribeBatIECDesignationAttribute(long chipClusterPtr, - CharStringAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readBatApprovedChemistryAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeBatApprovedChemistryAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readBatCapacityAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeBatCapacityAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readBatQuantityAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeBatQuantityAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readBatChargeStateAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeBatChargeStateAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readBatTimeToFullChargeAttribute(long chipClusterPtr, - BatTimeToFullChargeAttributeCallback callback - ); - private native void subscribeBatTimeToFullChargeAttribute(long chipClusterPtr, - BatTimeToFullChargeAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readBatFunctionalWhileChargingAttribute(long chipClusterPtr, - BooleanAttributeCallback callback - ); - private native void subscribeBatFunctionalWhileChargingAttribute(long chipClusterPtr, - BooleanAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readBatChargingCurrentAttribute(long chipClusterPtr, - BatChargingCurrentAttributeCallback callback - ); - private native void subscribeBatChargingCurrentAttribute(long chipClusterPtr, - BatChargingCurrentAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readActiveBatChargeFaultsAttribute(long chipClusterPtr, - ActiveBatChargeFaultsAttributeCallback callback - ); - private native void subscribeActiveBatChargeFaultsAttribute(long chipClusterPtr, - ActiveBatChargeFaultsAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readEndpointListAttribute(long chipClusterPtr, - EndpointListAttributeCallback callback - ); - private native void subscribeEndpointListAttribute(long chipClusterPtr, - EndpointListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - ); - private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - ); - private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - ); - private native void subscribeEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - ); - private native void subscribeAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - } - - public static class GeneralCommissioningCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 0x00000030L; - - public GeneralCommissioningCluster(long devicePtr, int endpointId) { - super(devicePtr, endpointId); - } - - @Override - public native long initWithDevice(long devicePtr, int endpointId); - - public void armFailSafe(ArmFailSafeResponseCallback callback - , Integer expiryLengthSeconds, Long breadcrumb) { - armFailSafe(chipClusterPtr, callback, expiryLengthSeconds, breadcrumb, null); - } - - public void armFailSafe(ArmFailSafeResponseCallback callback - , Integer expiryLengthSeconds, Long breadcrumb - , int timedInvokeTimeoutMs) { - armFailSafe(chipClusterPtr, callback, expiryLengthSeconds, breadcrumb, timedInvokeTimeoutMs); - } - - public void setRegulatoryConfig(SetRegulatoryConfigResponseCallback callback - , Integer newRegulatoryConfig, String countryCode, Long breadcrumb) { - setRegulatoryConfig(chipClusterPtr, callback, newRegulatoryConfig, countryCode, breadcrumb, null); - } - - public void setRegulatoryConfig(SetRegulatoryConfigResponseCallback callback - , Integer newRegulatoryConfig, String countryCode, Long breadcrumb - , int timedInvokeTimeoutMs) { - setRegulatoryConfig(chipClusterPtr, callback, newRegulatoryConfig, countryCode, breadcrumb, timedInvokeTimeoutMs); - } - - public void commissioningComplete(CommissioningCompleteResponseCallback callback - ) { - commissioningComplete(chipClusterPtr, callback, null); - } - - public void commissioningComplete(CommissioningCompleteResponseCallback callback - - , int timedInvokeTimeoutMs) { - commissioningComplete(chipClusterPtr, callback, timedInvokeTimeoutMs); - } - private native void armFailSafe(long chipClusterPtr, ArmFailSafeResponseCallback Callback - , Integer expiryLengthSeconds, Long breadcrumb - , @Nullable Integer timedInvokeTimeoutMs); - private native void setRegulatoryConfig(long chipClusterPtr, SetRegulatoryConfigResponseCallback Callback - , Integer newRegulatoryConfig, String countryCode, Long breadcrumb - , @Nullable Integer timedInvokeTimeoutMs); - private native void commissioningComplete(long chipClusterPtr, CommissioningCompleteResponseCallback Callback - - , @Nullable Integer timedInvokeTimeoutMs); - public interface ArmFailSafeResponseCallback { - void onSuccess(Integer errorCode, String debugText); - - void onError(Exception error); - } - - public interface SetRegulatoryConfigResponseCallback { - void onSuccess(Integer errorCode, String debugText); - - void onError(Exception error); - } - - public interface CommissioningCompleteResponseCallback { - void onSuccess(Integer errorCode, String debugText); - - void onError(Exception error); - } - - - public interface GeneratedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AcceptedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface EventListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AttributeListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - - public void readBreadcrumbAttribute( - LongAttributeCallback callback - ) { - readBreadcrumbAttribute(chipClusterPtr, callback); - } - public void writeBreadcrumbAttribute(DefaultClusterCallback callback, Long value) { - writeBreadcrumbAttribute(chipClusterPtr, callback, value, null); - } - - public void writeBreadcrumbAttribute(DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { - writeBreadcrumbAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeBreadcrumbAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeBreadcrumbAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readRegulatoryConfigAttribute( - IntegerAttributeCallback callback - ) { - readRegulatoryConfigAttribute(chipClusterPtr, callback); - } - public void subscribeRegulatoryConfigAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeRegulatoryConfigAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readLocationCapabilityAttribute( - IntegerAttributeCallback callback - ) { - readLocationCapabilityAttribute(chipClusterPtr, callback); - } - public void subscribeLocationCapabilityAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeLocationCapabilityAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readSupportsConcurrentConnectionAttribute( - BooleanAttributeCallback callback - ) { - readSupportsConcurrentConnectionAttribute(chipClusterPtr, callback); - } - public void subscribeSupportsConcurrentConnectionAttribute( - BooleanAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeSupportsConcurrentConnectionAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - ) { - readGeneratedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - ) { - readAcceptedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readEventListAttribute( - EventListAttributeCallback callback - ) { - readEventListAttribute(chipClusterPtr, callback); - } - public void subscribeEventListAttribute( - EventListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAttributeListAttribute( - AttributeListAttributeCallback callback - ) { - readAttributeListAttribute(chipClusterPtr, callback); - } - public void subscribeAttributeListAttribute( - AttributeListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readFeatureMapAttribute( - LongAttributeCallback callback - ) { - readFeatureMapAttribute(chipClusterPtr, callback); - } - public void subscribeFeatureMapAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readClusterRevisionAttribute( - IntegerAttributeCallback callback - ) { - readClusterRevisionAttribute(chipClusterPtr, callback); - } - public void subscribeClusterRevisionAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - private native void readBreadcrumbAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - - private native void writeBreadcrumbAttribute(long chipClusterPtr, DefaultClusterCallback callback, Long value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeBreadcrumbAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readRegulatoryConfigAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeRegulatoryConfigAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readLocationCapabilityAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeLocationCapabilityAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readSupportsConcurrentConnectionAttribute(long chipClusterPtr, - BooleanAttributeCallback callback - ); - private native void subscribeSupportsConcurrentConnectionAttribute(long chipClusterPtr, - BooleanAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - ); - private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - ); - private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - ); - private native void subscribeEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - ); - private native void subscribeAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - } - - public static class NetworkCommissioningCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 0x00000031L; - - public NetworkCommissioningCluster(long devicePtr, int endpointId) { - super(devicePtr, endpointId); - } - - @Override - public native long initWithDevice(long devicePtr, int endpointId); - - public void scanNetworks(ScanNetworksResponseCallback callback - , @Nullable Optional ssid, Optional breadcrumb) { - scanNetworks(chipClusterPtr, callback, ssid, breadcrumb, null); - } - - public void scanNetworks(ScanNetworksResponseCallback callback - , @Nullable Optional ssid, Optional breadcrumb - , int timedInvokeTimeoutMs) { - scanNetworks(chipClusterPtr, callback, ssid, breadcrumb, timedInvokeTimeoutMs); - } - - public void addOrUpdateWiFiNetwork(NetworkConfigResponseCallback callback - , byte[] ssid, byte[] credentials, Optional breadcrumb) { - addOrUpdateWiFiNetwork(chipClusterPtr, callback, ssid, credentials, breadcrumb, null); - } - - public void addOrUpdateWiFiNetwork(NetworkConfigResponseCallback callback - , byte[] ssid, byte[] credentials, Optional breadcrumb - , int timedInvokeTimeoutMs) { - addOrUpdateWiFiNetwork(chipClusterPtr, callback, ssid, credentials, breadcrumb, timedInvokeTimeoutMs); - } - - public void addOrUpdateThreadNetwork(NetworkConfigResponseCallback callback - , byte[] operationalDataset, Optional breadcrumb) { - addOrUpdateThreadNetwork(chipClusterPtr, callback, operationalDataset, breadcrumb, null); - } - - public void addOrUpdateThreadNetwork(NetworkConfigResponseCallback callback - , byte[] operationalDataset, Optional breadcrumb - , int timedInvokeTimeoutMs) { - addOrUpdateThreadNetwork(chipClusterPtr, callback, operationalDataset, breadcrumb, timedInvokeTimeoutMs); - } - - public void removeNetwork(NetworkConfigResponseCallback callback - , byte[] networkID, Optional breadcrumb) { - removeNetwork(chipClusterPtr, callback, networkID, breadcrumb, null); - } - - public void removeNetwork(NetworkConfigResponseCallback callback - , byte[] networkID, Optional breadcrumb - , int timedInvokeTimeoutMs) { - removeNetwork(chipClusterPtr, callback, networkID, breadcrumb, timedInvokeTimeoutMs); - } - - public void connectNetwork(ConnectNetworkResponseCallback callback - , byte[] networkID, Optional breadcrumb) { - connectNetwork(chipClusterPtr, callback, networkID, breadcrumb, null); - } - - public void connectNetwork(ConnectNetworkResponseCallback callback - , byte[] networkID, Optional breadcrumb - , int timedInvokeTimeoutMs) { - connectNetwork(chipClusterPtr, callback, networkID, breadcrumb, timedInvokeTimeoutMs); - } - - public void reorderNetwork(NetworkConfigResponseCallback callback - , byte[] networkID, Integer networkIndex, Optional breadcrumb) { - reorderNetwork(chipClusterPtr, callback, networkID, networkIndex, breadcrumb, null); - } - - public void reorderNetwork(NetworkConfigResponseCallback callback - , byte[] networkID, Integer networkIndex, Optional breadcrumb - , int timedInvokeTimeoutMs) { - reorderNetwork(chipClusterPtr, callback, networkID, networkIndex, breadcrumb, timedInvokeTimeoutMs); - } - private native void scanNetworks(long chipClusterPtr, ScanNetworksResponseCallback Callback - , @Nullable Optional ssid, Optional breadcrumb - , @Nullable Integer timedInvokeTimeoutMs); - private native void addOrUpdateWiFiNetwork(long chipClusterPtr, NetworkConfigResponseCallback Callback - , byte[] ssid, byte[] credentials, Optional breadcrumb - , @Nullable Integer timedInvokeTimeoutMs); - private native void addOrUpdateThreadNetwork(long chipClusterPtr, NetworkConfigResponseCallback Callback - , byte[] operationalDataset, Optional breadcrumb - , @Nullable Integer timedInvokeTimeoutMs); - private native void removeNetwork(long chipClusterPtr, NetworkConfigResponseCallback Callback - , byte[] networkID, Optional breadcrumb - , @Nullable Integer timedInvokeTimeoutMs); - private native void connectNetwork(long chipClusterPtr, ConnectNetworkResponseCallback Callback - , byte[] networkID, Optional breadcrumb - , @Nullable Integer timedInvokeTimeoutMs); - private native void reorderNetwork(long chipClusterPtr, NetworkConfigResponseCallback Callback - , byte[] networkID, Integer networkIndex, Optional breadcrumb - , @Nullable Integer timedInvokeTimeoutMs); - public interface ScanNetworksResponseCallback { - void onSuccess(Integer networkingStatus, Optional debugText, Optional> wiFiScanResults, Optional> threadScanResults); - - void onError(Exception error); - } - - public interface NetworkConfigResponseCallback { - void onSuccess(Integer networkingStatus, Optional debugText, Optional networkIndex); - - void onError(Exception error); - } - - public interface ConnectNetworkResponseCallback { - void onSuccess(Integer networkingStatus, Optional debugText, @Nullable Long errorValue); - - void onError(Exception error); - } - - - public interface NetworksAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface LastNetworkingStatusAttributeCallback { - void onSuccess(@Nullable Integer value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface LastNetworkIDAttributeCallback { - void onSuccess(@Nullable byte[] value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface LastConnectErrorValueAttributeCallback { - void onSuccess(@Nullable Long value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface GeneratedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AcceptedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface EventListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AttributeListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - - public void readMaxNetworksAttribute( - IntegerAttributeCallback callback - ) { - readMaxNetworksAttribute(chipClusterPtr, callback); - } - public void subscribeMaxNetworksAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeMaxNetworksAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readNetworksAttribute( - NetworksAttributeCallback callback - ) { - readNetworksAttribute(chipClusterPtr, callback); - } - public void subscribeNetworksAttribute( - NetworksAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeNetworksAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readScanMaxTimeSecondsAttribute( - IntegerAttributeCallback callback - ) { - readScanMaxTimeSecondsAttribute(chipClusterPtr, callback); - } - public void subscribeScanMaxTimeSecondsAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeScanMaxTimeSecondsAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readConnectMaxTimeSecondsAttribute( - IntegerAttributeCallback callback - ) { - readConnectMaxTimeSecondsAttribute(chipClusterPtr, callback); - } - public void subscribeConnectMaxTimeSecondsAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeConnectMaxTimeSecondsAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readInterfaceEnabledAttribute( - BooleanAttributeCallback callback - ) { - readInterfaceEnabledAttribute(chipClusterPtr, callback); - } - public void writeInterfaceEnabledAttribute(DefaultClusterCallback callback, Boolean value) { - writeInterfaceEnabledAttribute(chipClusterPtr, callback, value, null); - } - - public void writeInterfaceEnabledAttribute(DefaultClusterCallback callback, Boolean value, int timedWriteTimeoutMs) { - writeInterfaceEnabledAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeInterfaceEnabledAttribute( - BooleanAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeInterfaceEnabledAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readLastNetworkingStatusAttribute( - LastNetworkingStatusAttributeCallback callback - ) { - readLastNetworkingStatusAttribute(chipClusterPtr, callback); - } - public void subscribeLastNetworkingStatusAttribute( - LastNetworkingStatusAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeLastNetworkingStatusAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readLastNetworkIDAttribute( - LastNetworkIDAttributeCallback callback - ) { - readLastNetworkIDAttribute(chipClusterPtr, callback); - } - public void subscribeLastNetworkIDAttribute( - LastNetworkIDAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeLastNetworkIDAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readLastConnectErrorValueAttribute( - LastConnectErrorValueAttributeCallback callback - ) { - readLastConnectErrorValueAttribute(chipClusterPtr, callback); - } - public void subscribeLastConnectErrorValueAttribute( - LastConnectErrorValueAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeLastConnectErrorValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - ) { - readGeneratedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - ) { - readAcceptedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readEventListAttribute( - EventListAttributeCallback callback - ) { - readEventListAttribute(chipClusterPtr, callback); - } - public void subscribeEventListAttribute( - EventListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAttributeListAttribute( - AttributeListAttributeCallback callback - ) { - readAttributeListAttribute(chipClusterPtr, callback); - } - public void subscribeAttributeListAttribute( - AttributeListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readFeatureMapAttribute( - LongAttributeCallback callback - ) { - readFeatureMapAttribute(chipClusterPtr, callback); - } - public void subscribeFeatureMapAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readClusterRevisionAttribute( - IntegerAttributeCallback callback - ) { - readClusterRevisionAttribute(chipClusterPtr, callback); - } - public void subscribeClusterRevisionAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - private native void readMaxNetworksAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeMaxNetworksAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readNetworksAttribute(long chipClusterPtr, - NetworksAttributeCallback callback - ); - private native void subscribeNetworksAttribute(long chipClusterPtr, - NetworksAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readScanMaxTimeSecondsAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeScanMaxTimeSecondsAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readConnectMaxTimeSecondsAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeConnectMaxTimeSecondsAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readInterfaceEnabledAttribute(long chipClusterPtr, - BooleanAttributeCallback callback - ); - - private native void writeInterfaceEnabledAttribute(long chipClusterPtr, DefaultClusterCallback callback, Boolean value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeInterfaceEnabledAttribute(long chipClusterPtr, - BooleanAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readLastNetworkingStatusAttribute(long chipClusterPtr, - LastNetworkingStatusAttributeCallback callback - ); - private native void subscribeLastNetworkingStatusAttribute(long chipClusterPtr, - LastNetworkingStatusAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readLastNetworkIDAttribute(long chipClusterPtr, - LastNetworkIDAttributeCallback callback - ); - private native void subscribeLastNetworkIDAttribute(long chipClusterPtr, - LastNetworkIDAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readLastConnectErrorValueAttribute(long chipClusterPtr, - LastConnectErrorValueAttributeCallback callback - ); - private native void subscribeLastConnectErrorValueAttribute(long chipClusterPtr, - LastConnectErrorValueAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - ); - private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - ); - private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - ); - private native void subscribeEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - ); - private native void subscribeAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - } - - public static class DiagnosticLogsCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 0x00000032L; - - public DiagnosticLogsCluster(long devicePtr, int endpointId) { - super(devicePtr, endpointId); - } - - @Override - public native long initWithDevice(long devicePtr, int endpointId); - - public void retrieveLogsRequest(RetrieveLogsResponseCallback callback - , Integer intent, Integer requestedProtocol, Optional transferFileDesignator) { - retrieveLogsRequest(chipClusterPtr, callback, intent, requestedProtocol, transferFileDesignator, null); - } - - public void retrieveLogsRequest(RetrieveLogsResponseCallback callback - , Integer intent, Integer requestedProtocol, Optional transferFileDesignator - , int timedInvokeTimeoutMs) { - retrieveLogsRequest(chipClusterPtr, callback, intent, requestedProtocol, transferFileDesignator, timedInvokeTimeoutMs); - } - private native void retrieveLogsRequest(long chipClusterPtr, RetrieveLogsResponseCallback Callback - , Integer intent, Integer requestedProtocol, Optional transferFileDesignator - , @Nullable Integer timedInvokeTimeoutMs); - public interface RetrieveLogsResponseCallback { - void onSuccess(Integer status, byte[] logContent, Optional UTCTimeStamp, Optional timeSinceBoot); - - void onError(Exception error); - } - - - public interface GeneratedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AcceptedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface EventListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AttributeListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - - public void readGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - ) { - readGeneratedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - ) { - readAcceptedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readEventListAttribute( - EventListAttributeCallback callback - ) { - readEventListAttribute(chipClusterPtr, callback); - } - public void subscribeEventListAttribute( - EventListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAttributeListAttribute( - AttributeListAttributeCallback callback - ) { - readAttributeListAttribute(chipClusterPtr, callback); - } - public void subscribeAttributeListAttribute( - AttributeListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readFeatureMapAttribute( - LongAttributeCallback callback - ) { - readFeatureMapAttribute(chipClusterPtr, callback); - } - public void subscribeFeatureMapAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readClusterRevisionAttribute( - IntegerAttributeCallback callback - ) { - readClusterRevisionAttribute(chipClusterPtr, callback); - } - public void subscribeClusterRevisionAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - private native void readGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - ); - private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - ); - private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - ); - private native void subscribeEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - ); - private native void subscribeAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - } - - public static class GeneralDiagnosticsCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 0x00000033L; - - public GeneralDiagnosticsCluster(long devicePtr, int endpointId) { - super(devicePtr, endpointId); - } - - @Override - public native long initWithDevice(long devicePtr, int endpointId); - - public void testEventTrigger(DefaultClusterCallback callback - , byte[] enableKey, Long eventTrigger) { - testEventTrigger(chipClusterPtr, callback, enableKey, eventTrigger, null); - } - - public void testEventTrigger(DefaultClusterCallback callback - , byte[] enableKey, Long eventTrigger - , int timedInvokeTimeoutMs) { - testEventTrigger(chipClusterPtr, callback, enableKey, eventTrigger, timedInvokeTimeoutMs); - } - private native void testEventTrigger(long chipClusterPtr, DefaultClusterCallback Callback - , byte[] enableKey, Long eventTrigger - , @Nullable Integer timedInvokeTimeoutMs); - - public interface NetworkInterfacesAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface ActiveHardwareFaultsAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface ActiveRadioFaultsAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface ActiveNetworkFaultsAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface GeneratedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AcceptedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface EventListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AttributeListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - - public void readNetworkInterfacesAttribute( - NetworkInterfacesAttributeCallback callback - ) { - readNetworkInterfacesAttribute(chipClusterPtr, callback); - } - public void subscribeNetworkInterfacesAttribute( - NetworkInterfacesAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeNetworkInterfacesAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readRebootCountAttribute( - IntegerAttributeCallback callback - ) { - readRebootCountAttribute(chipClusterPtr, callback); - } - public void subscribeRebootCountAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeRebootCountAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readUpTimeAttribute( - LongAttributeCallback callback - ) { - readUpTimeAttribute(chipClusterPtr, callback); - } - public void subscribeUpTimeAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeUpTimeAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readTotalOperationalHoursAttribute( - LongAttributeCallback callback - ) { - readTotalOperationalHoursAttribute(chipClusterPtr, callback); - } - public void subscribeTotalOperationalHoursAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeTotalOperationalHoursAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readBootReasonAttribute( - IntegerAttributeCallback callback - ) { - readBootReasonAttribute(chipClusterPtr, callback); - } - public void subscribeBootReasonAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeBootReasonAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readActiveHardwareFaultsAttribute( - ActiveHardwareFaultsAttributeCallback callback - ) { - readActiveHardwareFaultsAttribute(chipClusterPtr, callback); - } - public void subscribeActiveHardwareFaultsAttribute( - ActiveHardwareFaultsAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeActiveHardwareFaultsAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readActiveRadioFaultsAttribute( - ActiveRadioFaultsAttributeCallback callback - ) { - readActiveRadioFaultsAttribute(chipClusterPtr, callback); - } - public void subscribeActiveRadioFaultsAttribute( - ActiveRadioFaultsAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeActiveRadioFaultsAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readActiveNetworkFaultsAttribute( - ActiveNetworkFaultsAttributeCallback callback - ) { - readActiveNetworkFaultsAttribute(chipClusterPtr, callback); - } - public void subscribeActiveNetworkFaultsAttribute( - ActiveNetworkFaultsAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeActiveNetworkFaultsAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readTestEventTriggersEnabledAttribute( - BooleanAttributeCallback callback - ) { - readTestEventTriggersEnabledAttribute(chipClusterPtr, callback); - } - public void subscribeTestEventTriggersEnabledAttribute( - BooleanAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeTestEventTriggersEnabledAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAverageWearCountAttribute( - LongAttributeCallback callback - ) { - readAverageWearCountAttribute(chipClusterPtr, callback); - } - public void subscribeAverageWearCountAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeAverageWearCountAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - ) { - readGeneratedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - ) { - readAcceptedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readEventListAttribute( - EventListAttributeCallback callback - ) { - readEventListAttribute(chipClusterPtr, callback); - } - public void subscribeEventListAttribute( - EventListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAttributeListAttribute( - AttributeListAttributeCallback callback - ) { - readAttributeListAttribute(chipClusterPtr, callback); - } - public void subscribeAttributeListAttribute( - AttributeListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readFeatureMapAttribute( - LongAttributeCallback callback - ) { - readFeatureMapAttribute(chipClusterPtr, callback); - } - public void subscribeFeatureMapAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readClusterRevisionAttribute( - IntegerAttributeCallback callback - ) { - readClusterRevisionAttribute(chipClusterPtr, callback); - } - public void subscribeClusterRevisionAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - private native void readNetworkInterfacesAttribute(long chipClusterPtr, - NetworkInterfacesAttributeCallback callback - ); - private native void subscribeNetworkInterfacesAttribute(long chipClusterPtr, - NetworkInterfacesAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readRebootCountAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeRebootCountAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readUpTimeAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeUpTimeAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readTotalOperationalHoursAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeTotalOperationalHoursAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readBootReasonAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeBootReasonAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readActiveHardwareFaultsAttribute(long chipClusterPtr, - ActiveHardwareFaultsAttributeCallback callback - ); - private native void subscribeActiveHardwareFaultsAttribute(long chipClusterPtr, - ActiveHardwareFaultsAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readActiveRadioFaultsAttribute(long chipClusterPtr, - ActiveRadioFaultsAttributeCallback callback - ); - private native void subscribeActiveRadioFaultsAttribute(long chipClusterPtr, - ActiveRadioFaultsAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readActiveNetworkFaultsAttribute(long chipClusterPtr, - ActiveNetworkFaultsAttributeCallback callback - ); - private native void subscribeActiveNetworkFaultsAttribute(long chipClusterPtr, - ActiveNetworkFaultsAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readTestEventTriggersEnabledAttribute(long chipClusterPtr, - BooleanAttributeCallback callback - ); - private native void subscribeTestEventTriggersEnabledAttribute(long chipClusterPtr, - BooleanAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readAverageWearCountAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeAverageWearCountAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - ); - private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - ); - private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - ); - private native void subscribeEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - ); - private native void subscribeAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - } - - public static class SoftwareDiagnosticsCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 0x00000034L; - - public SoftwareDiagnosticsCluster(long devicePtr, int endpointId) { - super(devicePtr, endpointId); - } - - @Override - public native long initWithDevice(long devicePtr, int endpointId); - - public void resetWatermarks(DefaultClusterCallback callback - ) { - resetWatermarks(chipClusterPtr, callback, null); - } - - public void resetWatermarks(DefaultClusterCallback callback - - , int timedInvokeTimeoutMs) { - resetWatermarks(chipClusterPtr, callback, timedInvokeTimeoutMs); - } - private native void resetWatermarks(long chipClusterPtr, DefaultClusterCallback Callback - - , @Nullable Integer timedInvokeTimeoutMs); - - public interface ThreadMetricsAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface GeneratedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AcceptedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface EventListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AttributeListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - - public void readThreadMetricsAttribute( - ThreadMetricsAttributeCallback callback - ) { - readThreadMetricsAttribute(chipClusterPtr, callback); - } - public void subscribeThreadMetricsAttribute( - ThreadMetricsAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeThreadMetricsAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readCurrentHeapFreeAttribute( - LongAttributeCallback callback - ) { - readCurrentHeapFreeAttribute(chipClusterPtr, callback); - } - public void subscribeCurrentHeapFreeAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeCurrentHeapFreeAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readCurrentHeapUsedAttribute( - LongAttributeCallback callback - ) { - readCurrentHeapUsedAttribute(chipClusterPtr, callback); - } - public void subscribeCurrentHeapUsedAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeCurrentHeapUsedAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readCurrentHeapHighWatermarkAttribute( - LongAttributeCallback callback - ) { - readCurrentHeapHighWatermarkAttribute(chipClusterPtr, callback); - } - public void subscribeCurrentHeapHighWatermarkAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeCurrentHeapHighWatermarkAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - ) { - readGeneratedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - ) { - readAcceptedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readEventListAttribute( - EventListAttributeCallback callback - ) { - readEventListAttribute(chipClusterPtr, callback); - } - public void subscribeEventListAttribute( - EventListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAttributeListAttribute( - AttributeListAttributeCallback callback - ) { - readAttributeListAttribute(chipClusterPtr, callback); - } - public void subscribeAttributeListAttribute( - AttributeListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readFeatureMapAttribute( - LongAttributeCallback callback - ) { - readFeatureMapAttribute(chipClusterPtr, callback); - } - public void subscribeFeatureMapAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readClusterRevisionAttribute( - IntegerAttributeCallback callback - ) { - readClusterRevisionAttribute(chipClusterPtr, callback); - } - public void subscribeClusterRevisionAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - private native void readThreadMetricsAttribute(long chipClusterPtr, - ThreadMetricsAttributeCallback callback - ); - private native void subscribeThreadMetricsAttribute(long chipClusterPtr, - ThreadMetricsAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readCurrentHeapFreeAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeCurrentHeapFreeAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readCurrentHeapUsedAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeCurrentHeapUsedAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readCurrentHeapHighWatermarkAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeCurrentHeapHighWatermarkAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - ); - private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - ); - private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - ); - private native void subscribeEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - ); - private native void subscribeAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - } - - public static class ThreadNetworkDiagnosticsCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 0x00000035L; - - public ThreadNetworkDiagnosticsCluster(long devicePtr, int endpointId) { - super(devicePtr, endpointId); - } - - @Override - public native long initWithDevice(long devicePtr, int endpointId); - - public void resetCounts(DefaultClusterCallback callback - ) { - resetCounts(chipClusterPtr, callback, null); - } - - public void resetCounts(DefaultClusterCallback callback - - , int timedInvokeTimeoutMs) { - resetCounts(chipClusterPtr, callback, timedInvokeTimeoutMs); - } - private native void resetCounts(long chipClusterPtr, DefaultClusterCallback Callback - - , @Nullable Integer timedInvokeTimeoutMs); - - public interface ChannelAttributeCallback { - void onSuccess(@Nullable Integer value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface RoutingRoleAttributeCallback { - void onSuccess(@Nullable Integer value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface NetworkNameAttributeCallback { - void onSuccess(@Nullable String value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface PanIdAttributeCallback { - void onSuccess(@Nullable Integer value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface ExtendedPanIdAttributeCallback { - void onSuccess(@Nullable Long value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface MeshLocalPrefixAttributeCallback { - void onSuccess(@Nullable byte[] value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface NeighborTableAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface RouteTableAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface PartitionIdAttributeCallback { - void onSuccess(@Nullable Long value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface WeightingAttributeCallback { - void onSuccess(@Nullable Integer value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface DataVersionAttributeCallback { - void onSuccess(@Nullable Integer value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface StableDataVersionAttributeCallback { - void onSuccess(@Nullable Integer value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface LeaderRouterIdAttributeCallback { - void onSuccess(@Nullable Integer value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface ActiveTimestampAttributeCallback { - void onSuccess(@Nullable Long value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface PendingTimestampAttributeCallback { - void onSuccess(@Nullable Long value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface DelayAttributeCallback { - void onSuccess(@Nullable Long value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface ChannelPage0MaskAttributeCallback { - void onSuccess(@Nullable byte[] value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface ActiveNetworkFaultsListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface GeneratedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AcceptedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface EventListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AttributeListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - - public void readChannelAttribute( - ChannelAttributeCallback callback - ) { - readChannelAttribute(chipClusterPtr, callback); - } - public void subscribeChannelAttribute( - ChannelAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeChannelAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readRoutingRoleAttribute( - RoutingRoleAttributeCallback callback - ) { - readRoutingRoleAttribute(chipClusterPtr, callback); - } - public void subscribeRoutingRoleAttribute( - RoutingRoleAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeRoutingRoleAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readNetworkNameAttribute( - NetworkNameAttributeCallback callback - ) { - readNetworkNameAttribute(chipClusterPtr, callback); - } - public void subscribeNetworkNameAttribute( - NetworkNameAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeNetworkNameAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readPanIdAttribute( - PanIdAttributeCallback callback - ) { - readPanIdAttribute(chipClusterPtr, callback); - } - public void subscribePanIdAttribute( - PanIdAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribePanIdAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readExtendedPanIdAttribute( - ExtendedPanIdAttributeCallback callback - ) { - readExtendedPanIdAttribute(chipClusterPtr, callback); - } - public void subscribeExtendedPanIdAttribute( - ExtendedPanIdAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeExtendedPanIdAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readMeshLocalPrefixAttribute( - MeshLocalPrefixAttributeCallback callback - ) { - readMeshLocalPrefixAttribute(chipClusterPtr, callback); - } - public void subscribeMeshLocalPrefixAttribute( - MeshLocalPrefixAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeMeshLocalPrefixAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readOverrunCountAttribute( - LongAttributeCallback callback - ) { - readOverrunCountAttribute(chipClusterPtr, callback); - } - public void subscribeOverrunCountAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeOverrunCountAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readNeighborTableAttribute( - NeighborTableAttributeCallback callback - ) { - readNeighborTableAttribute(chipClusterPtr, callback); - } - public void subscribeNeighborTableAttribute( - NeighborTableAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeNeighborTableAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readRouteTableAttribute( - RouteTableAttributeCallback callback - ) { - readRouteTableAttribute(chipClusterPtr, callback); - } - public void subscribeRouteTableAttribute( - RouteTableAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeRouteTableAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readPartitionIdAttribute( - PartitionIdAttributeCallback callback - ) { - readPartitionIdAttribute(chipClusterPtr, callback); - } - public void subscribePartitionIdAttribute( - PartitionIdAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribePartitionIdAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readWeightingAttribute( - WeightingAttributeCallback callback - ) { - readWeightingAttribute(chipClusterPtr, callback); - } - public void subscribeWeightingAttribute( - WeightingAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeWeightingAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readDataVersionAttribute( - DataVersionAttributeCallback callback - ) { - readDataVersionAttribute(chipClusterPtr, callback); - } - public void subscribeDataVersionAttribute( - DataVersionAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeDataVersionAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readStableDataVersionAttribute( - StableDataVersionAttributeCallback callback - ) { - readStableDataVersionAttribute(chipClusterPtr, callback); - } - public void subscribeStableDataVersionAttribute( - StableDataVersionAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeStableDataVersionAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readLeaderRouterIdAttribute( - LeaderRouterIdAttributeCallback callback - ) { - readLeaderRouterIdAttribute(chipClusterPtr, callback); - } - public void subscribeLeaderRouterIdAttribute( - LeaderRouterIdAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeLeaderRouterIdAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readDetachedRoleCountAttribute( - IntegerAttributeCallback callback - ) { - readDetachedRoleCountAttribute(chipClusterPtr, callback); - } - public void subscribeDetachedRoleCountAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeDetachedRoleCountAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readChildRoleCountAttribute( - IntegerAttributeCallback callback - ) { - readChildRoleCountAttribute(chipClusterPtr, callback); - } - public void subscribeChildRoleCountAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeChildRoleCountAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readRouterRoleCountAttribute( - IntegerAttributeCallback callback - ) { - readRouterRoleCountAttribute(chipClusterPtr, callback); - } - public void subscribeRouterRoleCountAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeRouterRoleCountAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readLeaderRoleCountAttribute( - IntegerAttributeCallback callback - ) { - readLeaderRoleCountAttribute(chipClusterPtr, callback); - } - public void subscribeLeaderRoleCountAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeLeaderRoleCountAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAttachAttemptCountAttribute( - IntegerAttributeCallback callback - ) { - readAttachAttemptCountAttribute(chipClusterPtr, callback); - } - public void subscribeAttachAttemptCountAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeAttachAttemptCountAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readPartitionIdChangeCountAttribute( - IntegerAttributeCallback callback - ) { - readPartitionIdChangeCountAttribute(chipClusterPtr, callback); - } - public void subscribePartitionIdChangeCountAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribePartitionIdChangeCountAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readBetterPartitionAttachAttemptCountAttribute( - IntegerAttributeCallback callback - ) { - readBetterPartitionAttachAttemptCountAttribute(chipClusterPtr, callback); - } - public void subscribeBetterPartitionAttachAttemptCountAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeBetterPartitionAttachAttemptCountAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readParentChangeCountAttribute( - IntegerAttributeCallback callback - ) { - readParentChangeCountAttribute(chipClusterPtr, callback); - } - public void subscribeParentChangeCountAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeParentChangeCountAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readTxTotalCountAttribute( - LongAttributeCallback callback - ) { - readTxTotalCountAttribute(chipClusterPtr, callback); - } - public void subscribeTxTotalCountAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeTxTotalCountAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readTxUnicastCountAttribute( - LongAttributeCallback callback - ) { - readTxUnicastCountAttribute(chipClusterPtr, callback); - } - public void subscribeTxUnicastCountAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeTxUnicastCountAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readTxBroadcastCountAttribute( - LongAttributeCallback callback - ) { - readTxBroadcastCountAttribute(chipClusterPtr, callback); - } - public void subscribeTxBroadcastCountAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeTxBroadcastCountAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readTxAckRequestedCountAttribute( - LongAttributeCallback callback - ) { - readTxAckRequestedCountAttribute(chipClusterPtr, callback); - } - public void subscribeTxAckRequestedCountAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeTxAckRequestedCountAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readTxAckedCountAttribute( - LongAttributeCallback callback - ) { - readTxAckedCountAttribute(chipClusterPtr, callback); - } - public void subscribeTxAckedCountAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeTxAckedCountAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readTxNoAckRequestedCountAttribute( - LongAttributeCallback callback - ) { - readTxNoAckRequestedCountAttribute(chipClusterPtr, callback); - } - public void subscribeTxNoAckRequestedCountAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeTxNoAckRequestedCountAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readTxDataCountAttribute( - LongAttributeCallback callback - ) { - readTxDataCountAttribute(chipClusterPtr, callback); - } - public void subscribeTxDataCountAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeTxDataCountAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readTxDataPollCountAttribute( - LongAttributeCallback callback - ) { - readTxDataPollCountAttribute(chipClusterPtr, callback); - } - public void subscribeTxDataPollCountAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeTxDataPollCountAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readTxBeaconCountAttribute( - LongAttributeCallback callback - ) { - readTxBeaconCountAttribute(chipClusterPtr, callback); - } - public void subscribeTxBeaconCountAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeTxBeaconCountAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readTxBeaconRequestCountAttribute( - LongAttributeCallback callback - ) { - readTxBeaconRequestCountAttribute(chipClusterPtr, callback); - } - public void subscribeTxBeaconRequestCountAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeTxBeaconRequestCountAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readTxOtherCountAttribute( - LongAttributeCallback callback - ) { - readTxOtherCountAttribute(chipClusterPtr, callback); - } - public void subscribeTxOtherCountAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeTxOtherCountAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readTxRetryCountAttribute( - LongAttributeCallback callback - ) { - readTxRetryCountAttribute(chipClusterPtr, callback); - } - public void subscribeTxRetryCountAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeTxRetryCountAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readTxDirectMaxRetryExpiryCountAttribute( - LongAttributeCallback callback - ) { - readTxDirectMaxRetryExpiryCountAttribute(chipClusterPtr, callback); - } - public void subscribeTxDirectMaxRetryExpiryCountAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeTxDirectMaxRetryExpiryCountAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readTxIndirectMaxRetryExpiryCountAttribute( - LongAttributeCallback callback - ) { - readTxIndirectMaxRetryExpiryCountAttribute(chipClusterPtr, callback); - } - public void subscribeTxIndirectMaxRetryExpiryCountAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeTxIndirectMaxRetryExpiryCountAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readTxErrCcaCountAttribute( - LongAttributeCallback callback - ) { - readTxErrCcaCountAttribute(chipClusterPtr, callback); - } - public void subscribeTxErrCcaCountAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeTxErrCcaCountAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readTxErrAbortCountAttribute( - LongAttributeCallback callback - ) { - readTxErrAbortCountAttribute(chipClusterPtr, callback); - } - public void subscribeTxErrAbortCountAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeTxErrAbortCountAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readTxErrBusyChannelCountAttribute( - LongAttributeCallback callback - ) { - readTxErrBusyChannelCountAttribute(chipClusterPtr, callback); - } - public void subscribeTxErrBusyChannelCountAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeTxErrBusyChannelCountAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readRxTotalCountAttribute( - LongAttributeCallback callback - ) { - readRxTotalCountAttribute(chipClusterPtr, callback); - } - public void subscribeRxTotalCountAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeRxTotalCountAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readRxUnicastCountAttribute( - LongAttributeCallback callback - ) { - readRxUnicastCountAttribute(chipClusterPtr, callback); - } - public void subscribeRxUnicastCountAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeRxUnicastCountAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readRxBroadcastCountAttribute( - LongAttributeCallback callback - ) { - readRxBroadcastCountAttribute(chipClusterPtr, callback); - } - public void subscribeRxBroadcastCountAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeRxBroadcastCountAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readRxDataCountAttribute( - LongAttributeCallback callback - ) { - readRxDataCountAttribute(chipClusterPtr, callback); - } - public void subscribeRxDataCountAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeRxDataCountAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readRxDataPollCountAttribute( - LongAttributeCallback callback - ) { - readRxDataPollCountAttribute(chipClusterPtr, callback); - } - public void subscribeRxDataPollCountAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeRxDataPollCountAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readRxBeaconCountAttribute( - LongAttributeCallback callback - ) { - readRxBeaconCountAttribute(chipClusterPtr, callback); - } - public void subscribeRxBeaconCountAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeRxBeaconCountAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readRxBeaconRequestCountAttribute( - LongAttributeCallback callback - ) { - readRxBeaconRequestCountAttribute(chipClusterPtr, callback); - } - public void subscribeRxBeaconRequestCountAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeRxBeaconRequestCountAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readRxOtherCountAttribute( - LongAttributeCallback callback - ) { - readRxOtherCountAttribute(chipClusterPtr, callback); - } - public void subscribeRxOtherCountAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeRxOtherCountAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readRxAddressFilteredCountAttribute( - LongAttributeCallback callback - ) { - readRxAddressFilteredCountAttribute(chipClusterPtr, callback); - } - public void subscribeRxAddressFilteredCountAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeRxAddressFilteredCountAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readRxDestAddrFilteredCountAttribute( - LongAttributeCallback callback - ) { - readRxDestAddrFilteredCountAttribute(chipClusterPtr, callback); - } - public void subscribeRxDestAddrFilteredCountAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeRxDestAddrFilteredCountAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readRxDuplicatedCountAttribute( - LongAttributeCallback callback - ) { - readRxDuplicatedCountAttribute(chipClusterPtr, callback); - } - public void subscribeRxDuplicatedCountAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeRxDuplicatedCountAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readRxErrNoFrameCountAttribute( - LongAttributeCallback callback - ) { - readRxErrNoFrameCountAttribute(chipClusterPtr, callback); - } - public void subscribeRxErrNoFrameCountAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeRxErrNoFrameCountAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readRxErrUnknownNeighborCountAttribute( - LongAttributeCallback callback - ) { - readRxErrUnknownNeighborCountAttribute(chipClusterPtr, callback); - } - public void subscribeRxErrUnknownNeighborCountAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeRxErrUnknownNeighborCountAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readRxErrInvalidSrcAddrCountAttribute( - LongAttributeCallback callback - ) { - readRxErrInvalidSrcAddrCountAttribute(chipClusterPtr, callback); - } - public void subscribeRxErrInvalidSrcAddrCountAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeRxErrInvalidSrcAddrCountAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readRxErrSecCountAttribute( - LongAttributeCallback callback - ) { - readRxErrSecCountAttribute(chipClusterPtr, callback); - } - public void subscribeRxErrSecCountAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeRxErrSecCountAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readRxErrFcsCountAttribute( - LongAttributeCallback callback - ) { - readRxErrFcsCountAttribute(chipClusterPtr, callback); - } - public void subscribeRxErrFcsCountAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeRxErrFcsCountAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readRxErrOtherCountAttribute( - LongAttributeCallback callback - ) { - readRxErrOtherCountAttribute(chipClusterPtr, callback); - } - public void subscribeRxErrOtherCountAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeRxErrOtherCountAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readActiveTimestampAttribute( - ActiveTimestampAttributeCallback callback - ) { - readActiveTimestampAttribute(chipClusterPtr, callback); - } - public void subscribeActiveTimestampAttribute( - ActiveTimestampAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeActiveTimestampAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readPendingTimestampAttribute( - PendingTimestampAttributeCallback callback - ) { - readPendingTimestampAttribute(chipClusterPtr, callback); - } - public void subscribePendingTimestampAttribute( - PendingTimestampAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribePendingTimestampAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readDelayAttribute( - DelayAttributeCallback callback - ) { - readDelayAttribute(chipClusterPtr, callback); - } - public void subscribeDelayAttribute( - DelayAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeDelayAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readChannelPage0MaskAttribute( - ChannelPage0MaskAttributeCallback callback - ) { - readChannelPage0MaskAttribute(chipClusterPtr, callback); - } - public void subscribeChannelPage0MaskAttribute( - ChannelPage0MaskAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeChannelPage0MaskAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readActiveNetworkFaultsListAttribute( - ActiveNetworkFaultsListAttributeCallback callback - ) { - readActiveNetworkFaultsListAttribute(chipClusterPtr, callback); - } - public void subscribeActiveNetworkFaultsListAttribute( - ActiveNetworkFaultsListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeActiveNetworkFaultsListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - ) { - readGeneratedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - ) { - readAcceptedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readEventListAttribute( - EventListAttributeCallback callback - ) { - readEventListAttribute(chipClusterPtr, callback); - } - public void subscribeEventListAttribute( - EventListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAttributeListAttribute( - AttributeListAttributeCallback callback - ) { - readAttributeListAttribute(chipClusterPtr, callback); - } - public void subscribeAttributeListAttribute( - AttributeListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readFeatureMapAttribute( - LongAttributeCallback callback - ) { - readFeatureMapAttribute(chipClusterPtr, callback); - } - public void subscribeFeatureMapAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readClusterRevisionAttribute( - IntegerAttributeCallback callback - ) { - readClusterRevisionAttribute(chipClusterPtr, callback); - } - public void subscribeClusterRevisionAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - private native void readChannelAttribute(long chipClusterPtr, - ChannelAttributeCallback callback - ); - private native void subscribeChannelAttribute(long chipClusterPtr, - ChannelAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readRoutingRoleAttribute(long chipClusterPtr, - RoutingRoleAttributeCallback callback - ); - private native void subscribeRoutingRoleAttribute(long chipClusterPtr, - RoutingRoleAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readNetworkNameAttribute(long chipClusterPtr, - NetworkNameAttributeCallback callback - ); - private native void subscribeNetworkNameAttribute(long chipClusterPtr, - NetworkNameAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readPanIdAttribute(long chipClusterPtr, - PanIdAttributeCallback callback - ); - private native void subscribePanIdAttribute(long chipClusterPtr, - PanIdAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readExtendedPanIdAttribute(long chipClusterPtr, - ExtendedPanIdAttributeCallback callback - ); - private native void subscribeExtendedPanIdAttribute(long chipClusterPtr, - ExtendedPanIdAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readMeshLocalPrefixAttribute(long chipClusterPtr, - MeshLocalPrefixAttributeCallback callback - ); - private native void subscribeMeshLocalPrefixAttribute(long chipClusterPtr, - MeshLocalPrefixAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readOverrunCountAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeOverrunCountAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readNeighborTableAttribute(long chipClusterPtr, - NeighborTableAttributeCallback callback - ); - private native void subscribeNeighborTableAttribute(long chipClusterPtr, - NeighborTableAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readRouteTableAttribute(long chipClusterPtr, - RouteTableAttributeCallback callback - ); - private native void subscribeRouteTableAttribute(long chipClusterPtr, - RouteTableAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readPartitionIdAttribute(long chipClusterPtr, - PartitionIdAttributeCallback callback - ); - private native void subscribePartitionIdAttribute(long chipClusterPtr, - PartitionIdAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readWeightingAttribute(long chipClusterPtr, - WeightingAttributeCallback callback - ); - private native void subscribeWeightingAttribute(long chipClusterPtr, - WeightingAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readDataVersionAttribute(long chipClusterPtr, - DataVersionAttributeCallback callback - ); - private native void subscribeDataVersionAttribute(long chipClusterPtr, - DataVersionAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readStableDataVersionAttribute(long chipClusterPtr, - StableDataVersionAttributeCallback callback - ); - private native void subscribeStableDataVersionAttribute(long chipClusterPtr, - StableDataVersionAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readLeaderRouterIdAttribute(long chipClusterPtr, - LeaderRouterIdAttributeCallback callback - ); - private native void subscribeLeaderRouterIdAttribute(long chipClusterPtr, - LeaderRouterIdAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readDetachedRoleCountAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeDetachedRoleCountAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readChildRoleCountAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeChildRoleCountAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readRouterRoleCountAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeRouterRoleCountAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readLeaderRoleCountAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeLeaderRoleCountAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readAttachAttemptCountAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeAttachAttemptCountAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readPartitionIdChangeCountAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribePartitionIdChangeCountAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readBetterPartitionAttachAttemptCountAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeBetterPartitionAttachAttemptCountAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readParentChangeCountAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeParentChangeCountAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readTxTotalCountAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeTxTotalCountAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readTxUnicastCountAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeTxUnicastCountAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readTxBroadcastCountAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeTxBroadcastCountAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readTxAckRequestedCountAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeTxAckRequestedCountAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readTxAckedCountAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeTxAckedCountAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readTxNoAckRequestedCountAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeTxNoAckRequestedCountAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readTxDataCountAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeTxDataCountAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readTxDataPollCountAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeTxDataPollCountAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readTxBeaconCountAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeTxBeaconCountAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readTxBeaconRequestCountAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeTxBeaconRequestCountAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readTxOtherCountAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeTxOtherCountAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readTxRetryCountAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeTxRetryCountAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readTxDirectMaxRetryExpiryCountAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeTxDirectMaxRetryExpiryCountAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readTxIndirectMaxRetryExpiryCountAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeTxIndirectMaxRetryExpiryCountAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readTxErrCcaCountAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeTxErrCcaCountAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readTxErrAbortCountAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeTxErrAbortCountAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readTxErrBusyChannelCountAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeTxErrBusyChannelCountAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readRxTotalCountAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeRxTotalCountAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readRxUnicastCountAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeRxUnicastCountAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readRxBroadcastCountAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeRxBroadcastCountAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readRxDataCountAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeRxDataCountAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readRxDataPollCountAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeRxDataPollCountAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readRxBeaconCountAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeRxBeaconCountAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readRxBeaconRequestCountAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeRxBeaconRequestCountAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readRxOtherCountAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeRxOtherCountAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readRxAddressFilteredCountAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeRxAddressFilteredCountAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readRxDestAddrFilteredCountAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeRxDestAddrFilteredCountAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readRxDuplicatedCountAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeRxDuplicatedCountAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readRxErrNoFrameCountAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeRxErrNoFrameCountAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readRxErrUnknownNeighborCountAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeRxErrUnknownNeighborCountAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readRxErrInvalidSrcAddrCountAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeRxErrInvalidSrcAddrCountAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readRxErrSecCountAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeRxErrSecCountAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readRxErrFcsCountAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeRxErrFcsCountAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readRxErrOtherCountAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeRxErrOtherCountAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readActiveTimestampAttribute(long chipClusterPtr, - ActiveTimestampAttributeCallback callback - ); - private native void subscribeActiveTimestampAttribute(long chipClusterPtr, - ActiveTimestampAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readPendingTimestampAttribute(long chipClusterPtr, - PendingTimestampAttributeCallback callback - ); - private native void subscribePendingTimestampAttribute(long chipClusterPtr, - PendingTimestampAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readDelayAttribute(long chipClusterPtr, - DelayAttributeCallback callback - ); - private native void subscribeDelayAttribute(long chipClusterPtr, - DelayAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readChannelPage0MaskAttribute(long chipClusterPtr, - ChannelPage0MaskAttributeCallback callback - ); - private native void subscribeChannelPage0MaskAttribute(long chipClusterPtr, - ChannelPage0MaskAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readActiveNetworkFaultsListAttribute(long chipClusterPtr, - ActiveNetworkFaultsListAttributeCallback callback - ); - private native void subscribeActiveNetworkFaultsListAttribute(long chipClusterPtr, - ActiveNetworkFaultsListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - ); - private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - ); - private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - ); - private native void subscribeEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - ); - private native void subscribeAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - } - - public static class WiFiNetworkDiagnosticsCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 0x00000036L; - - public WiFiNetworkDiagnosticsCluster(long devicePtr, int endpointId) { - super(devicePtr, endpointId); - } - - @Override - public native long initWithDevice(long devicePtr, int endpointId); - - public void resetCounts(DefaultClusterCallback callback - ) { - resetCounts(chipClusterPtr, callback, null); - } - - public void resetCounts(DefaultClusterCallback callback - - , int timedInvokeTimeoutMs) { - resetCounts(chipClusterPtr, callback, timedInvokeTimeoutMs); - } - private native void resetCounts(long chipClusterPtr, DefaultClusterCallback Callback - - , @Nullable Integer timedInvokeTimeoutMs); - - public interface BssidAttributeCallback { - void onSuccess(@Nullable byte[] value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface SecurityTypeAttributeCallback { - void onSuccess(@Nullable Integer value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface WiFiVersionAttributeCallback { - void onSuccess(@Nullable Integer value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface ChannelNumberAttributeCallback { - void onSuccess(@Nullable Integer value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface RssiAttributeCallback { - void onSuccess(@Nullable Integer value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface BeaconLostCountAttributeCallback { - void onSuccess(@Nullable Long value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface BeaconRxCountAttributeCallback { - void onSuccess(@Nullable Long value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface PacketMulticastRxCountAttributeCallback { - void onSuccess(@Nullable Long value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface PacketMulticastTxCountAttributeCallback { - void onSuccess(@Nullable Long value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface PacketUnicastRxCountAttributeCallback { - void onSuccess(@Nullable Long value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface PacketUnicastTxCountAttributeCallback { - void onSuccess(@Nullable Long value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface CurrentMaxRateAttributeCallback { - void onSuccess(@Nullable Long value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface OverrunCountAttributeCallback { - void onSuccess(@Nullable Long value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface GeneratedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AcceptedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface EventListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AttributeListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - - public void readBssidAttribute( - BssidAttributeCallback callback - ) { - readBssidAttribute(chipClusterPtr, callback); - } - public void subscribeBssidAttribute( - BssidAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeBssidAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readSecurityTypeAttribute( - SecurityTypeAttributeCallback callback - ) { - readSecurityTypeAttribute(chipClusterPtr, callback); - } - public void subscribeSecurityTypeAttribute( - SecurityTypeAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeSecurityTypeAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readWiFiVersionAttribute( - WiFiVersionAttributeCallback callback - ) { - readWiFiVersionAttribute(chipClusterPtr, callback); - } - public void subscribeWiFiVersionAttribute( - WiFiVersionAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeWiFiVersionAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readChannelNumberAttribute( - ChannelNumberAttributeCallback callback - ) { - readChannelNumberAttribute(chipClusterPtr, callback); - } - public void subscribeChannelNumberAttribute( - ChannelNumberAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeChannelNumberAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readRssiAttribute( - RssiAttributeCallback callback - ) { - readRssiAttribute(chipClusterPtr, callback); - } - public void subscribeRssiAttribute( - RssiAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeRssiAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readBeaconLostCountAttribute( - BeaconLostCountAttributeCallback callback - ) { - readBeaconLostCountAttribute(chipClusterPtr, callback); - } - public void subscribeBeaconLostCountAttribute( - BeaconLostCountAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeBeaconLostCountAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readBeaconRxCountAttribute( - BeaconRxCountAttributeCallback callback - ) { - readBeaconRxCountAttribute(chipClusterPtr, callback); - } - public void subscribeBeaconRxCountAttribute( - BeaconRxCountAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeBeaconRxCountAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readPacketMulticastRxCountAttribute( - PacketMulticastRxCountAttributeCallback callback - ) { - readPacketMulticastRxCountAttribute(chipClusterPtr, callback); - } - public void subscribePacketMulticastRxCountAttribute( - PacketMulticastRxCountAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribePacketMulticastRxCountAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readPacketMulticastTxCountAttribute( - PacketMulticastTxCountAttributeCallback callback - ) { - readPacketMulticastTxCountAttribute(chipClusterPtr, callback); - } - public void subscribePacketMulticastTxCountAttribute( - PacketMulticastTxCountAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribePacketMulticastTxCountAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readPacketUnicastRxCountAttribute( - PacketUnicastRxCountAttributeCallback callback - ) { - readPacketUnicastRxCountAttribute(chipClusterPtr, callback); - } - public void subscribePacketUnicastRxCountAttribute( - PacketUnicastRxCountAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribePacketUnicastRxCountAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readPacketUnicastTxCountAttribute( - PacketUnicastTxCountAttributeCallback callback - ) { - readPacketUnicastTxCountAttribute(chipClusterPtr, callback); - } - public void subscribePacketUnicastTxCountAttribute( - PacketUnicastTxCountAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribePacketUnicastTxCountAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readCurrentMaxRateAttribute( - CurrentMaxRateAttributeCallback callback - ) { - readCurrentMaxRateAttribute(chipClusterPtr, callback); - } - public void subscribeCurrentMaxRateAttribute( - CurrentMaxRateAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeCurrentMaxRateAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readOverrunCountAttribute( - OverrunCountAttributeCallback callback - ) { - readOverrunCountAttribute(chipClusterPtr, callback); - } - public void subscribeOverrunCountAttribute( - OverrunCountAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeOverrunCountAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - ) { - readGeneratedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - ) { - readAcceptedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readEventListAttribute( - EventListAttributeCallback callback - ) { - readEventListAttribute(chipClusterPtr, callback); - } - public void subscribeEventListAttribute( - EventListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAttributeListAttribute( - AttributeListAttributeCallback callback - ) { - readAttributeListAttribute(chipClusterPtr, callback); - } - public void subscribeAttributeListAttribute( - AttributeListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readFeatureMapAttribute( - LongAttributeCallback callback - ) { - readFeatureMapAttribute(chipClusterPtr, callback); - } - public void subscribeFeatureMapAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readClusterRevisionAttribute( - IntegerAttributeCallback callback - ) { - readClusterRevisionAttribute(chipClusterPtr, callback); - } - public void subscribeClusterRevisionAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - private native void readBssidAttribute(long chipClusterPtr, - BssidAttributeCallback callback - ); - private native void subscribeBssidAttribute(long chipClusterPtr, - BssidAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readSecurityTypeAttribute(long chipClusterPtr, - SecurityTypeAttributeCallback callback - ); - private native void subscribeSecurityTypeAttribute(long chipClusterPtr, - SecurityTypeAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readWiFiVersionAttribute(long chipClusterPtr, - WiFiVersionAttributeCallback callback - ); - private native void subscribeWiFiVersionAttribute(long chipClusterPtr, - WiFiVersionAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readChannelNumberAttribute(long chipClusterPtr, - ChannelNumberAttributeCallback callback - ); - private native void subscribeChannelNumberAttribute(long chipClusterPtr, - ChannelNumberAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readRssiAttribute(long chipClusterPtr, - RssiAttributeCallback callback - ); - private native void subscribeRssiAttribute(long chipClusterPtr, - RssiAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readBeaconLostCountAttribute(long chipClusterPtr, - BeaconLostCountAttributeCallback callback - ); - private native void subscribeBeaconLostCountAttribute(long chipClusterPtr, - BeaconLostCountAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readBeaconRxCountAttribute(long chipClusterPtr, - BeaconRxCountAttributeCallback callback - ); - private native void subscribeBeaconRxCountAttribute(long chipClusterPtr, - BeaconRxCountAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readPacketMulticastRxCountAttribute(long chipClusterPtr, - PacketMulticastRxCountAttributeCallback callback - ); - private native void subscribePacketMulticastRxCountAttribute(long chipClusterPtr, - PacketMulticastRxCountAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readPacketMulticastTxCountAttribute(long chipClusterPtr, - PacketMulticastTxCountAttributeCallback callback - ); - private native void subscribePacketMulticastTxCountAttribute(long chipClusterPtr, - PacketMulticastTxCountAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readPacketUnicastRxCountAttribute(long chipClusterPtr, - PacketUnicastRxCountAttributeCallback callback - ); - private native void subscribePacketUnicastRxCountAttribute(long chipClusterPtr, - PacketUnicastRxCountAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readPacketUnicastTxCountAttribute(long chipClusterPtr, - PacketUnicastTxCountAttributeCallback callback - ); - private native void subscribePacketUnicastTxCountAttribute(long chipClusterPtr, - PacketUnicastTxCountAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readCurrentMaxRateAttribute(long chipClusterPtr, - CurrentMaxRateAttributeCallback callback - ); - private native void subscribeCurrentMaxRateAttribute(long chipClusterPtr, - CurrentMaxRateAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readOverrunCountAttribute(long chipClusterPtr, - OverrunCountAttributeCallback callback - ); - private native void subscribeOverrunCountAttribute(long chipClusterPtr, - OverrunCountAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - ); - private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - ); - private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - ); - private native void subscribeEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - ); - private native void subscribeAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - } - - public static class EthernetNetworkDiagnosticsCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 0x00000037L; - - public EthernetNetworkDiagnosticsCluster(long devicePtr, int endpointId) { - super(devicePtr, endpointId); - } - - @Override - public native long initWithDevice(long devicePtr, int endpointId); - - public void resetCounts(DefaultClusterCallback callback - ) { - resetCounts(chipClusterPtr, callback, null); - } - - public void resetCounts(DefaultClusterCallback callback - - , int timedInvokeTimeoutMs) { - resetCounts(chipClusterPtr, callback, timedInvokeTimeoutMs); - } - private native void resetCounts(long chipClusterPtr, DefaultClusterCallback Callback - - , @Nullable Integer timedInvokeTimeoutMs); - - public interface PHYRateAttributeCallback { - void onSuccess(@Nullable Integer value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface FullDuplexAttributeCallback { - void onSuccess(@Nullable Boolean value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface CarrierDetectAttributeCallback { - void onSuccess(@Nullable Boolean value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface GeneratedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AcceptedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface EventListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AttributeListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - - public void readPHYRateAttribute( - PHYRateAttributeCallback callback - ) { - readPHYRateAttribute(chipClusterPtr, callback); - } - public void subscribePHYRateAttribute( - PHYRateAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribePHYRateAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readFullDuplexAttribute( - FullDuplexAttributeCallback callback - ) { - readFullDuplexAttribute(chipClusterPtr, callback); - } - public void subscribeFullDuplexAttribute( - FullDuplexAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeFullDuplexAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readPacketRxCountAttribute( - LongAttributeCallback callback - ) { - readPacketRxCountAttribute(chipClusterPtr, callback); - } - public void subscribePacketRxCountAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribePacketRxCountAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readPacketTxCountAttribute( - LongAttributeCallback callback - ) { - readPacketTxCountAttribute(chipClusterPtr, callback); - } - public void subscribePacketTxCountAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribePacketTxCountAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readTxErrCountAttribute( - LongAttributeCallback callback - ) { - readTxErrCountAttribute(chipClusterPtr, callback); - } - public void subscribeTxErrCountAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeTxErrCountAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readCollisionCountAttribute( - LongAttributeCallback callback - ) { - readCollisionCountAttribute(chipClusterPtr, callback); - } - public void subscribeCollisionCountAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeCollisionCountAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readOverrunCountAttribute( - LongAttributeCallback callback - ) { - readOverrunCountAttribute(chipClusterPtr, callback); - } - public void subscribeOverrunCountAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeOverrunCountAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readCarrierDetectAttribute( - CarrierDetectAttributeCallback callback - ) { - readCarrierDetectAttribute(chipClusterPtr, callback); - } - public void subscribeCarrierDetectAttribute( - CarrierDetectAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeCarrierDetectAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readTimeSinceResetAttribute( - LongAttributeCallback callback - ) { - readTimeSinceResetAttribute(chipClusterPtr, callback); - } - public void subscribeTimeSinceResetAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeTimeSinceResetAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - ) { - readGeneratedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - ) { - readAcceptedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readEventListAttribute( - EventListAttributeCallback callback - ) { - readEventListAttribute(chipClusterPtr, callback); - } - public void subscribeEventListAttribute( - EventListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAttributeListAttribute( - AttributeListAttributeCallback callback - ) { - readAttributeListAttribute(chipClusterPtr, callback); - } - public void subscribeAttributeListAttribute( - AttributeListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readFeatureMapAttribute( - LongAttributeCallback callback - ) { - readFeatureMapAttribute(chipClusterPtr, callback); - } - public void subscribeFeatureMapAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readClusterRevisionAttribute( - IntegerAttributeCallback callback - ) { - readClusterRevisionAttribute(chipClusterPtr, callback); - } - public void subscribeClusterRevisionAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - private native void readPHYRateAttribute(long chipClusterPtr, - PHYRateAttributeCallback callback - ); - private native void subscribePHYRateAttribute(long chipClusterPtr, - PHYRateAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readFullDuplexAttribute(long chipClusterPtr, - FullDuplexAttributeCallback callback - ); - private native void subscribeFullDuplexAttribute(long chipClusterPtr, - FullDuplexAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readPacketRxCountAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribePacketRxCountAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readPacketTxCountAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribePacketTxCountAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readTxErrCountAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeTxErrCountAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readCollisionCountAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeCollisionCountAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readOverrunCountAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeOverrunCountAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readCarrierDetectAttribute(long chipClusterPtr, - CarrierDetectAttributeCallback callback - ); - private native void subscribeCarrierDetectAttribute(long chipClusterPtr, - CarrierDetectAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readTimeSinceResetAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeTimeSinceResetAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - ); - private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - ); - private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - ); - private native void subscribeEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - ); - private native void subscribeAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - } - - public static class TimeSynchronizationCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 0x00000038L; - - public TimeSynchronizationCluster(long devicePtr, int endpointId) { - super(devicePtr, endpointId); - } - - @Override - public native long initWithDevice(long devicePtr, int endpointId); - - public void setUTCTime(DefaultClusterCallback callback - , Long UTCTime, Integer granularity, Optional timeSource) { - setUTCTime(chipClusterPtr, callback, UTCTime, granularity, timeSource, null); - } - - public void setUTCTime(DefaultClusterCallback callback - , Long UTCTime, Integer granularity, Optional timeSource - , int timedInvokeTimeoutMs) { - setUTCTime(chipClusterPtr, callback, UTCTime, granularity, timeSource, timedInvokeTimeoutMs); - } - - public void setTrustedTimeSource(DefaultClusterCallback callback - , @Nullable ChipStructs.TimeSynchronizationClusterFabricScopedTrustedTimeSourceStruct trustedTimeSource) { - setTrustedTimeSource(chipClusterPtr, callback, trustedTimeSource, null); - } - - public void setTrustedTimeSource(DefaultClusterCallback callback - , @Nullable ChipStructs.TimeSynchronizationClusterFabricScopedTrustedTimeSourceStruct trustedTimeSource - , int timedInvokeTimeoutMs) { - setTrustedTimeSource(chipClusterPtr, callback, trustedTimeSource, timedInvokeTimeoutMs); - } - - public void setTimeZone(SetTimeZoneResponseCallback callback - , ArrayList timeZone) { - setTimeZone(chipClusterPtr, callback, timeZone, null); - } - - public void setTimeZone(SetTimeZoneResponseCallback callback - , ArrayList timeZone - , int timedInvokeTimeoutMs) { - setTimeZone(chipClusterPtr, callback, timeZone, timedInvokeTimeoutMs); - } - - public void setDSTOffset(DefaultClusterCallback callback - , ArrayList DSTOffset) { - setDSTOffset(chipClusterPtr, callback, DSTOffset, null); - } - - public void setDSTOffset(DefaultClusterCallback callback - , ArrayList DSTOffset - , int timedInvokeTimeoutMs) { - setDSTOffset(chipClusterPtr, callback, DSTOffset, timedInvokeTimeoutMs); - } - - public void setDefaultNTP(DefaultClusterCallback callback - , @Nullable String defaultNTP) { - setDefaultNTP(chipClusterPtr, callback, defaultNTP, null); - } - - public void setDefaultNTP(DefaultClusterCallback callback - , @Nullable String defaultNTP - , int timedInvokeTimeoutMs) { - setDefaultNTP(chipClusterPtr, callback, defaultNTP, timedInvokeTimeoutMs); - } - private native void setUTCTime(long chipClusterPtr, DefaultClusterCallback Callback - , Long UTCTime, Integer granularity, Optional timeSource - , @Nullable Integer timedInvokeTimeoutMs); - private native void setTrustedTimeSource(long chipClusterPtr, DefaultClusterCallback Callback - , @Nullable ChipStructs.TimeSynchronizationClusterFabricScopedTrustedTimeSourceStruct trustedTimeSource - , @Nullable Integer timedInvokeTimeoutMs); - private native void setTimeZone(long chipClusterPtr, SetTimeZoneResponseCallback Callback - , ArrayList timeZone - , @Nullable Integer timedInvokeTimeoutMs); - private native void setDSTOffset(long chipClusterPtr, DefaultClusterCallback Callback - , ArrayList DSTOffset - , @Nullable Integer timedInvokeTimeoutMs); - private native void setDefaultNTP(long chipClusterPtr, DefaultClusterCallback Callback - , @Nullable String defaultNTP - , @Nullable Integer timedInvokeTimeoutMs); - public interface SetTimeZoneResponseCallback { - void onSuccess(Boolean DSTOffsetRequired); - - void onError(Exception error); - } - - - public interface UTCTimeAttributeCallback { - void onSuccess(@Nullable Long value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface DefaultNTPAttributeCallback { - void onSuccess(@Nullable String value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface TimeZoneAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface DSTOffsetAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface LocalTimeAttributeCallback { - void onSuccess(@Nullable Long value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface GeneratedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AcceptedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface EventListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AttributeListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - - public void readUTCTimeAttribute( - UTCTimeAttributeCallback callback - ) { - readUTCTimeAttribute(chipClusterPtr, callback); - } - public void subscribeUTCTimeAttribute( - UTCTimeAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeUTCTimeAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readGranularityAttribute( - IntegerAttributeCallback callback - ) { - readGranularityAttribute(chipClusterPtr, callback); - } - public void subscribeGranularityAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeGranularityAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readTimeSourceAttribute( - IntegerAttributeCallback callback - ) { - readTimeSourceAttribute(chipClusterPtr, callback); - } - public void subscribeTimeSourceAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeTimeSourceAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readDefaultNTPAttribute( - DefaultNTPAttributeCallback callback - ) { - readDefaultNTPAttribute(chipClusterPtr, callback); - } - public void subscribeDefaultNTPAttribute( - DefaultNTPAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeDefaultNTPAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readTimeZoneAttribute( - TimeZoneAttributeCallback callback - ) { - readTimeZoneAttribute(chipClusterPtr, callback); - } - public void subscribeTimeZoneAttribute( - TimeZoneAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeTimeZoneAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readDSTOffsetAttribute( - DSTOffsetAttributeCallback callback - ) { - readDSTOffsetAttribute(chipClusterPtr, callback); - } - public void subscribeDSTOffsetAttribute( - DSTOffsetAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeDSTOffsetAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readLocalTimeAttribute( - LocalTimeAttributeCallback callback - ) { - readLocalTimeAttribute(chipClusterPtr, callback); - } - public void subscribeLocalTimeAttribute( - LocalTimeAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeLocalTimeAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readTimeZoneDatabaseAttribute( - IntegerAttributeCallback callback - ) { - readTimeZoneDatabaseAttribute(chipClusterPtr, callback); - } - public void subscribeTimeZoneDatabaseAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeTimeZoneDatabaseAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readNTPServerAvailableAttribute( - BooleanAttributeCallback callback - ) { - readNTPServerAvailableAttribute(chipClusterPtr, callback); - } - public void subscribeNTPServerAvailableAttribute( - BooleanAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeNTPServerAvailableAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readTimeZoneListMaxSizeAttribute( - IntegerAttributeCallback callback - ) { - readTimeZoneListMaxSizeAttribute(chipClusterPtr, callback); - } - public void subscribeTimeZoneListMaxSizeAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeTimeZoneListMaxSizeAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readDSTOffsetListMaxSizeAttribute( - IntegerAttributeCallback callback - ) { - readDSTOffsetListMaxSizeAttribute(chipClusterPtr, callback); - } - public void subscribeDSTOffsetListMaxSizeAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeDSTOffsetListMaxSizeAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readSupportsDNSResolveAttribute( - BooleanAttributeCallback callback - ) { - readSupportsDNSResolveAttribute(chipClusterPtr, callback); - } - public void subscribeSupportsDNSResolveAttribute( - BooleanAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeSupportsDNSResolveAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - ) { - readGeneratedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - ) { - readAcceptedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readEventListAttribute( - EventListAttributeCallback callback - ) { - readEventListAttribute(chipClusterPtr, callback); - } - public void subscribeEventListAttribute( - EventListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAttributeListAttribute( - AttributeListAttributeCallback callback - ) { - readAttributeListAttribute(chipClusterPtr, callback); - } - public void subscribeAttributeListAttribute( - AttributeListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readFeatureMapAttribute( - LongAttributeCallback callback - ) { - readFeatureMapAttribute(chipClusterPtr, callback); - } - public void subscribeFeatureMapAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readClusterRevisionAttribute( - IntegerAttributeCallback callback - ) { - readClusterRevisionAttribute(chipClusterPtr, callback); - } - public void subscribeClusterRevisionAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - private native void readUTCTimeAttribute(long chipClusterPtr, - UTCTimeAttributeCallback callback - ); - private native void subscribeUTCTimeAttribute(long chipClusterPtr, - UTCTimeAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readGranularityAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeGranularityAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readTimeSourceAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeTimeSourceAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readDefaultNTPAttribute(long chipClusterPtr, - DefaultNTPAttributeCallback callback - ); - private native void subscribeDefaultNTPAttribute(long chipClusterPtr, - DefaultNTPAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readTimeZoneAttribute(long chipClusterPtr, - TimeZoneAttributeCallback callback - ); - private native void subscribeTimeZoneAttribute(long chipClusterPtr, - TimeZoneAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readDSTOffsetAttribute(long chipClusterPtr, - DSTOffsetAttributeCallback callback - ); - private native void subscribeDSTOffsetAttribute(long chipClusterPtr, - DSTOffsetAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readLocalTimeAttribute(long chipClusterPtr, - LocalTimeAttributeCallback callback - ); - private native void subscribeLocalTimeAttribute(long chipClusterPtr, - LocalTimeAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readTimeZoneDatabaseAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeTimeZoneDatabaseAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readNTPServerAvailableAttribute(long chipClusterPtr, - BooleanAttributeCallback callback - ); - private native void subscribeNTPServerAvailableAttribute(long chipClusterPtr, - BooleanAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readTimeZoneListMaxSizeAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeTimeZoneListMaxSizeAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readDSTOffsetListMaxSizeAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeDSTOffsetListMaxSizeAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readSupportsDNSResolveAttribute(long chipClusterPtr, - BooleanAttributeCallback callback - ); - private native void subscribeSupportsDNSResolveAttribute(long chipClusterPtr, - BooleanAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - ); - private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - ); - private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - ); - private native void subscribeEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - ); - private native void subscribeAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - } - - public static class BridgedDeviceBasicInformationCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 0x00000039L; - - public BridgedDeviceBasicInformationCluster(long devicePtr, int endpointId) { - super(devicePtr, endpointId); - } - - @Override - public native long initWithDevice(long devicePtr, int endpointId); - - public interface GeneratedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AcceptedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface EventListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AttributeListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - - public void readVendorNameAttribute( - CharStringAttributeCallback callback - ) { - readVendorNameAttribute(chipClusterPtr, callback); - } - public void subscribeVendorNameAttribute( - CharStringAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeVendorNameAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readVendorIDAttribute( - IntegerAttributeCallback callback - ) { - readVendorIDAttribute(chipClusterPtr, callback); - } - public void subscribeVendorIDAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeVendorIDAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readProductNameAttribute( - CharStringAttributeCallback callback - ) { - readProductNameAttribute(chipClusterPtr, callback); - } - public void subscribeProductNameAttribute( - CharStringAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeProductNameAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readNodeLabelAttribute( - CharStringAttributeCallback callback - ) { - readNodeLabelAttribute(chipClusterPtr, callback); - } - public void writeNodeLabelAttribute(DefaultClusterCallback callback, String value) { - writeNodeLabelAttribute(chipClusterPtr, callback, value, null); - } - - public void writeNodeLabelAttribute(DefaultClusterCallback callback, String value, int timedWriteTimeoutMs) { - writeNodeLabelAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeNodeLabelAttribute( - CharStringAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeNodeLabelAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readHardwareVersionAttribute( - IntegerAttributeCallback callback - ) { - readHardwareVersionAttribute(chipClusterPtr, callback); - } - public void subscribeHardwareVersionAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeHardwareVersionAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readHardwareVersionStringAttribute( - CharStringAttributeCallback callback - ) { - readHardwareVersionStringAttribute(chipClusterPtr, callback); - } - public void subscribeHardwareVersionStringAttribute( - CharStringAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeHardwareVersionStringAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readSoftwareVersionAttribute( - LongAttributeCallback callback - ) { - readSoftwareVersionAttribute(chipClusterPtr, callback); - } - public void subscribeSoftwareVersionAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeSoftwareVersionAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readSoftwareVersionStringAttribute( - CharStringAttributeCallback callback - ) { - readSoftwareVersionStringAttribute(chipClusterPtr, callback); - } - public void subscribeSoftwareVersionStringAttribute( - CharStringAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeSoftwareVersionStringAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readManufacturingDateAttribute( - CharStringAttributeCallback callback - ) { - readManufacturingDateAttribute(chipClusterPtr, callback); - } - public void subscribeManufacturingDateAttribute( - CharStringAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeManufacturingDateAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readPartNumberAttribute( - CharStringAttributeCallback callback - ) { - readPartNumberAttribute(chipClusterPtr, callback); - } - public void subscribePartNumberAttribute( - CharStringAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribePartNumberAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readProductURLAttribute( - CharStringAttributeCallback callback - ) { - readProductURLAttribute(chipClusterPtr, callback); - } - public void subscribeProductURLAttribute( - CharStringAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeProductURLAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readProductLabelAttribute( - CharStringAttributeCallback callback - ) { - readProductLabelAttribute(chipClusterPtr, callback); - } - public void subscribeProductLabelAttribute( - CharStringAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeProductLabelAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readSerialNumberAttribute( - CharStringAttributeCallback callback - ) { - readSerialNumberAttribute(chipClusterPtr, callback); - } - public void subscribeSerialNumberAttribute( - CharStringAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeSerialNumberAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readReachableAttribute( - BooleanAttributeCallback callback - ) { - readReachableAttribute(chipClusterPtr, callback); - } - public void subscribeReachableAttribute( - BooleanAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeReachableAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readUniqueIDAttribute( - CharStringAttributeCallback callback - ) { - readUniqueIDAttribute(chipClusterPtr, callback); - } - public void subscribeUniqueIDAttribute( - CharStringAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeUniqueIDAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - ) { - readGeneratedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - ) { - readAcceptedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readEventListAttribute( - EventListAttributeCallback callback - ) { - readEventListAttribute(chipClusterPtr, callback); - } - public void subscribeEventListAttribute( - EventListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAttributeListAttribute( - AttributeListAttributeCallback callback - ) { - readAttributeListAttribute(chipClusterPtr, callback); - } - public void subscribeAttributeListAttribute( - AttributeListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readFeatureMapAttribute( - LongAttributeCallback callback - ) { - readFeatureMapAttribute(chipClusterPtr, callback); - } - public void subscribeFeatureMapAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readClusterRevisionAttribute( - IntegerAttributeCallback callback - ) { - readClusterRevisionAttribute(chipClusterPtr, callback); - } - public void subscribeClusterRevisionAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - private native void readVendorNameAttribute(long chipClusterPtr, - CharStringAttributeCallback callback - ); - private native void subscribeVendorNameAttribute(long chipClusterPtr, - CharStringAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readVendorIDAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeVendorIDAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readProductNameAttribute(long chipClusterPtr, - CharStringAttributeCallback callback - ); - private native void subscribeProductNameAttribute(long chipClusterPtr, - CharStringAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readNodeLabelAttribute(long chipClusterPtr, - CharStringAttributeCallback callback - ); - - private native void writeNodeLabelAttribute(long chipClusterPtr, DefaultClusterCallback callback, String value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeNodeLabelAttribute(long chipClusterPtr, - CharStringAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readHardwareVersionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeHardwareVersionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readHardwareVersionStringAttribute(long chipClusterPtr, - CharStringAttributeCallback callback - ); - private native void subscribeHardwareVersionStringAttribute(long chipClusterPtr, - CharStringAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readSoftwareVersionAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeSoftwareVersionAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readSoftwareVersionStringAttribute(long chipClusterPtr, - CharStringAttributeCallback callback - ); - private native void subscribeSoftwareVersionStringAttribute(long chipClusterPtr, - CharStringAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readManufacturingDateAttribute(long chipClusterPtr, - CharStringAttributeCallback callback - ); - private native void subscribeManufacturingDateAttribute(long chipClusterPtr, - CharStringAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readPartNumberAttribute(long chipClusterPtr, - CharStringAttributeCallback callback - ); - private native void subscribePartNumberAttribute(long chipClusterPtr, - CharStringAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readProductURLAttribute(long chipClusterPtr, - CharStringAttributeCallback callback - ); - private native void subscribeProductURLAttribute(long chipClusterPtr, - CharStringAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readProductLabelAttribute(long chipClusterPtr, - CharStringAttributeCallback callback - ); - private native void subscribeProductLabelAttribute(long chipClusterPtr, - CharStringAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readSerialNumberAttribute(long chipClusterPtr, - CharStringAttributeCallback callback - ); - private native void subscribeSerialNumberAttribute(long chipClusterPtr, - CharStringAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readReachableAttribute(long chipClusterPtr, - BooleanAttributeCallback callback - ); - private native void subscribeReachableAttribute(long chipClusterPtr, - BooleanAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readUniqueIDAttribute(long chipClusterPtr, - CharStringAttributeCallback callback - ); - private native void subscribeUniqueIDAttribute(long chipClusterPtr, - CharStringAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - ); - private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - ); - private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - ); - private native void subscribeEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - ); - private native void subscribeAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - } - - public static class SwitchCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 0x0000003BL; - - public SwitchCluster(long devicePtr, int endpointId) { - super(devicePtr, endpointId); - } - - @Override - public native long initWithDevice(long devicePtr, int endpointId); - - public interface GeneratedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AcceptedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface EventListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AttributeListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - - public void readNumberOfPositionsAttribute( - IntegerAttributeCallback callback - ) { - readNumberOfPositionsAttribute(chipClusterPtr, callback); - } - public void subscribeNumberOfPositionsAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeNumberOfPositionsAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readCurrentPositionAttribute( - IntegerAttributeCallback callback - ) { - readCurrentPositionAttribute(chipClusterPtr, callback); - } - public void subscribeCurrentPositionAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeCurrentPositionAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readMultiPressMaxAttribute( - IntegerAttributeCallback callback - ) { - readMultiPressMaxAttribute(chipClusterPtr, callback); - } - public void subscribeMultiPressMaxAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeMultiPressMaxAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - ) { - readGeneratedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - ) { - readAcceptedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readEventListAttribute( - EventListAttributeCallback callback - ) { - readEventListAttribute(chipClusterPtr, callback); - } - public void subscribeEventListAttribute( - EventListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAttributeListAttribute( - AttributeListAttributeCallback callback - ) { - readAttributeListAttribute(chipClusterPtr, callback); - } - public void subscribeAttributeListAttribute( - AttributeListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readFeatureMapAttribute( - LongAttributeCallback callback - ) { - readFeatureMapAttribute(chipClusterPtr, callback); - } - public void subscribeFeatureMapAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readClusterRevisionAttribute( - IntegerAttributeCallback callback - ) { - readClusterRevisionAttribute(chipClusterPtr, callback); - } - public void subscribeClusterRevisionAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - private native void readNumberOfPositionsAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeNumberOfPositionsAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readCurrentPositionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeCurrentPositionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readMultiPressMaxAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeMultiPressMaxAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - ); - private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - ); - private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - ); - private native void subscribeEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - ); - private native void subscribeAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - } - - public static class AdministratorCommissioningCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 0x0000003CL; - - public AdministratorCommissioningCluster(long devicePtr, int endpointId) { - super(devicePtr, endpointId); - } - - @Override - public native long initWithDevice(long devicePtr, int endpointId); - - - public void openCommissioningWindow(DefaultClusterCallback callback - , Integer commissioningTimeout, byte[] PAKEPasscodeVerifier, Integer discriminator, Long iterations, byte[] salt - , int timedInvokeTimeoutMs) { - openCommissioningWindow(chipClusterPtr, callback, commissioningTimeout, PAKEPasscodeVerifier, discriminator, iterations, salt, timedInvokeTimeoutMs); - } - - - public void openBasicCommissioningWindow(DefaultClusterCallback callback - , Integer commissioningTimeout - , int timedInvokeTimeoutMs) { - openBasicCommissioningWindow(chipClusterPtr, callback, commissioningTimeout, timedInvokeTimeoutMs); - } - - - public void revokeCommissioning(DefaultClusterCallback callback - - , int timedInvokeTimeoutMs) { - revokeCommissioning(chipClusterPtr, callback, timedInvokeTimeoutMs); - } - private native void openCommissioningWindow(long chipClusterPtr, DefaultClusterCallback Callback - , Integer commissioningTimeout, byte[] PAKEPasscodeVerifier, Integer discriminator, Long iterations, byte[] salt - , @Nullable Integer timedInvokeTimeoutMs); - private native void openBasicCommissioningWindow(long chipClusterPtr, DefaultClusterCallback Callback - , Integer commissioningTimeout - , @Nullable Integer timedInvokeTimeoutMs); - private native void revokeCommissioning(long chipClusterPtr, DefaultClusterCallback Callback - - , @Nullable Integer timedInvokeTimeoutMs); - - public interface AdminFabricIndexAttributeCallback { - void onSuccess(@Nullable Integer value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AdminVendorIdAttributeCallback { - void onSuccess(@Nullable Integer value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface GeneratedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AcceptedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface EventListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AttributeListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - - public void readWindowStatusAttribute( - IntegerAttributeCallback callback - ) { - readWindowStatusAttribute(chipClusterPtr, callback); - } - public void subscribeWindowStatusAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeWindowStatusAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAdminFabricIndexAttribute( - AdminFabricIndexAttributeCallback callback - ) { - readAdminFabricIndexAttribute(chipClusterPtr, callback); - } - public void subscribeAdminFabricIndexAttribute( - AdminFabricIndexAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAdminFabricIndexAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAdminVendorIdAttribute( - AdminVendorIdAttributeCallback callback - ) { - readAdminVendorIdAttribute(chipClusterPtr, callback); - } - public void subscribeAdminVendorIdAttribute( - AdminVendorIdAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAdminVendorIdAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - ) { - readGeneratedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - ) { - readAcceptedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readEventListAttribute( - EventListAttributeCallback callback - ) { - readEventListAttribute(chipClusterPtr, callback); - } - public void subscribeEventListAttribute( - EventListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAttributeListAttribute( - AttributeListAttributeCallback callback - ) { - readAttributeListAttribute(chipClusterPtr, callback); - } - public void subscribeAttributeListAttribute( - AttributeListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readFeatureMapAttribute( - LongAttributeCallback callback - ) { - readFeatureMapAttribute(chipClusterPtr, callback); - } - public void subscribeFeatureMapAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readClusterRevisionAttribute( - IntegerAttributeCallback callback - ) { - readClusterRevisionAttribute(chipClusterPtr, callback); - } - public void subscribeClusterRevisionAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - private native void readWindowStatusAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeWindowStatusAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readAdminFabricIndexAttribute(long chipClusterPtr, - AdminFabricIndexAttributeCallback callback - ); - private native void subscribeAdminFabricIndexAttribute(long chipClusterPtr, - AdminFabricIndexAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAdminVendorIdAttribute(long chipClusterPtr, - AdminVendorIdAttributeCallback callback - ); - private native void subscribeAdminVendorIdAttribute(long chipClusterPtr, - AdminVendorIdAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - ); - private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - ); - private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - ); - private native void subscribeEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - ); - private native void subscribeAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - } - - public static class OperationalCredentialsCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 0x0000003EL; - - public OperationalCredentialsCluster(long devicePtr, int endpointId) { - super(devicePtr, endpointId); - } - - @Override - public native long initWithDevice(long devicePtr, int endpointId); - - public void attestationRequest(AttestationResponseCallback callback - , byte[] attestationNonce) { - attestationRequest(chipClusterPtr, callback, attestationNonce, null); - } - - public void attestationRequest(AttestationResponseCallback callback - , byte[] attestationNonce - , int timedInvokeTimeoutMs) { - attestationRequest(chipClusterPtr, callback, attestationNonce, timedInvokeTimeoutMs); - } - - public void certificateChainRequest(CertificateChainResponseCallback callback - , Integer certificateType) { - certificateChainRequest(chipClusterPtr, callback, certificateType, null); - } - - public void certificateChainRequest(CertificateChainResponseCallback callback - , Integer certificateType - , int timedInvokeTimeoutMs) { - certificateChainRequest(chipClusterPtr, callback, certificateType, timedInvokeTimeoutMs); - } - - public void CSRRequest(CSRResponseCallback callback - , byte[] CSRNonce, Optional isForUpdateNOC) { - CSRRequest(chipClusterPtr, callback, CSRNonce, isForUpdateNOC, null); - } - - public void CSRRequest(CSRResponseCallback callback - , byte[] CSRNonce, Optional isForUpdateNOC - , int timedInvokeTimeoutMs) { - CSRRequest(chipClusterPtr, callback, CSRNonce, isForUpdateNOC, timedInvokeTimeoutMs); - } - - public void addNOC(NOCResponseCallback callback - , byte[] NOCValue, Optional ICACValue, byte[] IPKValue, Long caseAdminSubject, Integer adminVendorId) { - addNOC(chipClusterPtr, callback, NOCValue, ICACValue, IPKValue, caseAdminSubject, adminVendorId, null); - } - - public void addNOC(NOCResponseCallback callback - , byte[] NOCValue, Optional ICACValue, byte[] IPKValue, Long caseAdminSubject, Integer adminVendorId - , int timedInvokeTimeoutMs) { - addNOC(chipClusterPtr, callback, NOCValue, ICACValue, IPKValue, caseAdminSubject, adminVendorId, timedInvokeTimeoutMs); - } - - public void updateNOC(NOCResponseCallback callback - , byte[] NOCValue, Optional ICACValue) { - updateNOC(chipClusterPtr, callback, NOCValue, ICACValue, null); - } - - public void updateNOC(NOCResponseCallback callback - , byte[] NOCValue, Optional ICACValue - , int timedInvokeTimeoutMs) { - updateNOC(chipClusterPtr, callback, NOCValue, ICACValue, timedInvokeTimeoutMs); - } - - public void updateFabricLabel(NOCResponseCallback callback - , String label) { - updateFabricLabel(chipClusterPtr, callback, label, null); - } - - public void updateFabricLabel(NOCResponseCallback callback - , String label - , int timedInvokeTimeoutMs) { - updateFabricLabel(chipClusterPtr, callback, label, timedInvokeTimeoutMs); - } - - public void removeFabric(NOCResponseCallback callback - , Integer fabricIndex) { - removeFabric(chipClusterPtr, callback, fabricIndex, null); - } - - public void removeFabric(NOCResponseCallback callback - , Integer fabricIndex - , int timedInvokeTimeoutMs) { - removeFabric(chipClusterPtr, callback, fabricIndex, timedInvokeTimeoutMs); - } - - public void addTrustedRootCertificate(DefaultClusterCallback callback - , byte[] rootCACertificate) { - addTrustedRootCertificate(chipClusterPtr, callback, rootCACertificate, null); - } - - public void addTrustedRootCertificate(DefaultClusterCallback callback - , byte[] rootCACertificate - , int timedInvokeTimeoutMs) { - addTrustedRootCertificate(chipClusterPtr, callback, rootCACertificate, timedInvokeTimeoutMs); - } - private native void attestationRequest(long chipClusterPtr, AttestationResponseCallback Callback - , byte[] attestationNonce - , @Nullable Integer timedInvokeTimeoutMs); - private native void certificateChainRequest(long chipClusterPtr, CertificateChainResponseCallback Callback - , Integer certificateType - , @Nullable Integer timedInvokeTimeoutMs); - private native void CSRRequest(long chipClusterPtr, CSRResponseCallback Callback - , byte[] CSRNonce, Optional isForUpdateNOC - , @Nullable Integer timedInvokeTimeoutMs); - private native void addNOC(long chipClusterPtr, NOCResponseCallback Callback - , byte[] NOCValue, Optional ICACValue, byte[] IPKValue, Long caseAdminSubject, Integer adminVendorId - , @Nullable Integer timedInvokeTimeoutMs); - private native void updateNOC(long chipClusterPtr, NOCResponseCallback Callback - , byte[] NOCValue, Optional ICACValue - , @Nullable Integer timedInvokeTimeoutMs); - private native void updateFabricLabel(long chipClusterPtr, NOCResponseCallback Callback - , String label - , @Nullable Integer timedInvokeTimeoutMs); - private native void removeFabric(long chipClusterPtr, NOCResponseCallback Callback - , Integer fabricIndex - , @Nullable Integer timedInvokeTimeoutMs); - private native void addTrustedRootCertificate(long chipClusterPtr, DefaultClusterCallback Callback - , byte[] rootCACertificate - , @Nullable Integer timedInvokeTimeoutMs); - public interface AttestationResponseCallback { - void onSuccess(byte[] attestationElements, byte[] attestationSignature); - - void onError(Exception error); - } - - public interface CertificateChainResponseCallback { - void onSuccess(byte[] certificate); - - void onError(Exception error); - } - - public interface CSRResponseCallback { - void onSuccess(byte[] NOCSRElements, byte[] attestationSignature); - - void onError(Exception error); - } - - public interface NOCResponseCallback { - void onSuccess(Integer statusCode, Optional fabricIndex, Optional debugText); - - void onError(Exception error); - } - - - public interface NOCsAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface FabricsAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface TrustedRootCertificatesAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface GeneratedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AcceptedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface EventListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AttributeListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - - public void readNOCsAttribute( - NOCsAttributeCallback callback - ) { - readNOCsAttribute(chipClusterPtr, callback, true); - } - public void readNOCsAttributeWithFabricFilter( - NOCsAttributeCallback callback - , - boolean isFabricFiltered - ) { - readNOCsAttribute(chipClusterPtr, callback, isFabricFiltered); - } - public void subscribeNOCsAttribute( - NOCsAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeNOCsAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readFabricsAttribute( - FabricsAttributeCallback callback - ) { - readFabricsAttribute(chipClusterPtr, callback, true); - } - public void readFabricsAttributeWithFabricFilter( - FabricsAttributeCallback callback - , - boolean isFabricFiltered - ) { - readFabricsAttribute(chipClusterPtr, callback, isFabricFiltered); - } - public void subscribeFabricsAttribute( - FabricsAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeFabricsAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readSupportedFabricsAttribute( - IntegerAttributeCallback callback - ) { - readSupportedFabricsAttribute(chipClusterPtr, callback); - } - public void subscribeSupportedFabricsAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeSupportedFabricsAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readCommissionedFabricsAttribute( - IntegerAttributeCallback callback - ) { - readCommissionedFabricsAttribute(chipClusterPtr, callback); - } - public void subscribeCommissionedFabricsAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeCommissionedFabricsAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readTrustedRootCertificatesAttribute( - TrustedRootCertificatesAttributeCallback callback - ) { - readTrustedRootCertificatesAttribute(chipClusterPtr, callback); - } - public void subscribeTrustedRootCertificatesAttribute( - TrustedRootCertificatesAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeTrustedRootCertificatesAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readCurrentFabricIndexAttribute( - IntegerAttributeCallback callback - ) { - readCurrentFabricIndexAttribute(chipClusterPtr, callback); - } - public void subscribeCurrentFabricIndexAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeCurrentFabricIndexAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - ) { - readGeneratedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - ) { - readAcceptedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readEventListAttribute( - EventListAttributeCallback callback - ) { - readEventListAttribute(chipClusterPtr, callback); - } - public void subscribeEventListAttribute( - EventListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAttributeListAttribute( - AttributeListAttributeCallback callback - ) { - readAttributeListAttribute(chipClusterPtr, callback); - } - public void subscribeAttributeListAttribute( - AttributeListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readFeatureMapAttribute( - LongAttributeCallback callback - ) { - readFeatureMapAttribute(chipClusterPtr, callback); - } - public void subscribeFeatureMapAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readClusterRevisionAttribute( - IntegerAttributeCallback callback - ) { - readClusterRevisionAttribute(chipClusterPtr, callback); - } - public void subscribeClusterRevisionAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - private native void readNOCsAttribute(long chipClusterPtr, - NOCsAttributeCallback callback - , boolean isFabricFiltered - ); - private native void subscribeNOCsAttribute(long chipClusterPtr, - NOCsAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readFabricsAttribute(long chipClusterPtr, - FabricsAttributeCallback callback - , boolean isFabricFiltered - ); - private native void subscribeFabricsAttribute(long chipClusterPtr, - FabricsAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readSupportedFabricsAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeSupportedFabricsAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readCommissionedFabricsAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeCommissionedFabricsAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readTrustedRootCertificatesAttribute(long chipClusterPtr, - TrustedRootCertificatesAttributeCallback callback - ); - private native void subscribeTrustedRootCertificatesAttribute(long chipClusterPtr, - TrustedRootCertificatesAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readCurrentFabricIndexAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeCurrentFabricIndexAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - ); - private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - ); - private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - ); - private native void subscribeEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - ); - private native void subscribeAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - } - - public static class GroupKeyManagementCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 0x0000003FL; - - public GroupKeyManagementCluster(long devicePtr, int endpointId) { - super(devicePtr, endpointId); - } - - @Override - public native long initWithDevice(long devicePtr, int endpointId); - - public void keySetWrite(DefaultClusterCallback callback - , ChipStructs.GroupKeyManagementClusterGroupKeySetStruct groupKeySet) { - keySetWrite(chipClusterPtr, callback, groupKeySet, null); - } - - public void keySetWrite(DefaultClusterCallback callback - , ChipStructs.GroupKeyManagementClusterGroupKeySetStruct groupKeySet - , int timedInvokeTimeoutMs) { - keySetWrite(chipClusterPtr, callback, groupKeySet, timedInvokeTimeoutMs); - } - - public void keySetRead(KeySetReadResponseCallback callback - , Integer groupKeySetID) { - keySetRead(chipClusterPtr, callback, groupKeySetID, null); - } - - public void keySetRead(KeySetReadResponseCallback callback - , Integer groupKeySetID - , int timedInvokeTimeoutMs) { - keySetRead(chipClusterPtr, callback, groupKeySetID, timedInvokeTimeoutMs); - } - - public void keySetRemove(DefaultClusterCallback callback - , Integer groupKeySetID) { - keySetRemove(chipClusterPtr, callback, groupKeySetID, null); - } - - public void keySetRemove(DefaultClusterCallback callback - , Integer groupKeySetID - , int timedInvokeTimeoutMs) { - keySetRemove(chipClusterPtr, callback, groupKeySetID, timedInvokeTimeoutMs); - } - - public void keySetReadAllIndices(KeySetReadAllIndicesResponseCallback callback - ) { - keySetReadAllIndices(chipClusterPtr, callback, null); - } - - public void keySetReadAllIndices(KeySetReadAllIndicesResponseCallback callback - - , int timedInvokeTimeoutMs) { - keySetReadAllIndices(chipClusterPtr, callback, timedInvokeTimeoutMs); - } - private native void keySetWrite(long chipClusterPtr, DefaultClusterCallback Callback - , ChipStructs.GroupKeyManagementClusterGroupKeySetStruct groupKeySet - , @Nullable Integer timedInvokeTimeoutMs); - private native void keySetRead(long chipClusterPtr, KeySetReadResponseCallback Callback - , Integer groupKeySetID - , @Nullable Integer timedInvokeTimeoutMs); - private native void keySetRemove(long chipClusterPtr, DefaultClusterCallback Callback - , Integer groupKeySetID - , @Nullable Integer timedInvokeTimeoutMs); - private native void keySetReadAllIndices(long chipClusterPtr, KeySetReadAllIndicesResponseCallback Callback - - , @Nullable Integer timedInvokeTimeoutMs); - public interface KeySetReadResponseCallback { - void onSuccess(ChipStructs.GroupKeyManagementClusterGroupKeySetStruct groupKeySet); - - void onError(Exception error); - } - - public interface KeySetReadAllIndicesResponseCallback { - void onSuccess(ArrayList groupKeySetIDs); - - void onError(Exception error); - } - - - public interface GroupKeyMapAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface GroupTableAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface GeneratedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AcceptedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface EventListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AttributeListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - - public void readGroupKeyMapAttribute( - GroupKeyMapAttributeCallback callback - ) { - readGroupKeyMapAttribute(chipClusterPtr, callback, true); - } - public void readGroupKeyMapAttributeWithFabricFilter( - GroupKeyMapAttributeCallback callback - , - boolean isFabricFiltered - ) { - readGroupKeyMapAttribute(chipClusterPtr, callback, isFabricFiltered); - } - public void writeGroupKeyMapAttribute(DefaultClusterCallback callback, ArrayList value) { - writeGroupKeyMapAttribute(chipClusterPtr, callback, value, null); - } - - public void writeGroupKeyMapAttribute(DefaultClusterCallback callback, ArrayList value, int timedWriteTimeoutMs) { - writeGroupKeyMapAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeGroupKeyMapAttribute( - GroupKeyMapAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeGroupKeyMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readGroupTableAttribute( - GroupTableAttributeCallback callback - ) { - readGroupTableAttribute(chipClusterPtr, callback, true); - } - public void readGroupTableAttributeWithFabricFilter( - GroupTableAttributeCallback callback - , - boolean isFabricFiltered - ) { - readGroupTableAttribute(chipClusterPtr, callback, isFabricFiltered); - } - public void subscribeGroupTableAttribute( - GroupTableAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeGroupTableAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readMaxGroupsPerFabricAttribute( - IntegerAttributeCallback callback - ) { - readMaxGroupsPerFabricAttribute(chipClusterPtr, callback); - } - public void subscribeMaxGroupsPerFabricAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeMaxGroupsPerFabricAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readMaxGroupKeysPerFabricAttribute( - IntegerAttributeCallback callback - ) { - readMaxGroupKeysPerFabricAttribute(chipClusterPtr, callback); - } - public void subscribeMaxGroupKeysPerFabricAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeMaxGroupKeysPerFabricAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - ) { - readGeneratedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - ) { - readAcceptedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readEventListAttribute( - EventListAttributeCallback callback - ) { - readEventListAttribute(chipClusterPtr, callback); - } - public void subscribeEventListAttribute( - EventListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAttributeListAttribute( - AttributeListAttributeCallback callback - ) { - readAttributeListAttribute(chipClusterPtr, callback); - } - public void subscribeAttributeListAttribute( - AttributeListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readFeatureMapAttribute( - LongAttributeCallback callback - ) { - readFeatureMapAttribute(chipClusterPtr, callback); - } - public void subscribeFeatureMapAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readClusterRevisionAttribute( - IntegerAttributeCallback callback - ) { - readClusterRevisionAttribute(chipClusterPtr, callback); - } - public void subscribeClusterRevisionAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - private native void readGroupKeyMapAttribute(long chipClusterPtr, - GroupKeyMapAttributeCallback callback - , boolean isFabricFiltered - ); - - private native void writeGroupKeyMapAttribute(long chipClusterPtr, DefaultClusterCallback callback, ArrayList value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeGroupKeyMapAttribute(long chipClusterPtr, - GroupKeyMapAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readGroupTableAttribute(long chipClusterPtr, - GroupTableAttributeCallback callback - , boolean isFabricFiltered - ); - private native void subscribeGroupTableAttribute(long chipClusterPtr, - GroupTableAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readMaxGroupsPerFabricAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeMaxGroupsPerFabricAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readMaxGroupKeysPerFabricAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeMaxGroupKeysPerFabricAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - ); - private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - ); - private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - ); - private native void subscribeEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - ); - private native void subscribeAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - } - - public static class FixedLabelCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 0x00000040L; - - public FixedLabelCluster(long devicePtr, int endpointId) { - super(devicePtr, endpointId); - } - - @Override - public native long initWithDevice(long devicePtr, int endpointId); - - public interface LabelListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface GeneratedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AcceptedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface EventListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AttributeListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - - public void readLabelListAttribute( - LabelListAttributeCallback callback - ) { - readLabelListAttribute(chipClusterPtr, callback); - } - public void subscribeLabelListAttribute( - LabelListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeLabelListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - ) { - readGeneratedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - ) { - readAcceptedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readEventListAttribute( - EventListAttributeCallback callback - ) { - readEventListAttribute(chipClusterPtr, callback); - } - public void subscribeEventListAttribute( - EventListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAttributeListAttribute( - AttributeListAttributeCallback callback - ) { - readAttributeListAttribute(chipClusterPtr, callback); - } - public void subscribeAttributeListAttribute( - AttributeListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readFeatureMapAttribute( - LongAttributeCallback callback - ) { - readFeatureMapAttribute(chipClusterPtr, callback); - } - public void subscribeFeatureMapAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readClusterRevisionAttribute( - IntegerAttributeCallback callback - ) { - readClusterRevisionAttribute(chipClusterPtr, callback); - } - public void subscribeClusterRevisionAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - private native void readLabelListAttribute(long chipClusterPtr, - LabelListAttributeCallback callback - ); - private native void subscribeLabelListAttribute(long chipClusterPtr, - LabelListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - ); - private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - ); - private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - ); - private native void subscribeEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - ); - private native void subscribeAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - } - - public static class UserLabelCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 0x00000041L; - - public UserLabelCluster(long devicePtr, int endpointId) { - super(devicePtr, endpointId); - } - - @Override - public native long initWithDevice(long devicePtr, int endpointId); - - public interface LabelListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface GeneratedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AcceptedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface EventListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AttributeListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - - public void readLabelListAttribute( - LabelListAttributeCallback callback - ) { - readLabelListAttribute(chipClusterPtr, callback); - } - public void writeLabelListAttribute(DefaultClusterCallback callback, ArrayList value) { - writeLabelListAttribute(chipClusterPtr, callback, value, null); - } - - public void writeLabelListAttribute(DefaultClusterCallback callback, ArrayList value, int timedWriteTimeoutMs) { - writeLabelListAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeLabelListAttribute( - LabelListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeLabelListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - ) { - readGeneratedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - ) { - readAcceptedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readEventListAttribute( - EventListAttributeCallback callback - ) { - readEventListAttribute(chipClusterPtr, callback); - } - public void subscribeEventListAttribute( - EventListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAttributeListAttribute( - AttributeListAttributeCallback callback - ) { - readAttributeListAttribute(chipClusterPtr, callback); - } - public void subscribeAttributeListAttribute( - AttributeListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readFeatureMapAttribute( - LongAttributeCallback callback - ) { - readFeatureMapAttribute(chipClusterPtr, callback); - } - public void subscribeFeatureMapAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readClusterRevisionAttribute( - IntegerAttributeCallback callback - ) { - readClusterRevisionAttribute(chipClusterPtr, callback); - } - public void subscribeClusterRevisionAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - private native void readLabelListAttribute(long chipClusterPtr, - LabelListAttributeCallback callback - ); - - private native void writeLabelListAttribute(long chipClusterPtr, DefaultClusterCallback callback, ArrayList value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeLabelListAttribute(long chipClusterPtr, - LabelListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - ); - private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - ); - private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - ); - private native void subscribeEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - ); - private native void subscribeAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - } - - public static class ProxyConfigurationCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 0x00000042L; - - public ProxyConfigurationCluster(long devicePtr, int endpointId) { - super(devicePtr, endpointId); - } - - @Override - public native long initWithDevice(long devicePtr, int endpointId); - - public interface GeneratedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AcceptedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface EventListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AttributeListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - - public void readGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - ) { - readGeneratedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - ) { - readAcceptedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readEventListAttribute( - EventListAttributeCallback callback - ) { - readEventListAttribute(chipClusterPtr, callback); - } - public void subscribeEventListAttribute( - EventListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAttributeListAttribute( - AttributeListAttributeCallback callback - ) { - readAttributeListAttribute(chipClusterPtr, callback); - } - public void subscribeAttributeListAttribute( - AttributeListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readFeatureMapAttribute( - LongAttributeCallback callback - ) { - readFeatureMapAttribute(chipClusterPtr, callback); - } - public void subscribeFeatureMapAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readClusterRevisionAttribute( - IntegerAttributeCallback callback - ) { - readClusterRevisionAttribute(chipClusterPtr, callback); - } - public void subscribeClusterRevisionAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - private native void readGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - ); - private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - ); - private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - ); - private native void subscribeEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - ); - private native void subscribeAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - } - - public static class ProxyDiscoveryCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 0x00000043L; - - public ProxyDiscoveryCluster(long devicePtr, int endpointId) { - super(devicePtr, endpointId); - } - - @Override - public native long initWithDevice(long devicePtr, int endpointId); - - public interface GeneratedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AcceptedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface EventListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AttributeListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - - public void readGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - ) { - readGeneratedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - ) { - readAcceptedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readEventListAttribute( - EventListAttributeCallback callback - ) { - readEventListAttribute(chipClusterPtr, callback); - } - public void subscribeEventListAttribute( - EventListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAttributeListAttribute( - AttributeListAttributeCallback callback - ) { - readAttributeListAttribute(chipClusterPtr, callback); - } - public void subscribeAttributeListAttribute( - AttributeListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readFeatureMapAttribute( - LongAttributeCallback callback - ) { - readFeatureMapAttribute(chipClusterPtr, callback); - } - public void subscribeFeatureMapAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readClusterRevisionAttribute( - IntegerAttributeCallback callback - ) { - readClusterRevisionAttribute(chipClusterPtr, callback); - } - public void subscribeClusterRevisionAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - private native void readGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - ); - private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - ); - private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - ); - private native void subscribeEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - ); - private native void subscribeAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - } - - public static class ProxyValidCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 0x00000044L; - - public ProxyValidCluster(long devicePtr, int endpointId) { - super(devicePtr, endpointId); - } - - @Override - public native long initWithDevice(long devicePtr, int endpointId); - - public interface GeneratedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AcceptedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface EventListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AttributeListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - - public void readGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - ) { - readGeneratedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - ) { - readAcceptedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readEventListAttribute( - EventListAttributeCallback callback - ) { - readEventListAttribute(chipClusterPtr, callback); - } - public void subscribeEventListAttribute( - EventListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAttributeListAttribute( - AttributeListAttributeCallback callback - ) { - readAttributeListAttribute(chipClusterPtr, callback); - } - public void subscribeAttributeListAttribute( - AttributeListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readFeatureMapAttribute( - LongAttributeCallback callback - ) { - readFeatureMapAttribute(chipClusterPtr, callback); - } - public void subscribeFeatureMapAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readClusterRevisionAttribute( - IntegerAttributeCallback callback - ) { - readClusterRevisionAttribute(chipClusterPtr, callback); - } - public void subscribeClusterRevisionAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - private native void readGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - ); - private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - ); - private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - ); - private native void subscribeEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - ); - private native void subscribeAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - } - - public static class BooleanStateCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 0x00000045L; - - public BooleanStateCluster(long devicePtr, int endpointId) { - super(devicePtr, endpointId); - } - - @Override - public native long initWithDevice(long devicePtr, int endpointId); - - public interface GeneratedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AcceptedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface EventListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AttributeListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - - public void readStateValueAttribute( - BooleanAttributeCallback callback - ) { - readStateValueAttribute(chipClusterPtr, callback); - } - public void subscribeStateValueAttribute( - BooleanAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeStateValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - ) { - readGeneratedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - ) { - readAcceptedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readEventListAttribute( - EventListAttributeCallback callback - ) { - readEventListAttribute(chipClusterPtr, callback); - } - public void subscribeEventListAttribute( - EventListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAttributeListAttribute( - AttributeListAttributeCallback callback - ) { - readAttributeListAttribute(chipClusterPtr, callback); - } - public void subscribeAttributeListAttribute( - AttributeListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readFeatureMapAttribute( - LongAttributeCallback callback - ) { - readFeatureMapAttribute(chipClusterPtr, callback); - } - public void subscribeFeatureMapAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readClusterRevisionAttribute( - IntegerAttributeCallback callback - ) { - readClusterRevisionAttribute(chipClusterPtr, callback); - } - public void subscribeClusterRevisionAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - private native void readStateValueAttribute(long chipClusterPtr, - BooleanAttributeCallback callback - ); - private native void subscribeStateValueAttribute(long chipClusterPtr, - BooleanAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - ); - private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - ); - private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - ); - private native void subscribeEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - ); - private native void subscribeAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - } - - public static class IcdManagementCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 0x00000046L; - - public IcdManagementCluster(long devicePtr, int endpointId) { - super(devicePtr, endpointId); - } - - @Override - public native long initWithDevice(long devicePtr, int endpointId); - - public void registerClient(RegisterClientResponseCallback callback - , Long checkInNodeID, Long monitoredSubject, byte[] key, Optional verificationKey) { - registerClient(chipClusterPtr, callback, checkInNodeID, monitoredSubject, key, verificationKey, null); - } - - public void registerClient(RegisterClientResponseCallback callback - , Long checkInNodeID, Long monitoredSubject, byte[] key, Optional verificationKey - , int timedInvokeTimeoutMs) { - registerClient(chipClusterPtr, callback, checkInNodeID, monitoredSubject, key, verificationKey, timedInvokeTimeoutMs); - } - - public void unregisterClient(DefaultClusterCallback callback - , Long checkInNodeID, Optional verificationKey) { - unregisterClient(chipClusterPtr, callback, checkInNodeID, verificationKey, null); - } - - public void unregisterClient(DefaultClusterCallback callback - , Long checkInNodeID, Optional verificationKey - , int timedInvokeTimeoutMs) { - unregisterClient(chipClusterPtr, callback, checkInNodeID, verificationKey, timedInvokeTimeoutMs); - } - - public void stayActiveRequest(DefaultClusterCallback callback - ) { - stayActiveRequest(chipClusterPtr, callback, null); - } - - public void stayActiveRequest(DefaultClusterCallback callback - - , int timedInvokeTimeoutMs) { - stayActiveRequest(chipClusterPtr, callback, timedInvokeTimeoutMs); - } - private native void registerClient(long chipClusterPtr, RegisterClientResponseCallback Callback - , Long checkInNodeID, Long monitoredSubject, byte[] key, Optional verificationKey - , @Nullable Integer timedInvokeTimeoutMs); - private native void unregisterClient(long chipClusterPtr, DefaultClusterCallback Callback - , Long checkInNodeID, Optional verificationKey - , @Nullable Integer timedInvokeTimeoutMs); - private native void stayActiveRequest(long chipClusterPtr, DefaultClusterCallback Callback - - , @Nullable Integer timedInvokeTimeoutMs); - public interface RegisterClientResponseCallback { - void onSuccess(Long ICDCounter); - - void onError(Exception error); - } - - - public interface RegisteredClientsAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface GeneratedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AcceptedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface EventListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AttributeListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - - public void readIdleModeIntervalAttribute( - LongAttributeCallback callback - ) { - readIdleModeIntervalAttribute(chipClusterPtr, callback); - } - public void subscribeIdleModeIntervalAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeIdleModeIntervalAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readActiveModeIntervalAttribute( - LongAttributeCallback callback - ) { - readActiveModeIntervalAttribute(chipClusterPtr, callback); - } - public void subscribeActiveModeIntervalAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeActiveModeIntervalAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readActiveModeThresholdAttribute( - IntegerAttributeCallback callback - ) { - readActiveModeThresholdAttribute(chipClusterPtr, callback); - } - public void subscribeActiveModeThresholdAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeActiveModeThresholdAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readRegisteredClientsAttribute( - RegisteredClientsAttributeCallback callback - ) { - readRegisteredClientsAttribute(chipClusterPtr, callback, true); - } - public void readRegisteredClientsAttributeWithFabricFilter( - RegisteredClientsAttributeCallback callback - , - boolean isFabricFiltered - ) { - readRegisteredClientsAttribute(chipClusterPtr, callback, isFabricFiltered); - } - public void subscribeRegisteredClientsAttribute( - RegisteredClientsAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeRegisteredClientsAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readICDCounterAttribute( - LongAttributeCallback callback - ) { - readICDCounterAttribute(chipClusterPtr, callback); - } - public void subscribeICDCounterAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeICDCounterAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readClientsSupportedPerFabricAttribute( - IntegerAttributeCallback callback - ) { - readClientsSupportedPerFabricAttribute(chipClusterPtr, callback); - } - public void subscribeClientsSupportedPerFabricAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeClientsSupportedPerFabricAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - ) { - readGeneratedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - ) { - readAcceptedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readEventListAttribute( - EventListAttributeCallback callback - ) { - readEventListAttribute(chipClusterPtr, callback); - } - public void subscribeEventListAttribute( - EventListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAttributeListAttribute( - AttributeListAttributeCallback callback - ) { - readAttributeListAttribute(chipClusterPtr, callback); - } - public void subscribeAttributeListAttribute( - AttributeListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readFeatureMapAttribute( - LongAttributeCallback callback - ) { - readFeatureMapAttribute(chipClusterPtr, callback); - } - public void subscribeFeatureMapAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readClusterRevisionAttribute( - IntegerAttributeCallback callback - ) { - readClusterRevisionAttribute(chipClusterPtr, callback); - } - public void subscribeClusterRevisionAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - private native void readIdleModeIntervalAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeIdleModeIntervalAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readActiveModeIntervalAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeActiveModeIntervalAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readActiveModeThresholdAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeActiveModeThresholdAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readRegisteredClientsAttribute(long chipClusterPtr, - RegisteredClientsAttributeCallback callback - , boolean isFabricFiltered - ); - private native void subscribeRegisteredClientsAttribute(long chipClusterPtr, - RegisteredClientsAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readICDCounterAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeICDCounterAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readClientsSupportedPerFabricAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeClientsSupportedPerFabricAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - ); - private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - ); - private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - ); - private native void subscribeEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - ); - private native void subscribeAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - } - - public static class ModeSelectCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 0x00000050L; - - public ModeSelectCluster(long devicePtr, int endpointId) { - super(devicePtr, endpointId); - } - - @Override - public native long initWithDevice(long devicePtr, int endpointId); - - public void changeToMode(DefaultClusterCallback callback - , Integer newMode) { - changeToMode(chipClusterPtr, callback, newMode, null); - } - - public void changeToMode(DefaultClusterCallback callback - , Integer newMode - , int timedInvokeTimeoutMs) { - changeToMode(chipClusterPtr, callback, newMode, timedInvokeTimeoutMs); - } - private native void changeToMode(long chipClusterPtr, DefaultClusterCallback Callback - , Integer newMode - , @Nullable Integer timedInvokeTimeoutMs); - - public interface StandardNamespaceAttributeCallback { - void onSuccess(@Nullable Integer value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface SupportedModesAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface StartUpModeAttributeCallback { - void onSuccess(@Nullable Integer value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface OnModeAttributeCallback { - void onSuccess(@Nullable Integer value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface GeneratedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AcceptedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface EventListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AttributeListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - - public void readDescriptionAttribute( - CharStringAttributeCallback callback - ) { - readDescriptionAttribute(chipClusterPtr, callback); - } - public void subscribeDescriptionAttribute( - CharStringAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeDescriptionAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readStandardNamespaceAttribute( - StandardNamespaceAttributeCallback callback - ) { - readStandardNamespaceAttribute(chipClusterPtr, callback); - } - public void subscribeStandardNamespaceAttribute( - StandardNamespaceAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeStandardNamespaceAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readSupportedModesAttribute( - SupportedModesAttributeCallback callback - ) { - readSupportedModesAttribute(chipClusterPtr, callback); - } - public void subscribeSupportedModesAttribute( - SupportedModesAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeSupportedModesAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readCurrentModeAttribute( - IntegerAttributeCallback callback - ) { - readCurrentModeAttribute(chipClusterPtr, callback); - } - public void subscribeCurrentModeAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeCurrentModeAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readStartUpModeAttribute( - StartUpModeAttributeCallback callback - ) { - readStartUpModeAttribute(chipClusterPtr, callback); - } - public void writeStartUpModeAttribute(DefaultClusterCallback callback, Integer value) { - writeStartUpModeAttribute(chipClusterPtr, callback, value, null); - } - - public void writeStartUpModeAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeStartUpModeAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeStartUpModeAttribute( - StartUpModeAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeStartUpModeAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readOnModeAttribute( - OnModeAttributeCallback callback - ) { - readOnModeAttribute(chipClusterPtr, callback); - } - public void writeOnModeAttribute(DefaultClusterCallback callback, Integer value) { - writeOnModeAttribute(chipClusterPtr, callback, value, null); - } - - public void writeOnModeAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeOnModeAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeOnModeAttribute( - OnModeAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeOnModeAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - ) { - readGeneratedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - ) { - readAcceptedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readEventListAttribute( - EventListAttributeCallback callback - ) { - readEventListAttribute(chipClusterPtr, callback); - } - public void subscribeEventListAttribute( - EventListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAttributeListAttribute( - AttributeListAttributeCallback callback - ) { - readAttributeListAttribute(chipClusterPtr, callback); - } - public void subscribeAttributeListAttribute( - AttributeListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readFeatureMapAttribute( - LongAttributeCallback callback - ) { - readFeatureMapAttribute(chipClusterPtr, callback); - } - public void subscribeFeatureMapAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readClusterRevisionAttribute( - IntegerAttributeCallback callback - ) { - readClusterRevisionAttribute(chipClusterPtr, callback); - } - public void subscribeClusterRevisionAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - private native void readDescriptionAttribute(long chipClusterPtr, - CharStringAttributeCallback callback - ); - private native void subscribeDescriptionAttribute(long chipClusterPtr, - CharStringAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readStandardNamespaceAttribute(long chipClusterPtr, - StandardNamespaceAttributeCallback callback - ); - private native void subscribeStandardNamespaceAttribute(long chipClusterPtr, - StandardNamespaceAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readSupportedModesAttribute(long chipClusterPtr, - SupportedModesAttributeCallback callback - ); - private native void subscribeSupportedModesAttribute(long chipClusterPtr, - SupportedModesAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readCurrentModeAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeCurrentModeAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readStartUpModeAttribute(long chipClusterPtr, - StartUpModeAttributeCallback callback - ); - - private native void writeStartUpModeAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeStartUpModeAttribute(long chipClusterPtr, - StartUpModeAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readOnModeAttribute(long chipClusterPtr, - OnModeAttributeCallback callback - ); - - private native void writeOnModeAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeOnModeAttribute(long chipClusterPtr, - OnModeAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - ); - private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - ); - private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - ); - private native void subscribeEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - ); - private native void subscribeAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - } - - public static class LaundryWasherModeCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 0x00000051L; - - public LaundryWasherModeCluster(long devicePtr, int endpointId) { - super(devicePtr, endpointId); - } - - @Override - public native long initWithDevice(long devicePtr, int endpointId); - - public void changeToMode(ChangeToModeResponseCallback callback - , Integer newMode) { - changeToMode(chipClusterPtr, callback, newMode, null); - } - - public void changeToMode(ChangeToModeResponseCallback callback - , Integer newMode - , int timedInvokeTimeoutMs) { - changeToMode(chipClusterPtr, callback, newMode, timedInvokeTimeoutMs); - } - private native void changeToMode(long chipClusterPtr, ChangeToModeResponseCallback Callback - , Integer newMode - , @Nullable Integer timedInvokeTimeoutMs); - public interface ChangeToModeResponseCallback { - void onSuccess(Integer status, Optional statusText); - - void onError(Exception error); - } - - - public interface SupportedModesAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface StartUpModeAttributeCallback { - void onSuccess(@Nullable Integer value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface OnModeAttributeCallback { - void onSuccess(@Nullable Integer value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface GeneratedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AcceptedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface EventListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AttributeListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - - public void readSupportedModesAttribute( - SupportedModesAttributeCallback callback - ) { - readSupportedModesAttribute(chipClusterPtr, callback); - } - public void subscribeSupportedModesAttribute( - SupportedModesAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeSupportedModesAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readCurrentModeAttribute( - IntegerAttributeCallback callback - ) { - readCurrentModeAttribute(chipClusterPtr, callback); - } - public void subscribeCurrentModeAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeCurrentModeAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readStartUpModeAttribute( - StartUpModeAttributeCallback callback - ) { - readStartUpModeAttribute(chipClusterPtr, callback); - } - public void writeStartUpModeAttribute(DefaultClusterCallback callback, Integer value) { - writeStartUpModeAttribute(chipClusterPtr, callback, value, null); - } - - public void writeStartUpModeAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeStartUpModeAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeStartUpModeAttribute( - StartUpModeAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeStartUpModeAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readOnModeAttribute( - OnModeAttributeCallback callback - ) { - readOnModeAttribute(chipClusterPtr, callback); - } - public void writeOnModeAttribute(DefaultClusterCallback callback, Integer value) { - writeOnModeAttribute(chipClusterPtr, callback, value, null); - } - - public void writeOnModeAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeOnModeAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeOnModeAttribute( - OnModeAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeOnModeAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - ) { - readGeneratedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - ) { - readAcceptedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readEventListAttribute( - EventListAttributeCallback callback - ) { - readEventListAttribute(chipClusterPtr, callback); - } - public void subscribeEventListAttribute( - EventListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAttributeListAttribute( - AttributeListAttributeCallback callback - ) { - readAttributeListAttribute(chipClusterPtr, callback); - } - public void subscribeAttributeListAttribute( - AttributeListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readFeatureMapAttribute( - LongAttributeCallback callback - ) { - readFeatureMapAttribute(chipClusterPtr, callback); - } - public void subscribeFeatureMapAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readClusterRevisionAttribute( - IntegerAttributeCallback callback - ) { - readClusterRevisionAttribute(chipClusterPtr, callback); - } - public void subscribeClusterRevisionAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - private native void readSupportedModesAttribute(long chipClusterPtr, - SupportedModesAttributeCallback callback - ); - private native void subscribeSupportedModesAttribute(long chipClusterPtr, - SupportedModesAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readCurrentModeAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeCurrentModeAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readStartUpModeAttribute(long chipClusterPtr, - StartUpModeAttributeCallback callback - ); - - private native void writeStartUpModeAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeStartUpModeAttribute(long chipClusterPtr, - StartUpModeAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readOnModeAttribute(long chipClusterPtr, - OnModeAttributeCallback callback - ); - - private native void writeOnModeAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeOnModeAttribute(long chipClusterPtr, - OnModeAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - ); - private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - ); - private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - ); - private native void subscribeEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - ); - private native void subscribeAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - } - - public static class RefrigeratorAndTemperatureControlledCabinetModeCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 0x00000052L; - - public RefrigeratorAndTemperatureControlledCabinetModeCluster(long devicePtr, int endpointId) { - super(devicePtr, endpointId); - } - - @Override - public native long initWithDevice(long devicePtr, int endpointId); - - public void changeToMode(ChangeToModeResponseCallback callback - , Integer newMode) { - changeToMode(chipClusterPtr, callback, newMode, null); - } - - public void changeToMode(ChangeToModeResponseCallback callback - , Integer newMode - , int timedInvokeTimeoutMs) { - changeToMode(chipClusterPtr, callback, newMode, timedInvokeTimeoutMs); - } - private native void changeToMode(long chipClusterPtr, ChangeToModeResponseCallback Callback - , Integer newMode - , @Nullable Integer timedInvokeTimeoutMs); - public interface ChangeToModeResponseCallback { - void onSuccess(Integer status, Optional statusText); - - void onError(Exception error); - } - - - public interface SupportedModesAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface StartUpModeAttributeCallback { - void onSuccess(@Nullable Integer value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface OnModeAttributeCallback { - void onSuccess(@Nullable Integer value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface GeneratedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AcceptedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface EventListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AttributeListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - - public void readSupportedModesAttribute( - SupportedModesAttributeCallback callback - ) { - readSupportedModesAttribute(chipClusterPtr, callback); - } - public void subscribeSupportedModesAttribute( - SupportedModesAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeSupportedModesAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readCurrentModeAttribute( - IntegerAttributeCallback callback - ) { - readCurrentModeAttribute(chipClusterPtr, callback); - } - public void subscribeCurrentModeAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeCurrentModeAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readStartUpModeAttribute( - StartUpModeAttributeCallback callback - ) { - readStartUpModeAttribute(chipClusterPtr, callback); - } - public void writeStartUpModeAttribute(DefaultClusterCallback callback, Integer value) { - writeStartUpModeAttribute(chipClusterPtr, callback, value, null); - } - - public void writeStartUpModeAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeStartUpModeAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeStartUpModeAttribute( - StartUpModeAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeStartUpModeAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readOnModeAttribute( - OnModeAttributeCallback callback - ) { - readOnModeAttribute(chipClusterPtr, callback); - } - public void writeOnModeAttribute(DefaultClusterCallback callback, Integer value) { - writeOnModeAttribute(chipClusterPtr, callback, value, null); - } - - public void writeOnModeAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeOnModeAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeOnModeAttribute( - OnModeAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeOnModeAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - ) { - readGeneratedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - ) { - readAcceptedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readEventListAttribute( - EventListAttributeCallback callback - ) { - readEventListAttribute(chipClusterPtr, callback); - } - public void subscribeEventListAttribute( - EventListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAttributeListAttribute( - AttributeListAttributeCallback callback - ) { - readAttributeListAttribute(chipClusterPtr, callback); - } - public void subscribeAttributeListAttribute( - AttributeListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readFeatureMapAttribute( - LongAttributeCallback callback - ) { - readFeatureMapAttribute(chipClusterPtr, callback); - } - public void subscribeFeatureMapAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readClusterRevisionAttribute( - IntegerAttributeCallback callback - ) { - readClusterRevisionAttribute(chipClusterPtr, callback); - } - public void subscribeClusterRevisionAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - private native void readSupportedModesAttribute(long chipClusterPtr, - SupportedModesAttributeCallback callback - ); - private native void subscribeSupportedModesAttribute(long chipClusterPtr, - SupportedModesAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readCurrentModeAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeCurrentModeAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readStartUpModeAttribute(long chipClusterPtr, - StartUpModeAttributeCallback callback - ); - - private native void writeStartUpModeAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeStartUpModeAttribute(long chipClusterPtr, - StartUpModeAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readOnModeAttribute(long chipClusterPtr, - OnModeAttributeCallback callback - ); - - private native void writeOnModeAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeOnModeAttribute(long chipClusterPtr, - OnModeAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - ); - private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - ); - private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - ); - private native void subscribeEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - ); - private native void subscribeAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - } - - public static class LaundryWasherControlsCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 0x00000053L; - - public LaundryWasherControlsCluster(long devicePtr, int endpointId) { - super(devicePtr, endpointId); - } - - @Override - public native long initWithDevice(long devicePtr, int endpointId); - - public interface SpinSpeedsAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface SpinSpeedCurrentAttributeCallback { - void onSuccess(@Nullable Integer value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface SupportedRinsesAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface GeneratedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AcceptedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface EventListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AttributeListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - - public void readSpinSpeedsAttribute( - SpinSpeedsAttributeCallback callback - ) { - readSpinSpeedsAttribute(chipClusterPtr, callback); - } - public void subscribeSpinSpeedsAttribute( - SpinSpeedsAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeSpinSpeedsAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readSpinSpeedCurrentAttribute( - SpinSpeedCurrentAttributeCallback callback - ) { - readSpinSpeedCurrentAttribute(chipClusterPtr, callback); - } - public void writeSpinSpeedCurrentAttribute(DefaultClusterCallback callback, Integer value) { - writeSpinSpeedCurrentAttribute(chipClusterPtr, callback, value, null); - } - - public void writeSpinSpeedCurrentAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeSpinSpeedCurrentAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeSpinSpeedCurrentAttribute( - SpinSpeedCurrentAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeSpinSpeedCurrentAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readNumberOfRinsesAttribute( - IntegerAttributeCallback callback - ) { - readNumberOfRinsesAttribute(chipClusterPtr, callback); - } - public void writeNumberOfRinsesAttribute(DefaultClusterCallback callback, Integer value) { - writeNumberOfRinsesAttribute(chipClusterPtr, callback, value, null); - } - - public void writeNumberOfRinsesAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeNumberOfRinsesAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeNumberOfRinsesAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeNumberOfRinsesAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readSupportedRinsesAttribute( - SupportedRinsesAttributeCallback callback - ) { - readSupportedRinsesAttribute(chipClusterPtr, callback); - } - public void subscribeSupportedRinsesAttribute( - SupportedRinsesAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeSupportedRinsesAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - ) { - readGeneratedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - ) { - readAcceptedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readEventListAttribute( - EventListAttributeCallback callback - ) { - readEventListAttribute(chipClusterPtr, callback); - } - public void subscribeEventListAttribute( - EventListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAttributeListAttribute( - AttributeListAttributeCallback callback - ) { - readAttributeListAttribute(chipClusterPtr, callback); - } - public void subscribeAttributeListAttribute( - AttributeListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readFeatureMapAttribute( - LongAttributeCallback callback - ) { - readFeatureMapAttribute(chipClusterPtr, callback); - } - public void subscribeFeatureMapAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readClusterRevisionAttribute( - IntegerAttributeCallback callback - ) { - readClusterRevisionAttribute(chipClusterPtr, callback); - } - public void subscribeClusterRevisionAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - private native void readSpinSpeedsAttribute(long chipClusterPtr, - SpinSpeedsAttributeCallback callback - ); - private native void subscribeSpinSpeedsAttribute(long chipClusterPtr, - SpinSpeedsAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readSpinSpeedCurrentAttribute(long chipClusterPtr, - SpinSpeedCurrentAttributeCallback callback - ); - - private native void writeSpinSpeedCurrentAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeSpinSpeedCurrentAttribute(long chipClusterPtr, - SpinSpeedCurrentAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readNumberOfRinsesAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - - private native void writeNumberOfRinsesAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeNumberOfRinsesAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readSupportedRinsesAttribute(long chipClusterPtr, - SupportedRinsesAttributeCallback callback - ); - private native void subscribeSupportedRinsesAttribute(long chipClusterPtr, - SupportedRinsesAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - ); - private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - ); - private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - ); - private native void subscribeEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - ); - private native void subscribeAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - } - - public static class RvcRunModeCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 0x00000054L; - - public RvcRunModeCluster(long devicePtr, int endpointId) { - super(devicePtr, endpointId); - } - - @Override - public native long initWithDevice(long devicePtr, int endpointId); - - public void changeToMode(ChangeToModeResponseCallback callback - , Integer newMode) { - changeToMode(chipClusterPtr, callback, newMode, null); - } - - public void changeToMode(ChangeToModeResponseCallback callback - , Integer newMode - , int timedInvokeTimeoutMs) { - changeToMode(chipClusterPtr, callback, newMode, timedInvokeTimeoutMs); - } - private native void changeToMode(long chipClusterPtr, ChangeToModeResponseCallback Callback - , Integer newMode - , @Nullable Integer timedInvokeTimeoutMs); - public interface ChangeToModeResponseCallback { - void onSuccess(Integer status, Optional statusText); - - void onError(Exception error); - } - - - public interface SupportedModesAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface StartUpModeAttributeCallback { - void onSuccess(@Nullable Integer value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface OnModeAttributeCallback { - void onSuccess(@Nullable Integer value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface GeneratedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AcceptedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface EventListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AttributeListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - - public void readSupportedModesAttribute( - SupportedModesAttributeCallback callback - ) { - readSupportedModesAttribute(chipClusterPtr, callback); - } - public void subscribeSupportedModesAttribute( - SupportedModesAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeSupportedModesAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readCurrentModeAttribute( - IntegerAttributeCallback callback - ) { - readCurrentModeAttribute(chipClusterPtr, callback); - } - public void subscribeCurrentModeAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeCurrentModeAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readStartUpModeAttribute( - StartUpModeAttributeCallback callback - ) { - readStartUpModeAttribute(chipClusterPtr, callback); - } - public void writeStartUpModeAttribute(DefaultClusterCallback callback, Integer value) { - writeStartUpModeAttribute(chipClusterPtr, callback, value, null); - } - - public void writeStartUpModeAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeStartUpModeAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeStartUpModeAttribute( - StartUpModeAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeStartUpModeAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readOnModeAttribute( - OnModeAttributeCallback callback - ) { - readOnModeAttribute(chipClusterPtr, callback); - } - public void writeOnModeAttribute(DefaultClusterCallback callback, Integer value) { - writeOnModeAttribute(chipClusterPtr, callback, value, null); - } - - public void writeOnModeAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeOnModeAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeOnModeAttribute( - OnModeAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeOnModeAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - ) { - readGeneratedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - ) { - readAcceptedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readEventListAttribute( - EventListAttributeCallback callback - ) { - readEventListAttribute(chipClusterPtr, callback); - } - public void subscribeEventListAttribute( - EventListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAttributeListAttribute( - AttributeListAttributeCallback callback - ) { - readAttributeListAttribute(chipClusterPtr, callback); - } - public void subscribeAttributeListAttribute( - AttributeListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readFeatureMapAttribute( - LongAttributeCallback callback - ) { - readFeatureMapAttribute(chipClusterPtr, callback); - } - public void subscribeFeatureMapAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readClusterRevisionAttribute( - IntegerAttributeCallback callback - ) { - readClusterRevisionAttribute(chipClusterPtr, callback); - } - public void subscribeClusterRevisionAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - private native void readSupportedModesAttribute(long chipClusterPtr, - SupportedModesAttributeCallback callback - ); - private native void subscribeSupportedModesAttribute(long chipClusterPtr, - SupportedModesAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readCurrentModeAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeCurrentModeAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readStartUpModeAttribute(long chipClusterPtr, - StartUpModeAttributeCallback callback - ); - - private native void writeStartUpModeAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeStartUpModeAttribute(long chipClusterPtr, - StartUpModeAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readOnModeAttribute(long chipClusterPtr, - OnModeAttributeCallback callback - ); - - private native void writeOnModeAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeOnModeAttribute(long chipClusterPtr, - OnModeAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - ); - private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - ); - private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - ); - private native void subscribeEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - ); - private native void subscribeAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - } - - public static class RvcCleanModeCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 0x00000055L; - - public RvcCleanModeCluster(long devicePtr, int endpointId) { - super(devicePtr, endpointId); - } - - @Override - public native long initWithDevice(long devicePtr, int endpointId); - - public void changeToMode(ChangeToModeResponseCallback callback - , Integer newMode) { - changeToMode(chipClusterPtr, callback, newMode, null); - } - - public void changeToMode(ChangeToModeResponseCallback callback - , Integer newMode - , int timedInvokeTimeoutMs) { - changeToMode(chipClusterPtr, callback, newMode, timedInvokeTimeoutMs); - } - private native void changeToMode(long chipClusterPtr, ChangeToModeResponseCallback Callback - , Integer newMode - , @Nullable Integer timedInvokeTimeoutMs); - public interface ChangeToModeResponseCallback { - void onSuccess(Integer status, Optional statusText); - - void onError(Exception error); - } - - - public interface SupportedModesAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface StartUpModeAttributeCallback { - void onSuccess(@Nullable Integer value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface OnModeAttributeCallback { - void onSuccess(@Nullable Integer value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface GeneratedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AcceptedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface EventListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AttributeListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - - public void readSupportedModesAttribute( - SupportedModesAttributeCallback callback - ) { - readSupportedModesAttribute(chipClusterPtr, callback); - } - public void subscribeSupportedModesAttribute( - SupportedModesAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeSupportedModesAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readCurrentModeAttribute( - IntegerAttributeCallback callback - ) { - readCurrentModeAttribute(chipClusterPtr, callback); - } - public void subscribeCurrentModeAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeCurrentModeAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readStartUpModeAttribute( - StartUpModeAttributeCallback callback - ) { - readStartUpModeAttribute(chipClusterPtr, callback); - } - public void writeStartUpModeAttribute(DefaultClusterCallback callback, Integer value) { - writeStartUpModeAttribute(chipClusterPtr, callback, value, null); - } - - public void writeStartUpModeAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeStartUpModeAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeStartUpModeAttribute( - StartUpModeAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeStartUpModeAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readOnModeAttribute( - OnModeAttributeCallback callback - ) { - readOnModeAttribute(chipClusterPtr, callback); - } - public void writeOnModeAttribute(DefaultClusterCallback callback, Integer value) { - writeOnModeAttribute(chipClusterPtr, callback, value, null); - } - - public void writeOnModeAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeOnModeAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeOnModeAttribute( - OnModeAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeOnModeAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - ) { - readGeneratedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - ) { - readAcceptedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readEventListAttribute( - EventListAttributeCallback callback - ) { - readEventListAttribute(chipClusterPtr, callback); - } - public void subscribeEventListAttribute( - EventListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAttributeListAttribute( - AttributeListAttributeCallback callback - ) { - readAttributeListAttribute(chipClusterPtr, callback); - } - public void subscribeAttributeListAttribute( - AttributeListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readFeatureMapAttribute( - LongAttributeCallback callback - ) { - readFeatureMapAttribute(chipClusterPtr, callback); - } - public void subscribeFeatureMapAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readClusterRevisionAttribute( - IntegerAttributeCallback callback - ) { - readClusterRevisionAttribute(chipClusterPtr, callback); - } - public void subscribeClusterRevisionAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - private native void readSupportedModesAttribute(long chipClusterPtr, - SupportedModesAttributeCallback callback - ); - private native void subscribeSupportedModesAttribute(long chipClusterPtr, - SupportedModesAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readCurrentModeAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeCurrentModeAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readStartUpModeAttribute(long chipClusterPtr, - StartUpModeAttributeCallback callback - ); - - private native void writeStartUpModeAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeStartUpModeAttribute(long chipClusterPtr, - StartUpModeAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readOnModeAttribute(long chipClusterPtr, - OnModeAttributeCallback callback - ); - - private native void writeOnModeAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeOnModeAttribute(long chipClusterPtr, - OnModeAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - ); - private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - ); - private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - ); - private native void subscribeEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - ); - private native void subscribeAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - } - - public static class TemperatureControlCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 0x00000056L; - - public TemperatureControlCluster(long devicePtr, int endpointId) { - super(devicePtr, endpointId); - } - - @Override - public native long initWithDevice(long devicePtr, int endpointId); - - public void setTemperature(DefaultClusterCallback callback - , Optional targetTemperature, Optional targetTemperatureLevel) { - setTemperature(chipClusterPtr, callback, targetTemperature, targetTemperatureLevel, null); - } - - public void setTemperature(DefaultClusterCallback callback - , Optional targetTemperature, Optional targetTemperatureLevel - , int timedInvokeTimeoutMs) { - setTemperature(chipClusterPtr, callback, targetTemperature, targetTemperatureLevel, timedInvokeTimeoutMs); - } - private native void setTemperature(long chipClusterPtr, DefaultClusterCallback Callback - , Optional targetTemperature, Optional targetTemperatureLevel - , @Nullable Integer timedInvokeTimeoutMs); - - public interface SupportedTemperatureLevelsAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface GeneratedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AcceptedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface EventListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AttributeListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - - public void readTemperatureSetpointAttribute( - IntegerAttributeCallback callback - ) { - readTemperatureSetpointAttribute(chipClusterPtr, callback); - } - public void subscribeTemperatureSetpointAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeTemperatureSetpointAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readMinTemperatureAttribute( - IntegerAttributeCallback callback - ) { - readMinTemperatureAttribute(chipClusterPtr, callback); - } - public void subscribeMinTemperatureAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeMinTemperatureAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readMaxTemperatureAttribute( - IntegerAttributeCallback callback - ) { - readMaxTemperatureAttribute(chipClusterPtr, callback); - } - public void subscribeMaxTemperatureAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeMaxTemperatureAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readStepAttribute( - IntegerAttributeCallback callback - ) { - readStepAttribute(chipClusterPtr, callback); - } - public void subscribeStepAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeStepAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readSelectedTemperatureLevelAttribute( - IntegerAttributeCallback callback - ) { - readSelectedTemperatureLevelAttribute(chipClusterPtr, callback); - } - public void subscribeSelectedTemperatureLevelAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeSelectedTemperatureLevelAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readSupportedTemperatureLevelsAttribute( - SupportedTemperatureLevelsAttributeCallback callback - ) { - readSupportedTemperatureLevelsAttribute(chipClusterPtr, callback); - } - public void subscribeSupportedTemperatureLevelsAttribute( - SupportedTemperatureLevelsAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeSupportedTemperatureLevelsAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - ) { - readGeneratedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - ) { - readAcceptedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readEventListAttribute( - EventListAttributeCallback callback - ) { - readEventListAttribute(chipClusterPtr, callback); - } - public void subscribeEventListAttribute( - EventListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAttributeListAttribute( - AttributeListAttributeCallback callback - ) { - readAttributeListAttribute(chipClusterPtr, callback); - } - public void subscribeAttributeListAttribute( - AttributeListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readFeatureMapAttribute( - LongAttributeCallback callback - ) { - readFeatureMapAttribute(chipClusterPtr, callback); - } - public void subscribeFeatureMapAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readClusterRevisionAttribute( - IntegerAttributeCallback callback - ) { - readClusterRevisionAttribute(chipClusterPtr, callback); - } - public void subscribeClusterRevisionAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - private native void readTemperatureSetpointAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeTemperatureSetpointAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readMinTemperatureAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeMinTemperatureAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readMaxTemperatureAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeMaxTemperatureAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readStepAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeStepAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readSelectedTemperatureLevelAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeSelectedTemperatureLevelAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readSupportedTemperatureLevelsAttribute(long chipClusterPtr, - SupportedTemperatureLevelsAttributeCallback callback - ); - private native void subscribeSupportedTemperatureLevelsAttribute(long chipClusterPtr, - SupportedTemperatureLevelsAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - ); - private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - ); - private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - ); - private native void subscribeEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - ); - private native void subscribeAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - } - - public static class RefrigeratorAlarmCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 0x00000057L; - - public RefrigeratorAlarmCluster(long devicePtr, int endpointId) { - super(devicePtr, endpointId); - } - - @Override - public native long initWithDevice(long devicePtr, int endpointId); - - public interface GeneratedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AcceptedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface EventListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AttributeListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - - public void readMaskAttribute( - LongAttributeCallback callback - ) { - readMaskAttribute(chipClusterPtr, callback); - } - public void subscribeMaskAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeMaskAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readStateAttribute( - LongAttributeCallback callback - ) { - readStateAttribute(chipClusterPtr, callback); - } - public void subscribeStateAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeStateAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readSupportedAttribute( - LongAttributeCallback callback - ) { - readSupportedAttribute(chipClusterPtr, callback); - } - public void subscribeSupportedAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeSupportedAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - ) { - readGeneratedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - ) { - readAcceptedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readEventListAttribute( - EventListAttributeCallback callback - ) { - readEventListAttribute(chipClusterPtr, callback); - } - public void subscribeEventListAttribute( - EventListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAttributeListAttribute( - AttributeListAttributeCallback callback - ) { - readAttributeListAttribute(chipClusterPtr, callback); - } - public void subscribeAttributeListAttribute( - AttributeListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readFeatureMapAttribute( - LongAttributeCallback callback - ) { - readFeatureMapAttribute(chipClusterPtr, callback); - } - public void subscribeFeatureMapAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readClusterRevisionAttribute( - IntegerAttributeCallback callback - ) { - readClusterRevisionAttribute(chipClusterPtr, callback); - } - public void subscribeClusterRevisionAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - private native void readMaskAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeMaskAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readStateAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeStateAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readSupportedAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeSupportedAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - ); - private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - ); - private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - ); - private native void subscribeEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - ); - private native void subscribeAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - } - - public static class DishwasherModeCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 0x00000059L; - - public DishwasherModeCluster(long devicePtr, int endpointId) { - super(devicePtr, endpointId); - } - - @Override - public native long initWithDevice(long devicePtr, int endpointId); - - public void changeToMode(ChangeToModeResponseCallback callback - , Integer newMode) { - changeToMode(chipClusterPtr, callback, newMode, null); - } - - public void changeToMode(ChangeToModeResponseCallback callback - , Integer newMode - , int timedInvokeTimeoutMs) { - changeToMode(chipClusterPtr, callback, newMode, timedInvokeTimeoutMs); - } - private native void changeToMode(long chipClusterPtr, ChangeToModeResponseCallback Callback - , Integer newMode - , @Nullable Integer timedInvokeTimeoutMs); - public interface ChangeToModeResponseCallback { - void onSuccess(Integer status, Optional statusText); - - void onError(Exception error); - } - - - public interface SupportedModesAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface StartUpModeAttributeCallback { - void onSuccess(@Nullable Integer value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface OnModeAttributeCallback { - void onSuccess(@Nullable Integer value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface GeneratedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AcceptedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface EventListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AttributeListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - - public void readSupportedModesAttribute( - SupportedModesAttributeCallback callback - ) { - readSupportedModesAttribute(chipClusterPtr, callback); - } - public void subscribeSupportedModesAttribute( - SupportedModesAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeSupportedModesAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readCurrentModeAttribute( - IntegerAttributeCallback callback - ) { - readCurrentModeAttribute(chipClusterPtr, callback); - } - public void subscribeCurrentModeAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeCurrentModeAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readStartUpModeAttribute( - StartUpModeAttributeCallback callback - ) { - readStartUpModeAttribute(chipClusterPtr, callback); - } - public void writeStartUpModeAttribute(DefaultClusterCallback callback, Integer value) { - writeStartUpModeAttribute(chipClusterPtr, callback, value, null); - } - - public void writeStartUpModeAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeStartUpModeAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeStartUpModeAttribute( - StartUpModeAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeStartUpModeAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readOnModeAttribute( - OnModeAttributeCallback callback - ) { - readOnModeAttribute(chipClusterPtr, callback); - } - public void writeOnModeAttribute(DefaultClusterCallback callback, Integer value) { - writeOnModeAttribute(chipClusterPtr, callback, value, null); - } - - public void writeOnModeAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeOnModeAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeOnModeAttribute( - OnModeAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeOnModeAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - ) { - readGeneratedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - ) { - readAcceptedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readEventListAttribute( - EventListAttributeCallback callback - ) { - readEventListAttribute(chipClusterPtr, callback); - } - public void subscribeEventListAttribute( - EventListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAttributeListAttribute( - AttributeListAttributeCallback callback - ) { - readAttributeListAttribute(chipClusterPtr, callback); - } - public void subscribeAttributeListAttribute( - AttributeListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readFeatureMapAttribute( - LongAttributeCallback callback - ) { - readFeatureMapAttribute(chipClusterPtr, callback); - } - public void subscribeFeatureMapAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readClusterRevisionAttribute( - IntegerAttributeCallback callback - ) { - readClusterRevisionAttribute(chipClusterPtr, callback); - } - public void subscribeClusterRevisionAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - private native void readSupportedModesAttribute(long chipClusterPtr, - SupportedModesAttributeCallback callback - ); - private native void subscribeSupportedModesAttribute(long chipClusterPtr, - SupportedModesAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readCurrentModeAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeCurrentModeAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readStartUpModeAttribute(long chipClusterPtr, - StartUpModeAttributeCallback callback - ); - - private native void writeStartUpModeAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeStartUpModeAttribute(long chipClusterPtr, - StartUpModeAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readOnModeAttribute(long chipClusterPtr, - OnModeAttributeCallback callback - ); - - private native void writeOnModeAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeOnModeAttribute(long chipClusterPtr, - OnModeAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - ); - private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - ); - private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - ); - private native void subscribeEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - ); - private native void subscribeAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - } - - public static class AirQualityCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 0x0000005BL; - - public AirQualityCluster(long devicePtr, int endpointId) { - super(devicePtr, endpointId); - } - - @Override - public native long initWithDevice(long devicePtr, int endpointId); - - public interface GeneratedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AcceptedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface EventListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AttributeListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - - public void readAirQualityAttribute( - IntegerAttributeCallback callback - ) { - readAirQualityAttribute(chipClusterPtr, callback); - } - public void subscribeAirQualityAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeAirQualityAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - ) { - readGeneratedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - ) { - readAcceptedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readEventListAttribute( - EventListAttributeCallback callback - ) { - readEventListAttribute(chipClusterPtr, callback); - } - public void subscribeEventListAttribute( - EventListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAttributeListAttribute( - AttributeListAttributeCallback callback - ) { - readAttributeListAttribute(chipClusterPtr, callback); - } - public void subscribeAttributeListAttribute( - AttributeListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readFeatureMapAttribute( - LongAttributeCallback callback - ) { - readFeatureMapAttribute(chipClusterPtr, callback); - } - public void subscribeFeatureMapAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readClusterRevisionAttribute( - IntegerAttributeCallback callback - ) { - readClusterRevisionAttribute(chipClusterPtr, callback); - } - public void subscribeClusterRevisionAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - private native void readAirQualityAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeAirQualityAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - ); - private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - ); - private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - ); - private native void subscribeEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - ); - private native void subscribeAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - } - - public static class SmokeCoAlarmCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 0x0000005CL; - - public SmokeCoAlarmCluster(long devicePtr, int endpointId) { - super(devicePtr, endpointId); - } - - @Override - public native long initWithDevice(long devicePtr, int endpointId); - - public void selfTestRequest(DefaultClusterCallback callback - ) { - selfTestRequest(chipClusterPtr, callback, null); - } - - public void selfTestRequest(DefaultClusterCallback callback - - , int timedInvokeTimeoutMs) { - selfTestRequest(chipClusterPtr, callback, timedInvokeTimeoutMs); - } - private native void selfTestRequest(long chipClusterPtr, DefaultClusterCallback Callback - - , @Nullable Integer timedInvokeTimeoutMs); - - public interface GeneratedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AcceptedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface EventListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AttributeListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - - public void readExpressedStateAttribute( - IntegerAttributeCallback callback - ) { - readExpressedStateAttribute(chipClusterPtr, callback); - } - public void subscribeExpressedStateAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeExpressedStateAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readSmokeStateAttribute( - IntegerAttributeCallback callback - ) { - readSmokeStateAttribute(chipClusterPtr, callback); - } - public void subscribeSmokeStateAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeSmokeStateAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readCOStateAttribute( - IntegerAttributeCallback callback - ) { - readCOStateAttribute(chipClusterPtr, callback); - } - public void subscribeCOStateAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeCOStateAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readBatteryAlertAttribute( - IntegerAttributeCallback callback - ) { - readBatteryAlertAttribute(chipClusterPtr, callback); - } - public void subscribeBatteryAlertAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeBatteryAlertAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readDeviceMutedAttribute( - IntegerAttributeCallback callback - ) { - readDeviceMutedAttribute(chipClusterPtr, callback); - } - public void subscribeDeviceMutedAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeDeviceMutedAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readTestInProgressAttribute( - BooleanAttributeCallback callback - ) { - readTestInProgressAttribute(chipClusterPtr, callback); - } - public void subscribeTestInProgressAttribute( - BooleanAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeTestInProgressAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readHardwareFaultAlertAttribute( - BooleanAttributeCallback callback - ) { - readHardwareFaultAlertAttribute(chipClusterPtr, callback); - } - public void subscribeHardwareFaultAlertAttribute( - BooleanAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeHardwareFaultAlertAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readEndOfServiceAlertAttribute( - IntegerAttributeCallback callback - ) { - readEndOfServiceAlertAttribute(chipClusterPtr, callback); - } - public void subscribeEndOfServiceAlertAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeEndOfServiceAlertAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readInterconnectSmokeAlarmAttribute( - IntegerAttributeCallback callback - ) { - readInterconnectSmokeAlarmAttribute(chipClusterPtr, callback); - } - public void subscribeInterconnectSmokeAlarmAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeInterconnectSmokeAlarmAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readInterconnectCOAlarmAttribute( - IntegerAttributeCallback callback - ) { - readInterconnectCOAlarmAttribute(chipClusterPtr, callback); - } - public void subscribeInterconnectCOAlarmAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeInterconnectCOAlarmAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readContaminationStateAttribute( - IntegerAttributeCallback callback - ) { - readContaminationStateAttribute(chipClusterPtr, callback); - } - public void subscribeContaminationStateAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeContaminationStateAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readSmokeSensitivityLevelAttribute( - IntegerAttributeCallback callback - ) { - readSmokeSensitivityLevelAttribute(chipClusterPtr, callback); - } - public void writeSmokeSensitivityLevelAttribute(DefaultClusterCallback callback, Integer value) { - writeSmokeSensitivityLevelAttribute(chipClusterPtr, callback, value, null); - } - - public void writeSmokeSensitivityLevelAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeSmokeSensitivityLevelAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeSmokeSensitivityLevelAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeSmokeSensitivityLevelAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readExpiryDateAttribute( - LongAttributeCallback callback - ) { - readExpiryDateAttribute(chipClusterPtr, callback); - } - public void subscribeExpiryDateAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeExpiryDateAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - ) { - readGeneratedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - ) { - readAcceptedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readEventListAttribute( - EventListAttributeCallback callback - ) { - readEventListAttribute(chipClusterPtr, callback); - } - public void subscribeEventListAttribute( - EventListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAttributeListAttribute( - AttributeListAttributeCallback callback - ) { - readAttributeListAttribute(chipClusterPtr, callback); - } - public void subscribeAttributeListAttribute( - AttributeListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readFeatureMapAttribute( - LongAttributeCallback callback - ) { - readFeatureMapAttribute(chipClusterPtr, callback); - } - public void subscribeFeatureMapAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readClusterRevisionAttribute( - IntegerAttributeCallback callback - ) { - readClusterRevisionAttribute(chipClusterPtr, callback); - } - public void subscribeClusterRevisionAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - private native void readExpressedStateAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeExpressedStateAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readSmokeStateAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeSmokeStateAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readCOStateAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeCOStateAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readBatteryAlertAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeBatteryAlertAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readDeviceMutedAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeDeviceMutedAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readTestInProgressAttribute(long chipClusterPtr, - BooleanAttributeCallback callback - ); - private native void subscribeTestInProgressAttribute(long chipClusterPtr, - BooleanAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readHardwareFaultAlertAttribute(long chipClusterPtr, - BooleanAttributeCallback callback - ); - private native void subscribeHardwareFaultAlertAttribute(long chipClusterPtr, - BooleanAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readEndOfServiceAlertAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeEndOfServiceAlertAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readInterconnectSmokeAlarmAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeInterconnectSmokeAlarmAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readInterconnectCOAlarmAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeInterconnectCOAlarmAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readContaminationStateAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeContaminationStateAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readSmokeSensitivityLevelAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - - private native void writeSmokeSensitivityLevelAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeSmokeSensitivityLevelAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readExpiryDateAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeExpiryDateAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - ); - private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - ); - private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - ); - private native void subscribeEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - ); - private native void subscribeAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - } - - public static class DishwasherAlarmCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 0x0000005DL; - - public DishwasherAlarmCluster(long devicePtr, int endpointId) { - super(devicePtr, endpointId); - } - - @Override - public native long initWithDevice(long devicePtr, int endpointId); - - public void reset(DefaultClusterCallback callback - , Long alarms) { - reset(chipClusterPtr, callback, alarms, null); - } - - public void reset(DefaultClusterCallback callback - , Long alarms - , int timedInvokeTimeoutMs) { - reset(chipClusterPtr, callback, alarms, timedInvokeTimeoutMs); - } - - public void modifyEnabledAlarms(DefaultClusterCallback callback - , Long mask) { - modifyEnabledAlarms(chipClusterPtr, callback, mask, null); - } - - public void modifyEnabledAlarms(DefaultClusterCallback callback - , Long mask - , int timedInvokeTimeoutMs) { - modifyEnabledAlarms(chipClusterPtr, callback, mask, timedInvokeTimeoutMs); - } - private native void reset(long chipClusterPtr, DefaultClusterCallback Callback - , Long alarms - , @Nullable Integer timedInvokeTimeoutMs); - private native void modifyEnabledAlarms(long chipClusterPtr, DefaultClusterCallback Callback - , Long mask - , @Nullable Integer timedInvokeTimeoutMs); - - public interface GeneratedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AcceptedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface EventListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AttributeListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - - public void readMaskAttribute( - LongAttributeCallback callback - ) { - readMaskAttribute(chipClusterPtr, callback); - } - public void subscribeMaskAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeMaskAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readLatchAttribute( - LongAttributeCallback callback - ) { - readLatchAttribute(chipClusterPtr, callback); - } - public void subscribeLatchAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeLatchAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readStateAttribute( - LongAttributeCallback callback - ) { - readStateAttribute(chipClusterPtr, callback); - } - public void subscribeStateAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeStateAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readSupportedAttribute( - LongAttributeCallback callback - ) { - readSupportedAttribute(chipClusterPtr, callback); - } - public void subscribeSupportedAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeSupportedAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - ) { - readGeneratedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - ) { - readAcceptedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readEventListAttribute( - EventListAttributeCallback callback - ) { - readEventListAttribute(chipClusterPtr, callback); - } - public void subscribeEventListAttribute( - EventListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAttributeListAttribute( - AttributeListAttributeCallback callback - ) { - readAttributeListAttribute(chipClusterPtr, callback); - } - public void subscribeAttributeListAttribute( - AttributeListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readFeatureMapAttribute( - LongAttributeCallback callback - ) { - readFeatureMapAttribute(chipClusterPtr, callback); - } - public void subscribeFeatureMapAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readClusterRevisionAttribute( - IntegerAttributeCallback callback - ) { - readClusterRevisionAttribute(chipClusterPtr, callback); - } - public void subscribeClusterRevisionAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - private native void readMaskAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeMaskAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readLatchAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeLatchAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readStateAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeStateAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readSupportedAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeSupportedAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - ); - private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - ); - private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - ); - private native void subscribeEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - ); - private native void subscribeAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - } - - public static class OperationalStateCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 0x00000060L; - - public OperationalStateCluster(long devicePtr, int endpointId) { - super(devicePtr, endpointId); - } - - @Override - public native long initWithDevice(long devicePtr, int endpointId); - - public void pause(OperationalCommandResponseCallback callback - ) { - pause(chipClusterPtr, callback, null); - } - - public void pause(OperationalCommandResponseCallback callback - - , int timedInvokeTimeoutMs) { - pause(chipClusterPtr, callback, timedInvokeTimeoutMs); - } - - public void stop(OperationalCommandResponseCallback callback - ) { - stop(chipClusterPtr, callback, null); - } - - public void stop(OperationalCommandResponseCallback callback - - , int timedInvokeTimeoutMs) { - stop(chipClusterPtr, callback, timedInvokeTimeoutMs); - } - - public void start(OperationalCommandResponseCallback callback - ) { - start(chipClusterPtr, callback, null); - } - - public void start(OperationalCommandResponseCallback callback - - , int timedInvokeTimeoutMs) { - start(chipClusterPtr, callback, timedInvokeTimeoutMs); - } - - public void resume(OperationalCommandResponseCallback callback - ) { - resume(chipClusterPtr, callback, null); - } - - public void resume(OperationalCommandResponseCallback callback - - , int timedInvokeTimeoutMs) { - resume(chipClusterPtr, callback, timedInvokeTimeoutMs); - } - private native void pause(long chipClusterPtr, OperationalCommandResponseCallback Callback - - , @Nullable Integer timedInvokeTimeoutMs); - private native void stop(long chipClusterPtr, OperationalCommandResponseCallback Callback - - , @Nullable Integer timedInvokeTimeoutMs); - private native void start(long chipClusterPtr, OperationalCommandResponseCallback Callback - - , @Nullable Integer timedInvokeTimeoutMs); - private native void resume(long chipClusterPtr, OperationalCommandResponseCallback Callback - - , @Nullable Integer timedInvokeTimeoutMs); - public interface OperationalCommandResponseCallback { - void onSuccess(ChipStructs.OperationalStateClusterErrorStateStruct commandResponseState); - - void onError(Exception error); - } - - - public interface PhaseListAttributeCallback { - void onSuccess(@Nullable List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface CurrentPhaseAttributeCallback { - void onSuccess(@Nullable Integer value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface CountdownTimeAttributeCallback { - void onSuccess(@Nullable Long value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface OperationalStateListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface GeneratedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AcceptedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface EventListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AttributeListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - - public void readPhaseListAttribute( - PhaseListAttributeCallback callback - ) { - readPhaseListAttribute(chipClusterPtr, callback); - } - public void subscribePhaseListAttribute( - PhaseListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribePhaseListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readCurrentPhaseAttribute( - CurrentPhaseAttributeCallback callback - ) { - readCurrentPhaseAttribute(chipClusterPtr, callback); - } - public void subscribeCurrentPhaseAttribute( - CurrentPhaseAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeCurrentPhaseAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readCountdownTimeAttribute( - CountdownTimeAttributeCallback callback - ) { - readCountdownTimeAttribute(chipClusterPtr, callback); - } - public void subscribeCountdownTimeAttribute( - CountdownTimeAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeCountdownTimeAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readOperationalStateListAttribute( - OperationalStateListAttributeCallback callback - ) { - readOperationalStateListAttribute(chipClusterPtr, callback); - } - public void subscribeOperationalStateListAttribute( - OperationalStateListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeOperationalStateListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readOperationalStateAttribute( - IntegerAttributeCallback callback - ) { - readOperationalStateAttribute(chipClusterPtr, callback); - } - public void subscribeOperationalStateAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeOperationalStateAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - ) { - readGeneratedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - ) { - readAcceptedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readEventListAttribute( - EventListAttributeCallback callback - ) { - readEventListAttribute(chipClusterPtr, callback); - } - public void subscribeEventListAttribute( - EventListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAttributeListAttribute( - AttributeListAttributeCallback callback - ) { - readAttributeListAttribute(chipClusterPtr, callback); - } - public void subscribeAttributeListAttribute( - AttributeListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readFeatureMapAttribute( - LongAttributeCallback callback - ) { - readFeatureMapAttribute(chipClusterPtr, callback); - } - public void subscribeFeatureMapAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readClusterRevisionAttribute( - IntegerAttributeCallback callback - ) { - readClusterRevisionAttribute(chipClusterPtr, callback); - } - public void subscribeClusterRevisionAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - private native void readPhaseListAttribute(long chipClusterPtr, - PhaseListAttributeCallback callback - ); - private native void subscribePhaseListAttribute(long chipClusterPtr, - PhaseListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readCurrentPhaseAttribute(long chipClusterPtr, - CurrentPhaseAttributeCallback callback - ); - private native void subscribeCurrentPhaseAttribute(long chipClusterPtr, - CurrentPhaseAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readCountdownTimeAttribute(long chipClusterPtr, - CountdownTimeAttributeCallback callback - ); - private native void subscribeCountdownTimeAttribute(long chipClusterPtr, - CountdownTimeAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readOperationalStateListAttribute(long chipClusterPtr, - OperationalStateListAttributeCallback callback - ); - private native void subscribeOperationalStateListAttribute(long chipClusterPtr, - OperationalStateListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readOperationalStateAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeOperationalStateAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - ); - private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - ); - private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - ); - private native void subscribeEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - ); - private native void subscribeAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - } - - public static class RvcOperationalStateCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 0x00000061L; - - public RvcOperationalStateCluster(long devicePtr, int endpointId) { - super(devicePtr, endpointId); - } - - @Override - public native long initWithDevice(long devicePtr, int endpointId); - - public void pause(OperationalCommandResponseCallback callback - ) { - pause(chipClusterPtr, callback, null); - } - - public void pause(OperationalCommandResponseCallback callback - - , int timedInvokeTimeoutMs) { - pause(chipClusterPtr, callback, timedInvokeTimeoutMs); - } - - public void stop(OperationalCommandResponseCallback callback - ) { - stop(chipClusterPtr, callback, null); - } - - public void stop(OperationalCommandResponseCallback callback - - , int timedInvokeTimeoutMs) { - stop(chipClusterPtr, callback, timedInvokeTimeoutMs); - } - - public void start(OperationalCommandResponseCallback callback - ) { - start(chipClusterPtr, callback, null); - } - - public void start(OperationalCommandResponseCallback callback - - , int timedInvokeTimeoutMs) { - start(chipClusterPtr, callback, timedInvokeTimeoutMs); - } - - public void resume(OperationalCommandResponseCallback callback - ) { - resume(chipClusterPtr, callback, null); - } - - public void resume(OperationalCommandResponseCallback callback - - , int timedInvokeTimeoutMs) { - resume(chipClusterPtr, callback, timedInvokeTimeoutMs); - } - private native void pause(long chipClusterPtr, OperationalCommandResponseCallback Callback - - , @Nullable Integer timedInvokeTimeoutMs); - private native void stop(long chipClusterPtr, OperationalCommandResponseCallback Callback - - , @Nullable Integer timedInvokeTimeoutMs); - private native void start(long chipClusterPtr, OperationalCommandResponseCallback Callback - - , @Nullable Integer timedInvokeTimeoutMs); - private native void resume(long chipClusterPtr, OperationalCommandResponseCallback Callback - - , @Nullable Integer timedInvokeTimeoutMs); - public interface OperationalCommandResponseCallback { - void onSuccess(ChipStructs.RvcOperationalStateClusterErrorStateStruct commandResponseState); - - void onError(Exception error); - } - - - public interface PhaseListAttributeCallback { - void onSuccess(@Nullable List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface CurrentPhaseAttributeCallback { - void onSuccess(@Nullable Integer value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface CountdownTimeAttributeCallback { - void onSuccess(@Nullable Long value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface OperationalStateListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface GeneratedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AcceptedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface EventListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AttributeListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - - public void readPhaseListAttribute( - PhaseListAttributeCallback callback - ) { - readPhaseListAttribute(chipClusterPtr, callback); - } - public void subscribePhaseListAttribute( - PhaseListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribePhaseListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readCurrentPhaseAttribute( - CurrentPhaseAttributeCallback callback - ) { - readCurrentPhaseAttribute(chipClusterPtr, callback); - } - public void subscribeCurrentPhaseAttribute( - CurrentPhaseAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeCurrentPhaseAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readCountdownTimeAttribute( - CountdownTimeAttributeCallback callback - ) { - readCountdownTimeAttribute(chipClusterPtr, callback); - } - public void subscribeCountdownTimeAttribute( - CountdownTimeAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeCountdownTimeAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readOperationalStateListAttribute( - OperationalStateListAttributeCallback callback - ) { - readOperationalStateListAttribute(chipClusterPtr, callback); - } - public void subscribeOperationalStateListAttribute( - OperationalStateListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeOperationalStateListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readOperationalStateAttribute( - IntegerAttributeCallback callback - ) { - readOperationalStateAttribute(chipClusterPtr, callback); - } - public void subscribeOperationalStateAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeOperationalStateAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - ) { - readGeneratedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - ) { - readAcceptedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readEventListAttribute( - EventListAttributeCallback callback - ) { - readEventListAttribute(chipClusterPtr, callback); - } - public void subscribeEventListAttribute( - EventListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAttributeListAttribute( - AttributeListAttributeCallback callback - ) { - readAttributeListAttribute(chipClusterPtr, callback); - } - public void subscribeAttributeListAttribute( - AttributeListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readFeatureMapAttribute( - LongAttributeCallback callback - ) { - readFeatureMapAttribute(chipClusterPtr, callback); - } - public void subscribeFeatureMapAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readClusterRevisionAttribute( - IntegerAttributeCallback callback - ) { - readClusterRevisionAttribute(chipClusterPtr, callback); - } - public void subscribeClusterRevisionAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - private native void readPhaseListAttribute(long chipClusterPtr, - PhaseListAttributeCallback callback - ); - private native void subscribePhaseListAttribute(long chipClusterPtr, - PhaseListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readCurrentPhaseAttribute(long chipClusterPtr, - CurrentPhaseAttributeCallback callback - ); - private native void subscribeCurrentPhaseAttribute(long chipClusterPtr, - CurrentPhaseAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readCountdownTimeAttribute(long chipClusterPtr, - CountdownTimeAttributeCallback callback - ); - private native void subscribeCountdownTimeAttribute(long chipClusterPtr, - CountdownTimeAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readOperationalStateListAttribute(long chipClusterPtr, - OperationalStateListAttributeCallback callback - ); - private native void subscribeOperationalStateListAttribute(long chipClusterPtr, - OperationalStateListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readOperationalStateAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeOperationalStateAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - ); - private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - ); - private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - ); - private native void subscribeEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - ); - private native void subscribeAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - } - - public static class HepaFilterMonitoringCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 0x00000071L; - - public HepaFilterMonitoringCluster(long devicePtr, int endpointId) { - super(devicePtr, endpointId); - } - - @Override - public native long initWithDevice(long devicePtr, int endpointId); - - public void resetCondition(DefaultClusterCallback callback - ) { - resetCondition(chipClusterPtr, callback, null); - } - - public void resetCondition(DefaultClusterCallback callback - - , int timedInvokeTimeoutMs) { - resetCondition(chipClusterPtr, callback, timedInvokeTimeoutMs); - } - private native void resetCondition(long chipClusterPtr, DefaultClusterCallback Callback - - , @Nullable Integer timedInvokeTimeoutMs); - - public interface LastChangedTimeAttributeCallback { - void onSuccess(@Nullable Long value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface ReplacementProductListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface GeneratedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AcceptedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface EventListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AttributeListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - - public void readConditionAttribute( - IntegerAttributeCallback callback - ) { - readConditionAttribute(chipClusterPtr, callback); - } - public void subscribeConditionAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeConditionAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readDegradationDirectionAttribute( - IntegerAttributeCallback callback - ) { - readDegradationDirectionAttribute(chipClusterPtr, callback); - } - public void subscribeDegradationDirectionAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeDegradationDirectionAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readChangeIndicationAttribute( - IntegerAttributeCallback callback - ) { - readChangeIndicationAttribute(chipClusterPtr, callback); - } - public void subscribeChangeIndicationAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeChangeIndicationAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readInPlaceIndicatorAttribute( - BooleanAttributeCallback callback - ) { - readInPlaceIndicatorAttribute(chipClusterPtr, callback); - } - public void subscribeInPlaceIndicatorAttribute( - BooleanAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeInPlaceIndicatorAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readLastChangedTimeAttribute( - LastChangedTimeAttributeCallback callback - ) { - readLastChangedTimeAttribute(chipClusterPtr, callback); - } - public void writeLastChangedTimeAttribute(DefaultClusterCallback callback, Long value) { - writeLastChangedTimeAttribute(chipClusterPtr, callback, value, null); - } - - public void writeLastChangedTimeAttribute(DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { - writeLastChangedTimeAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeLastChangedTimeAttribute( - LastChangedTimeAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeLastChangedTimeAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readReplacementProductListAttribute( - ReplacementProductListAttributeCallback callback - ) { - readReplacementProductListAttribute(chipClusterPtr, callback); - } - public void subscribeReplacementProductListAttribute( - ReplacementProductListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeReplacementProductListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - ) { - readGeneratedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - ) { - readAcceptedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readEventListAttribute( - EventListAttributeCallback callback - ) { - readEventListAttribute(chipClusterPtr, callback); - } - public void subscribeEventListAttribute( - EventListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAttributeListAttribute( - AttributeListAttributeCallback callback - ) { - readAttributeListAttribute(chipClusterPtr, callback); - } - public void subscribeAttributeListAttribute( - AttributeListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readFeatureMapAttribute( - LongAttributeCallback callback - ) { - readFeatureMapAttribute(chipClusterPtr, callback); - } - public void subscribeFeatureMapAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readClusterRevisionAttribute( - IntegerAttributeCallback callback - ) { - readClusterRevisionAttribute(chipClusterPtr, callback); - } - public void subscribeClusterRevisionAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - private native void readConditionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeConditionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readDegradationDirectionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeDegradationDirectionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readChangeIndicationAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeChangeIndicationAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readInPlaceIndicatorAttribute(long chipClusterPtr, - BooleanAttributeCallback callback - ); - private native void subscribeInPlaceIndicatorAttribute(long chipClusterPtr, - BooleanAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readLastChangedTimeAttribute(long chipClusterPtr, - LastChangedTimeAttributeCallback callback - ); - - private native void writeLastChangedTimeAttribute(long chipClusterPtr, DefaultClusterCallback callback, Long value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeLastChangedTimeAttribute(long chipClusterPtr, - LastChangedTimeAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readReplacementProductListAttribute(long chipClusterPtr, - ReplacementProductListAttributeCallback callback - ); - private native void subscribeReplacementProductListAttribute(long chipClusterPtr, - ReplacementProductListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - ); - private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - ); - private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - ); - private native void subscribeEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - ); - private native void subscribeAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - } - - public static class ActivatedCarbonFilterMonitoringCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 0x00000072L; - - public ActivatedCarbonFilterMonitoringCluster(long devicePtr, int endpointId) { - super(devicePtr, endpointId); - } - - @Override - public native long initWithDevice(long devicePtr, int endpointId); - - public void resetCondition(DefaultClusterCallback callback - ) { - resetCondition(chipClusterPtr, callback, null); - } - - public void resetCondition(DefaultClusterCallback callback - - , int timedInvokeTimeoutMs) { - resetCondition(chipClusterPtr, callback, timedInvokeTimeoutMs); - } - private native void resetCondition(long chipClusterPtr, DefaultClusterCallback Callback - - , @Nullable Integer timedInvokeTimeoutMs); - - public interface LastChangedTimeAttributeCallback { - void onSuccess(@Nullable Long value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface ReplacementProductListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface GeneratedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AcceptedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface EventListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AttributeListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - - public void readConditionAttribute( - IntegerAttributeCallback callback - ) { - readConditionAttribute(chipClusterPtr, callback); - } - public void subscribeConditionAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeConditionAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readDegradationDirectionAttribute( - IntegerAttributeCallback callback - ) { - readDegradationDirectionAttribute(chipClusterPtr, callback); - } - public void subscribeDegradationDirectionAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeDegradationDirectionAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readChangeIndicationAttribute( - IntegerAttributeCallback callback - ) { - readChangeIndicationAttribute(chipClusterPtr, callback); - } - public void subscribeChangeIndicationAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeChangeIndicationAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readInPlaceIndicatorAttribute( - BooleanAttributeCallback callback - ) { - readInPlaceIndicatorAttribute(chipClusterPtr, callback); - } - public void subscribeInPlaceIndicatorAttribute( - BooleanAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeInPlaceIndicatorAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readLastChangedTimeAttribute( - LastChangedTimeAttributeCallback callback - ) { - readLastChangedTimeAttribute(chipClusterPtr, callback); - } - public void writeLastChangedTimeAttribute(DefaultClusterCallback callback, Long value) { - writeLastChangedTimeAttribute(chipClusterPtr, callback, value, null); - } - - public void writeLastChangedTimeAttribute(DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { - writeLastChangedTimeAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeLastChangedTimeAttribute( - LastChangedTimeAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeLastChangedTimeAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readReplacementProductListAttribute( - ReplacementProductListAttributeCallback callback - ) { - readReplacementProductListAttribute(chipClusterPtr, callback); - } - public void subscribeReplacementProductListAttribute( - ReplacementProductListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeReplacementProductListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - ) { - readGeneratedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - ) { - readAcceptedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readEventListAttribute( - EventListAttributeCallback callback - ) { - readEventListAttribute(chipClusterPtr, callback); - } - public void subscribeEventListAttribute( - EventListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAttributeListAttribute( - AttributeListAttributeCallback callback - ) { - readAttributeListAttribute(chipClusterPtr, callback); - } - public void subscribeAttributeListAttribute( - AttributeListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readFeatureMapAttribute( - LongAttributeCallback callback - ) { - readFeatureMapAttribute(chipClusterPtr, callback); - } - public void subscribeFeatureMapAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readClusterRevisionAttribute( - IntegerAttributeCallback callback - ) { - readClusterRevisionAttribute(chipClusterPtr, callback); - } - public void subscribeClusterRevisionAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - private native void readConditionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeConditionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readDegradationDirectionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeDegradationDirectionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readChangeIndicationAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeChangeIndicationAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readInPlaceIndicatorAttribute(long chipClusterPtr, - BooleanAttributeCallback callback - ); - private native void subscribeInPlaceIndicatorAttribute(long chipClusterPtr, - BooleanAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readLastChangedTimeAttribute(long chipClusterPtr, - LastChangedTimeAttributeCallback callback - ); - - private native void writeLastChangedTimeAttribute(long chipClusterPtr, DefaultClusterCallback callback, Long value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeLastChangedTimeAttribute(long chipClusterPtr, - LastChangedTimeAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readReplacementProductListAttribute(long chipClusterPtr, - ReplacementProductListAttributeCallback callback - ); - private native void subscribeReplacementProductListAttribute(long chipClusterPtr, - ReplacementProductListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - ); - private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - ); - private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - ); - private native void subscribeEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - ); - private native void subscribeAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - } - - public static class BooleanStateConfigurationCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 0x00000080L; - - public BooleanStateConfigurationCluster(long devicePtr, int endpointId) { - super(devicePtr, endpointId); - } - - @Override - public native long initWithDevice(long devicePtr, int endpointId); - - public void supressRequest(DefaultClusterCallback callback - , Integer alarmsToSuppress) { - supressRequest(chipClusterPtr, callback, alarmsToSuppress, null); - } - - public void supressRequest(DefaultClusterCallback callback - , Integer alarmsToSuppress - , int timedInvokeTimeoutMs) { - supressRequest(chipClusterPtr, callback, alarmsToSuppress, timedInvokeTimeoutMs); - } - private native void supressRequest(long chipClusterPtr, DefaultClusterCallback Callback - , Integer alarmsToSuppress - , @Nullable Integer timedInvokeTimeoutMs); - - public interface GeneratedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AcceptedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface EventListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AttributeListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - - public void readSensitivityLevelAttribute( - IntegerAttributeCallback callback - ) { - readSensitivityLevelAttribute(chipClusterPtr, callback); - } - public void writeSensitivityLevelAttribute(DefaultClusterCallback callback, Integer value) { - writeSensitivityLevelAttribute(chipClusterPtr, callback, value, null); - } - - public void writeSensitivityLevelAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeSensitivityLevelAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeSensitivityLevelAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeSensitivityLevelAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAlarmsActiveAttribute( - IntegerAttributeCallback callback - ) { - readAlarmsActiveAttribute(chipClusterPtr, callback); - } - public void subscribeAlarmsActiveAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeAlarmsActiveAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAlarmsSuppressedAttribute( - IntegerAttributeCallback callback - ) { - readAlarmsSuppressedAttribute(chipClusterPtr, callback); - } - public void subscribeAlarmsSuppressedAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeAlarmsSuppressedAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAlarmsEnabledAttribute( - IntegerAttributeCallback callback - ) { - readAlarmsEnabledAttribute(chipClusterPtr, callback); - } - public void writeAlarmsEnabledAttribute(DefaultClusterCallback callback, Integer value) { - writeAlarmsEnabledAttribute(chipClusterPtr, callback, value, null); - } - - public void writeAlarmsEnabledAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeAlarmsEnabledAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeAlarmsEnabledAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeAlarmsEnabledAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - ) { - readGeneratedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - ) { - readAcceptedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readEventListAttribute( - EventListAttributeCallback callback - ) { - readEventListAttribute(chipClusterPtr, callback); - } - public void subscribeEventListAttribute( - EventListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAttributeListAttribute( - AttributeListAttributeCallback callback - ) { - readAttributeListAttribute(chipClusterPtr, callback); - } - public void subscribeAttributeListAttribute( - AttributeListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readFeatureMapAttribute( - LongAttributeCallback callback - ) { - readFeatureMapAttribute(chipClusterPtr, callback); - } - public void subscribeFeatureMapAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readClusterRevisionAttribute( - IntegerAttributeCallback callback - ) { - readClusterRevisionAttribute(chipClusterPtr, callback); - } - public void subscribeClusterRevisionAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - private native void readSensitivityLevelAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - - private native void writeSensitivityLevelAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeSensitivityLevelAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readAlarmsActiveAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeAlarmsActiveAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readAlarmsSuppressedAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeAlarmsSuppressedAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readAlarmsEnabledAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - - private native void writeAlarmsEnabledAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeAlarmsEnabledAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - ); - private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - ); - private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - ); - private native void subscribeEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - ); - private native void subscribeAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - } - - public static class ValveConfigurationAndControlCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 0x00000081L; - - public ValveConfigurationAndControlCluster(long devicePtr, int endpointId) { - super(devicePtr, endpointId); - } - - @Override - public native long initWithDevice(long devicePtr, int endpointId); - - public void open(DefaultClusterCallback callback - , Optional openDuration) { - open(chipClusterPtr, callback, openDuration, null); - } - - public void open(DefaultClusterCallback callback - , Optional openDuration - , int timedInvokeTimeoutMs) { - open(chipClusterPtr, callback, openDuration, timedInvokeTimeoutMs); - } - - public void close(DefaultClusterCallback callback - ) { - close(chipClusterPtr, callback, null); - } - - public void close(DefaultClusterCallback callback - - , int timedInvokeTimeoutMs) { - close(chipClusterPtr, callback, timedInvokeTimeoutMs); - } - - public void setLevel(DefaultClusterCallback callback - , Integer level, Optional openDuration) { - setLevel(chipClusterPtr, callback, level, openDuration, null); - } - - public void setLevel(DefaultClusterCallback callback - , Integer level, Optional openDuration - , int timedInvokeTimeoutMs) { - setLevel(chipClusterPtr, callback, level, openDuration, timedInvokeTimeoutMs); - } - private native void open(long chipClusterPtr, DefaultClusterCallback Callback - , Optional openDuration - , @Nullable Integer timedInvokeTimeoutMs); - private native void close(long chipClusterPtr, DefaultClusterCallback Callback - - , @Nullable Integer timedInvokeTimeoutMs); - private native void setLevel(long chipClusterPtr, DefaultClusterCallback Callback - , Integer level, Optional openDuration - , @Nullable Integer timedInvokeTimeoutMs); - - public interface OpenDurationAttributeCallback { - void onSuccess(@Nullable Long value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AutoCloseTimeAttributeCallback { - void onSuccess(@Nullable Long value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface RemainingDurationAttributeCallback { - void onSuccess(@Nullable Long value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface CurrentStateAttributeCallback { - void onSuccess(@Nullable Integer value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface TargetStateAttributeCallback { - void onSuccess(@Nullable Integer value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface CurrentLevelAttributeCallback { - void onSuccess(@Nullable Integer value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface TargetLevelAttributeCallback { - void onSuccess(@Nullable Integer value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface OpenLevelAttributeCallback { - void onSuccess(@Nullable Integer value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface GeneratedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AcceptedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface EventListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AttributeListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - - public void readOpenDurationAttribute( - OpenDurationAttributeCallback callback - ) { - readOpenDurationAttribute(chipClusterPtr, callback); - } - public void writeOpenDurationAttribute(DefaultClusterCallback callback, Long value) { - writeOpenDurationAttribute(chipClusterPtr, callback, value, null); - } - - public void writeOpenDurationAttribute(DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { - writeOpenDurationAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeOpenDurationAttribute( - OpenDurationAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeOpenDurationAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAutoCloseTimeAttribute( - AutoCloseTimeAttributeCallback callback - ) { - readAutoCloseTimeAttribute(chipClusterPtr, callback); - } - public void subscribeAutoCloseTimeAttribute( - AutoCloseTimeAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAutoCloseTimeAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readRemainingDurationAttribute( - RemainingDurationAttributeCallback callback - ) { - readRemainingDurationAttribute(chipClusterPtr, callback); - } - public void subscribeRemainingDurationAttribute( - RemainingDurationAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeRemainingDurationAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readCurrentStateAttribute( - CurrentStateAttributeCallback callback - ) { - readCurrentStateAttribute(chipClusterPtr, callback); - } - public void subscribeCurrentStateAttribute( - CurrentStateAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeCurrentStateAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readTargetStateAttribute( - TargetStateAttributeCallback callback - ) { - readTargetStateAttribute(chipClusterPtr, callback); - } - public void subscribeTargetStateAttribute( - TargetStateAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeTargetStateAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readStartUpStateAttribute( - IntegerAttributeCallback callback - ) { - readStartUpStateAttribute(chipClusterPtr, callback); - } - public void writeStartUpStateAttribute(DefaultClusterCallback callback, Integer value) { - writeStartUpStateAttribute(chipClusterPtr, callback, value, null); - } - - public void writeStartUpStateAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeStartUpStateAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeStartUpStateAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeStartUpStateAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readCurrentLevelAttribute( - CurrentLevelAttributeCallback callback - ) { - readCurrentLevelAttribute(chipClusterPtr, callback); - } - public void subscribeCurrentLevelAttribute( - CurrentLevelAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeCurrentLevelAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readTargetLevelAttribute( - TargetLevelAttributeCallback callback - ) { - readTargetLevelAttribute(chipClusterPtr, callback); - } - public void subscribeTargetLevelAttribute( - TargetLevelAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeTargetLevelAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readOpenLevelAttribute( - OpenLevelAttributeCallback callback - ) { - readOpenLevelAttribute(chipClusterPtr, callback); - } - public void writeOpenLevelAttribute(DefaultClusterCallback callback, Integer value) { - writeOpenLevelAttribute(chipClusterPtr, callback, value, null); - } - - public void writeOpenLevelAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeOpenLevelAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeOpenLevelAttribute( - OpenLevelAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeOpenLevelAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readValveFaultAttribute( - IntegerAttributeCallback callback - ) { - readValveFaultAttribute(chipClusterPtr, callback); - } - public void subscribeValveFaultAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeValveFaultAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - ) { - readGeneratedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - ) { - readAcceptedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readEventListAttribute( - EventListAttributeCallback callback - ) { - readEventListAttribute(chipClusterPtr, callback); - } - public void subscribeEventListAttribute( - EventListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAttributeListAttribute( - AttributeListAttributeCallback callback - ) { - readAttributeListAttribute(chipClusterPtr, callback); - } - public void subscribeAttributeListAttribute( - AttributeListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readFeatureMapAttribute( - LongAttributeCallback callback - ) { - readFeatureMapAttribute(chipClusterPtr, callback); - } - public void subscribeFeatureMapAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readClusterRevisionAttribute( - IntegerAttributeCallback callback - ) { - readClusterRevisionAttribute(chipClusterPtr, callback); - } - public void subscribeClusterRevisionAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - private native void readOpenDurationAttribute(long chipClusterPtr, - OpenDurationAttributeCallback callback - ); - - private native void writeOpenDurationAttribute(long chipClusterPtr, DefaultClusterCallback callback, Long value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeOpenDurationAttribute(long chipClusterPtr, - OpenDurationAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAutoCloseTimeAttribute(long chipClusterPtr, - AutoCloseTimeAttributeCallback callback - ); - private native void subscribeAutoCloseTimeAttribute(long chipClusterPtr, - AutoCloseTimeAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readRemainingDurationAttribute(long chipClusterPtr, - RemainingDurationAttributeCallback callback - ); - private native void subscribeRemainingDurationAttribute(long chipClusterPtr, - RemainingDurationAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readCurrentStateAttribute(long chipClusterPtr, - CurrentStateAttributeCallback callback - ); - private native void subscribeCurrentStateAttribute(long chipClusterPtr, - CurrentStateAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readTargetStateAttribute(long chipClusterPtr, - TargetStateAttributeCallback callback - ); - private native void subscribeTargetStateAttribute(long chipClusterPtr, - TargetStateAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readStartUpStateAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - - private native void writeStartUpStateAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeStartUpStateAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readCurrentLevelAttribute(long chipClusterPtr, - CurrentLevelAttributeCallback callback - ); - private native void subscribeCurrentLevelAttribute(long chipClusterPtr, - CurrentLevelAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readTargetLevelAttribute(long chipClusterPtr, - TargetLevelAttributeCallback callback - ); - private native void subscribeTargetLevelAttribute(long chipClusterPtr, - TargetLevelAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readOpenLevelAttribute(long chipClusterPtr, - OpenLevelAttributeCallback callback - ); - - private native void writeOpenLevelAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeOpenLevelAttribute(long chipClusterPtr, - OpenLevelAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readValveFaultAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeValveFaultAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - ); - private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - ); - private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - ); - private native void subscribeEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - ); - private native void subscribeAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - } - - public static class DoorLockCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 0x00000101L; - - public DoorLockCluster(long devicePtr, int endpointId) { - super(devicePtr, endpointId); - } - - @Override - public native long initWithDevice(long devicePtr, int endpointId); - - - public void lockDoor(DefaultClusterCallback callback - , Optional PINCode - , int timedInvokeTimeoutMs) { - lockDoor(chipClusterPtr, callback, PINCode, timedInvokeTimeoutMs); - } - - - public void unlockDoor(DefaultClusterCallback callback - , Optional PINCode - , int timedInvokeTimeoutMs) { - unlockDoor(chipClusterPtr, callback, PINCode, timedInvokeTimeoutMs); - } - - - public void unlockWithTimeout(DefaultClusterCallback callback - , Integer timeout, Optional PINCode - , int timedInvokeTimeoutMs) { - unlockWithTimeout(chipClusterPtr, callback, timeout, PINCode, timedInvokeTimeoutMs); - } - - public void setWeekDaySchedule(DefaultClusterCallback callback - , Integer weekDayIndex, Integer userIndex, Integer daysMask, Integer startHour, Integer startMinute, Integer endHour, Integer endMinute) { - setWeekDaySchedule(chipClusterPtr, callback, weekDayIndex, userIndex, daysMask, startHour, startMinute, endHour, endMinute, null); - } - - public void setWeekDaySchedule(DefaultClusterCallback callback - , Integer weekDayIndex, Integer userIndex, Integer daysMask, Integer startHour, Integer startMinute, Integer endHour, Integer endMinute - , int timedInvokeTimeoutMs) { - setWeekDaySchedule(chipClusterPtr, callback, weekDayIndex, userIndex, daysMask, startHour, startMinute, endHour, endMinute, timedInvokeTimeoutMs); - } - - public void getWeekDaySchedule(GetWeekDayScheduleResponseCallback callback - , Integer weekDayIndex, Integer userIndex) { - getWeekDaySchedule(chipClusterPtr, callback, weekDayIndex, userIndex, null); - } - - public void getWeekDaySchedule(GetWeekDayScheduleResponseCallback callback - , Integer weekDayIndex, Integer userIndex - , int timedInvokeTimeoutMs) { - getWeekDaySchedule(chipClusterPtr, callback, weekDayIndex, userIndex, timedInvokeTimeoutMs); - } - - public void clearWeekDaySchedule(DefaultClusterCallback callback - , Integer weekDayIndex, Integer userIndex) { - clearWeekDaySchedule(chipClusterPtr, callback, weekDayIndex, userIndex, null); - } - - public void clearWeekDaySchedule(DefaultClusterCallback callback - , Integer weekDayIndex, Integer userIndex - , int timedInvokeTimeoutMs) { - clearWeekDaySchedule(chipClusterPtr, callback, weekDayIndex, userIndex, timedInvokeTimeoutMs); - } - - public void setYearDaySchedule(DefaultClusterCallback callback - , Integer yearDayIndex, Integer userIndex, Long localStartTime, Long localEndTime) { - setYearDaySchedule(chipClusterPtr, callback, yearDayIndex, userIndex, localStartTime, localEndTime, null); - } - - public void setYearDaySchedule(DefaultClusterCallback callback - , Integer yearDayIndex, Integer userIndex, Long localStartTime, Long localEndTime - , int timedInvokeTimeoutMs) { - setYearDaySchedule(chipClusterPtr, callback, yearDayIndex, userIndex, localStartTime, localEndTime, timedInvokeTimeoutMs); - } - - public void getYearDaySchedule(GetYearDayScheduleResponseCallback callback - , Integer yearDayIndex, Integer userIndex) { - getYearDaySchedule(chipClusterPtr, callback, yearDayIndex, userIndex, null); - } - - public void getYearDaySchedule(GetYearDayScheduleResponseCallback callback - , Integer yearDayIndex, Integer userIndex - , int timedInvokeTimeoutMs) { - getYearDaySchedule(chipClusterPtr, callback, yearDayIndex, userIndex, timedInvokeTimeoutMs); - } - - public void clearYearDaySchedule(DefaultClusterCallback callback - , Integer yearDayIndex, Integer userIndex) { - clearYearDaySchedule(chipClusterPtr, callback, yearDayIndex, userIndex, null); - } - - public void clearYearDaySchedule(DefaultClusterCallback callback - , Integer yearDayIndex, Integer userIndex - , int timedInvokeTimeoutMs) { - clearYearDaySchedule(chipClusterPtr, callback, yearDayIndex, userIndex, timedInvokeTimeoutMs); - } - - public void setHolidaySchedule(DefaultClusterCallback callback - , Integer holidayIndex, Long localStartTime, Long localEndTime, Integer operatingMode) { - setHolidaySchedule(chipClusterPtr, callback, holidayIndex, localStartTime, localEndTime, operatingMode, null); - } - - public void setHolidaySchedule(DefaultClusterCallback callback - , Integer holidayIndex, Long localStartTime, Long localEndTime, Integer operatingMode - , int timedInvokeTimeoutMs) { - setHolidaySchedule(chipClusterPtr, callback, holidayIndex, localStartTime, localEndTime, operatingMode, timedInvokeTimeoutMs); - } - - public void getHolidaySchedule(GetHolidayScheduleResponseCallback callback - , Integer holidayIndex) { - getHolidaySchedule(chipClusterPtr, callback, holidayIndex, null); - } - - public void getHolidaySchedule(GetHolidayScheduleResponseCallback callback - , Integer holidayIndex - , int timedInvokeTimeoutMs) { - getHolidaySchedule(chipClusterPtr, callback, holidayIndex, timedInvokeTimeoutMs); - } - - public void clearHolidaySchedule(DefaultClusterCallback callback - , Integer holidayIndex) { - clearHolidaySchedule(chipClusterPtr, callback, holidayIndex, null); - } - - public void clearHolidaySchedule(DefaultClusterCallback callback - , Integer holidayIndex - , int timedInvokeTimeoutMs) { - clearHolidaySchedule(chipClusterPtr, callback, holidayIndex, timedInvokeTimeoutMs); - } - - - public void setUser(DefaultClusterCallback callback - , Integer operationType, Integer userIndex, @Nullable String userName, @Nullable Long userUniqueID, @Nullable Integer userStatus, @Nullable Integer userType, @Nullable Integer credentialRule - , int timedInvokeTimeoutMs) { - setUser(chipClusterPtr, callback, operationType, userIndex, userName, userUniqueID, userStatus, userType, credentialRule, timedInvokeTimeoutMs); - } - - public void getUser(GetUserResponseCallback callback - , Integer userIndex) { - getUser(chipClusterPtr, callback, userIndex, null); - } - - public void getUser(GetUserResponseCallback callback - , Integer userIndex - , int timedInvokeTimeoutMs) { - getUser(chipClusterPtr, callback, userIndex, timedInvokeTimeoutMs); - } - - - public void clearUser(DefaultClusterCallback callback - , Integer userIndex - , int timedInvokeTimeoutMs) { - clearUser(chipClusterPtr, callback, userIndex, timedInvokeTimeoutMs); - } - - - public void setCredential(SetCredentialResponseCallback callback - , Integer operationType, ChipStructs.DoorLockClusterCredentialStruct credential, byte[] credentialData, @Nullable Integer userIndex, @Nullable Integer userStatus, @Nullable Integer userType - , int timedInvokeTimeoutMs) { - setCredential(chipClusterPtr, callback, operationType, credential, credentialData, userIndex, userStatus, userType, timedInvokeTimeoutMs); - } - - public void getCredentialStatus(GetCredentialStatusResponseCallback callback - , ChipStructs.DoorLockClusterCredentialStruct credential) { - getCredentialStatus(chipClusterPtr, callback, credential, null); - } - - public void getCredentialStatus(GetCredentialStatusResponseCallback callback - , ChipStructs.DoorLockClusterCredentialStruct credential - , int timedInvokeTimeoutMs) { - getCredentialStatus(chipClusterPtr, callback, credential, timedInvokeTimeoutMs); - } - - - public void clearCredential(DefaultClusterCallback callback - , @Nullable ChipStructs.DoorLockClusterCredentialStruct credential - , int timedInvokeTimeoutMs) { - clearCredential(chipClusterPtr, callback, credential, timedInvokeTimeoutMs); - } - - - public void unboltDoor(DefaultClusterCallback callback - , Optional PINCode - , int timedInvokeTimeoutMs) { - unboltDoor(chipClusterPtr, callback, PINCode, timedInvokeTimeoutMs); - } - private native void lockDoor(long chipClusterPtr, DefaultClusterCallback Callback - , Optional PINCode - , @Nullable Integer timedInvokeTimeoutMs); - private native void unlockDoor(long chipClusterPtr, DefaultClusterCallback Callback - , Optional PINCode - , @Nullable Integer timedInvokeTimeoutMs); - private native void unlockWithTimeout(long chipClusterPtr, DefaultClusterCallback Callback - , Integer timeout, Optional PINCode - , @Nullable Integer timedInvokeTimeoutMs); - private native void setWeekDaySchedule(long chipClusterPtr, DefaultClusterCallback Callback - , Integer weekDayIndex, Integer userIndex, Integer daysMask, Integer startHour, Integer startMinute, Integer endHour, Integer endMinute - , @Nullable Integer timedInvokeTimeoutMs); - private native void getWeekDaySchedule(long chipClusterPtr, GetWeekDayScheduleResponseCallback Callback - , Integer weekDayIndex, Integer userIndex - , @Nullable Integer timedInvokeTimeoutMs); - private native void clearWeekDaySchedule(long chipClusterPtr, DefaultClusterCallback Callback - , Integer weekDayIndex, Integer userIndex - , @Nullable Integer timedInvokeTimeoutMs); - private native void setYearDaySchedule(long chipClusterPtr, DefaultClusterCallback Callback - , Integer yearDayIndex, Integer userIndex, Long localStartTime, Long localEndTime - , @Nullable Integer timedInvokeTimeoutMs); - private native void getYearDaySchedule(long chipClusterPtr, GetYearDayScheduleResponseCallback Callback - , Integer yearDayIndex, Integer userIndex - , @Nullable Integer timedInvokeTimeoutMs); - private native void clearYearDaySchedule(long chipClusterPtr, DefaultClusterCallback Callback - , Integer yearDayIndex, Integer userIndex - , @Nullable Integer timedInvokeTimeoutMs); - private native void setHolidaySchedule(long chipClusterPtr, DefaultClusterCallback Callback - , Integer holidayIndex, Long localStartTime, Long localEndTime, Integer operatingMode - , @Nullable Integer timedInvokeTimeoutMs); - private native void getHolidaySchedule(long chipClusterPtr, GetHolidayScheduleResponseCallback Callback - , Integer holidayIndex - , @Nullable Integer timedInvokeTimeoutMs); - private native void clearHolidaySchedule(long chipClusterPtr, DefaultClusterCallback Callback - , Integer holidayIndex - , @Nullable Integer timedInvokeTimeoutMs); - private native void setUser(long chipClusterPtr, DefaultClusterCallback Callback - , Integer operationType, Integer userIndex, @Nullable String userName, @Nullable Long userUniqueID, @Nullable Integer userStatus, @Nullable Integer userType, @Nullable Integer credentialRule - , @Nullable Integer timedInvokeTimeoutMs); - private native void getUser(long chipClusterPtr, GetUserResponseCallback Callback - , Integer userIndex - , @Nullable Integer timedInvokeTimeoutMs); - private native void clearUser(long chipClusterPtr, DefaultClusterCallback Callback - , Integer userIndex - , @Nullable Integer timedInvokeTimeoutMs); - private native void setCredential(long chipClusterPtr, SetCredentialResponseCallback Callback - , Integer operationType, ChipStructs.DoorLockClusterCredentialStruct credential, byte[] credentialData, @Nullable Integer userIndex, @Nullable Integer userStatus, @Nullable Integer userType - , @Nullable Integer timedInvokeTimeoutMs); - private native void getCredentialStatus(long chipClusterPtr, GetCredentialStatusResponseCallback Callback - , ChipStructs.DoorLockClusterCredentialStruct credential - , @Nullable Integer timedInvokeTimeoutMs); - private native void clearCredential(long chipClusterPtr, DefaultClusterCallback Callback - , @Nullable ChipStructs.DoorLockClusterCredentialStruct credential - , @Nullable Integer timedInvokeTimeoutMs); - private native void unboltDoor(long chipClusterPtr, DefaultClusterCallback Callback - , Optional PINCode - , @Nullable Integer timedInvokeTimeoutMs); - public interface GetWeekDayScheduleResponseCallback { - void onSuccess(Integer weekDayIndex, Integer userIndex, Integer status, Optional daysMask, Optional startHour, Optional startMinute, Optional endHour, Optional endMinute); - - void onError(Exception error); - } - - public interface GetYearDayScheduleResponseCallback { - void onSuccess(Integer yearDayIndex, Integer userIndex, Integer status, Optional localStartTime, Optional localEndTime); - - void onError(Exception error); - } - - public interface GetHolidayScheduleResponseCallback { - void onSuccess(Integer holidayIndex, Integer status, Optional localStartTime, Optional localEndTime, Optional operatingMode); - - void onError(Exception error); - } - - public interface GetUserResponseCallback { - void onSuccess(Integer userIndex, @Nullable String userName, @Nullable Long userUniqueID, @Nullable Integer userStatus, @Nullable Integer userType, @Nullable Integer credentialRule, @Nullable ArrayList credentials, @Nullable Integer creatorFabricIndex, @Nullable Integer lastModifiedFabricIndex, @Nullable Integer nextUserIndex); - - void onError(Exception error); - } - - public interface SetCredentialResponseCallback { - void onSuccess(Integer status, @Nullable Integer userIndex, @Nullable Integer nextCredentialIndex); - - void onError(Exception error); - } - - public interface GetCredentialStatusResponseCallback { - void onSuccess(Boolean credentialExists, @Nullable Integer userIndex, @Nullable Integer creatorFabricIndex, @Nullable Integer lastModifiedFabricIndex, @Nullable Integer nextCredentialIndex); - - void onError(Exception error); - } - - - public interface LockStateAttributeCallback { - void onSuccess(@Nullable Integer value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface DoorStateAttributeCallback { - void onSuccess(@Nullable Integer value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface GeneratedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AcceptedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface EventListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AttributeListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - - public void readLockStateAttribute( - LockStateAttributeCallback callback - ) { - readLockStateAttribute(chipClusterPtr, callback); - } - public void subscribeLockStateAttribute( - LockStateAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeLockStateAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readLockTypeAttribute( - IntegerAttributeCallback callback - ) { - readLockTypeAttribute(chipClusterPtr, callback); - } - public void subscribeLockTypeAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeLockTypeAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readActuatorEnabledAttribute( - BooleanAttributeCallback callback - ) { - readActuatorEnabledAttribute(chipClusterPtr, callback); - } - public void subscribeActuatorEnabledAttribute( - BooleanAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeActuatorEnabledAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readDoorStateAttribute( - DoorStateAttributeCallback callback - ) { - readDoorStateAttribute(chipClusterPtr, callback); - } - public void subscribeDoorStateAttribute( - DoorStateAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeDoorStateAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readDoorOpenEventsAttribute( - LongAttributeCallback callback - ) { - readDoorOpenEventsAttribute(chipClusterPtr, callback); - } - public void writeDoorOpenEventsAttribute(DefaultClusterCallback callback, Long value) { - writeDoorOpenEventsAttribute(chipClusterPtr, callback, value, null); - } - - public void writeDoorOpenEventsAttribute(DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { - writeDoorOpenEventsAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeDoorOpenEventsAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeDoorOpenEventsAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readDoorClosedEventsAttribute( - LongAttributeCallback callback - ) { - readDoorClosedEventsAttribute(chipClusterPtr, callback); - } - public void writeDoorClosedEventsAttribute(DefaultClusterCallback callback, Long value) { - writeDoorClosedEventsAttribute(chipClusterPtr, callback, value, null); - } - - public void writeDoorClosedEventsAttribute(DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { - writeDoorClosedEventsAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeDoorClosedEventsAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeDoorClosedEventsAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readOpenPeriodAttribute( - IntegerAttributeCallback callback - ) { - readOpenPeriodAttribute(chipClusterPtr, callback); - } - public void writeOpenPeriodAttribute(DefaultClusterCallback callback, Integer value) { - writeOpenPeriodAttribute(chipClusterPtr, callback, value, null); - } - - public void writeOpenPeriodAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeOpenPeriodAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeOpenPeriodAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeOpenPeriodAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readNumberOfTotalUsersSupportedAttribute( - IntegerAttributeCallback callback - ) { - readNumberOfTotalUsersSupportedAttribute(chipClusterPtr, callback); - } - public void subscribeNumberOfTotalUsersSupportedAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeNumberOfTotalUsersSupportedAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readNumberOfPINUsersSupportedAttribute( - IntegerAttributeCallback callback - ) { - readNumberOfPINUsersSupportedAttribute(chipClusterPtr, callback); - } - public void subscribeNumberOfPINUsersSupportedAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeNumberOfPINUsersSupportedAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readNumberOfRFIDUsersSupportedAttribute( - IntegerAttributeCallback callback - ) { - readNumberOfRFIDUsersSupportedAttribute(chipClusterPtr, callback); - } - public void subscribeNumberOfRFIDUsersSupportedAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeNumberOfRFIDUsersSupportedAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readNumberOfWeekDaySchedulesSupportedPerUserAttribute( - IntegerAttributeCallback callback - ) { - readNumberOfWeekDaySchedulesSupportedPerUserAttribute(chipClusterPtr, callback); - } - public void subscribeNumberOfWeekDaySchedulesSupportedPerUserAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeNumberOfWeekDaySchedulesSupportedPerUserAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readNumberOfYearDaySchedulesSupportedPerUserAttribute( - IntegerAttributeCallback callback - ) { - readNumberOfYearDaySchedulesSupportedPerUserAttribute(chipClusterPtr, callback); - } - public void subscribeNumberOfYearDaySchedulesSupportedPerUserAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeNumberOfYearDaySchedulesSupportedPerUserAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readNumberOfHolidaySchedulesSupportedAttribute( - IntegerAttributeCallback callback - ) { - readNumberOfHolidaySchedulesSupportedAttribute(chipClusterPtr, callback); - } - public void subscribeNumberOfHolidaySchedulesSupportedAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeNumberOfHolidaySchedulesSupportedAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readMaxPINCodeLengthAttribute( - IntegerAttributeCallback callback - ) { - readMaxPINCodeLengthAttribute(chipClusterPtr, callback); - } - public void subscribeMaxPINCodeLengthAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeMaxPINCodeLengthAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readMinPINCodeLengthAttribute( - IntegerAttributeCallback callback - ) { - readMinPINCodeLengthAttribute(chipClusterPtr, callback); - } - public void subscribeMinPINCodeLengthAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeMinPINCodeLengthAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readMaxRFIDCodeLengthAttribute( - IntegerAttributeCallback callback - ) { - readMaxRFIDCodeLengthAttribute(chipClusterPtr, callback); - } - public void subscribeMaxRFIDCodeLengthAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeMaxRFIDCodeLengthAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readMinRFIDCodeLengthAttribute( - IntegerAttributeCallback callback - ) { - readMinRFIDCodeLengthAttribute(chipClusterPtr, callback); - } - public void subscribeMinRFIDCodeLengthAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeMinRFIDCodeLengthAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readCredentialRulesSupportAttribute( - IntegerAttributeCallback callback - ) { - readCredentialRulesSupportAttribute(chipClusterPtr, callback); - } - public void subscribeCredentialRulesSupportAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeCredentialRulesSupportAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readNumberOfCredentialsSupportedPerUserAttribute( - IntegerAttributeCallback callback - ) { - readNumberOfCredentialsSupportedPerUserAttribute(chipClusterPtr, callback); - } - public void subscribeNumberOfCredentialsSupportedPerUserAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeNumberOfCredentialsSupportedPerUserAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readLanguageAttribute( - CharStringAttributeCallback callback - ) { - readLanguageAttribute(chipClusterPtr, callback); - } - public void writeLanguageAttribute(DefaultClusterCallback callback, String value) { - writeLanguageAttribute(chipClusterPtr, callback, value, null); - } - - public void writeLanguageAttribute(DefaultClusterCallback callback, String value, int timedWriteTimeoutMs) { - writeLanguageAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeLanguageAttribute( - CharStringAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeLanguageAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readLEDSettingsAttribute( - IntegerAttributeCallback callback - ) { - readLEDSettingsAttribute(chipClusterPtr, callback); - } - public void writeLEDSettingsAttribute(DefaultClusterCallback callback, Integer value) { - writeLEDSettingsAttribute(chipClusterPtr, callback, value, null); - } - - public void writeLEDSettingsAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeLEDSettingsAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeLEDSettingsAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeLEDSettingsAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAutoRelockTimeAttribute( - LongAttributeCallback callback - ) { - readAutoRelockTimeAttribute(chipClusterPtr, callback); - } - public void writeAutoRelockTimeAttribute(DefaultClusterCallback callback, Long value) { - writeAutoRelockTimeAttribute(chipClusterPtr, callback, value, null); - } - - public void writeAutoRelockTimeAttribute(DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { - writeAutoRelockTimeAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeAutoRelockTimeAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeAutoRelockTimeAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readSoundVolumeAttribute( - IntegerAttributeCallback callback - ) { - readSoundVolumeAttribute(chipClusterPtr, callback); - } - public void writeSoundVolumeAttribute(DefaultClusterCallback callback, Integer value) { - writeSoundVolumeAttribute(chipClusterPtr, callback, value, null); - } - - public void writeSoundVolumeAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeSoundVolumeAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeSoundVolumeAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeSoundVolumeAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readOperatingModeAttribute( - IntegerAttributeCallback callback - ) { - readOperatingModeAttribute(chipClusterPtr, callback); - } - public void writeOperatingModeAttribute(DefaultClusterCallback callback, Integer value) { - writeOperatingModeAttribute(chipClusterPtr, callback, value, null); - } - - public void writeOperatingModeAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeOperatingModeAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeOperatingModeAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeOperatingModeAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readSupportedOperatingModesAttribute( - IntegerAttributeCallback callback - ) { - readSupportedOperatingModesAttribute(chipClusterPtr, callback); - } - public void subscribeSupportedOperatingModesAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeSupportedOperatingModesAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readDefaultConfigurationRegisterAttribute( - IntegerAttributeCallback callback - ) { - readDefaultConfigurationRegisterAttribute(chipClusterPtr, callback); - } - public void subscribeDefaultConfigurationRegisterAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeDefaultConfigurationRegisterAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readEnableLocalProgrammingAttribute( - BooleanAttributeCallback callback - ) { - readEnableLocalProgrammingAttribute(chipClusterPtr, callback); - } - public void writeEnableLocalProgrammingAttribute(DefaultClusterCallback callback, Boolean value) { - writeEnableLocalProgrammingAttribute(chipClusterPtr, callback, value, null); - } - - public void writeEnableLocalProgrammingAttribute(DefaultClusterCallback callback, Boolean value, int timedWriteTimeoutMs) { - writeEnableLocalProgrammingAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeEnableLocalProgrammingAttribute( - BooleanAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeEnableLocalProgrammingAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readEnableOneTouchLockingAttribute( - BooleanAttributeCallback callback - ) { - readEnableOneTouchLockingAttribute(chipClusterPtr, callback); - } - public void writeEnableOneTouchLockingAttribute(DefaultClusterCallback callback, Boolean value) { - writeEnableOneTouchLockingAttribute(chipClusterPtr, callback, value, null); - } - - public void writeEnableOneTouchLockingAttribute(DefaultClusterCallback callback, Boolean value, int timedWriteTimeoutMs) { - writeEnableOneTouchLockingAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeEnableOneTouchLockingAttribute( - BooleanAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeEnableOneTouchLockingAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readEnableInsideStatusLEDAttribute( - BooleanAttributeCallback callback - ) { - readEnableInsideStatusLEDAttribute(chipClusterPtr, callback); - } - public void writeEnableInsideStatusLEDAttribute(DefaultClusterCallback callback, Boolean value) { - writeEnableInsideStatusLEDAttribute(chipClusterPtr, callback, value, null); - } - - public void writeEnableInsideStatusLEDAttribute(DefaultClusterCallback callback, Boolean value, int timedWriteTimeoutMs) { - writeEnableInsideStatusLEDAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeEnableInsideStatusLEDAttribute( - BooleanAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeEnableInsideStatusLEDAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readEnablePrivacyModeButtonAttribute( - BooleanAttributeCallback callback - ) { - readEnablePrivacyModeButtonAttribute(chipClusterPtr, callback); - } - public void writeEnablePrivacyModeButtonAttribute(DefaultClusterCallback callback, Boolean value) { - writeEnablePrivacyModeButtonAttribute(chipClusterPtr, callback, value, null); - } - - public void writeEnablePrivacyModeButtonAttribute(DefaultClusterCallback callback, Boolean value, int timedWriteTimeoutMs) { - writeEnablePrivacyModeButtonAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeEnablePrivacyModeButtonAttribute( - BooleanAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeEnablePrivacyModeButtonAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readLocalProgrammingFeaturesAttribute( - IntegerAttributeCallback callback - ) { - readLocalProgrammingFeaturesAttribute(chipClusterPtr, callback); - } - public void writeLocalProgrammingFeaturesAttribute(DefaultClusterCallback callback, Integer value) { - writeLocalProgrammingFeaturesAttribute(chipClusterPtr, callback, value, null); - } - - public void writeLocalProgrammingFeaturesAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeLocalProgrammingFeaturesAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeLocalProgrammingFeaturesAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeLocalProgrammingFeaturesAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readWrongCodeEntryLimitAttribute( - IntegerAttributeCallback callback - ) { - readWrongCodeEntryLimitAttribute(chipClusterPtr, callback); - } - public void writeWrongCodeEntryLimitAttribute(DefaultClusterCallback callback, Integer value) { - writeWrongCodeEntryLimitAttribute(chipClusterPtr, callback, value, null); - } - - public void writeWrongCodeEntryLimitAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeWrongCodeEntryLimitAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeWrongCodeEntryLimitAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeWrongCodeEntryLimitAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readUserCodeTemporaryDisableTimeAttribute( - IntegerAttributeCallback callback - ) { - readUserCodeTemporaryDisableTimeAttribute(chipClusterPtr, callback); - } - public void writeUserCodeTemporaryDisableTimeAttribute(DefaultClusterCallback callback, Integer value) { - writeUserCodeTemporaryDisableTimeAttribute(chipClusterPtr, callback, value, null); - } - - public void writeUserCodeTemporaryDisableTimeAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeUserCodeTemporaryDisableTimeAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeUserCodeTemporaryDisableTimeAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeUserCodeTemporaryDisableTimeAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readSendPINOverTheAirAttribute( - BooleanAttributeCallback callback - ) { - readSendPINOverTheAirAttribute(chipClusterPtr, callback); - } - public void writeSendPINOverTheAirAttribute(DefaultClusterCallback callback, Boolean value) { - writeSendPINOverTheAirAttribute(chipClusterPtr, callback, value, null); - } - - public void writeSendPINOverTheAirAttribute(DefaultClusterCallback callback, Boolean value, int timedWriteTimeoutMs) { - writeSendPINOverTheAirAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeSendPINOverTheAirAttribute( - BooleanAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeSendPINOverTheAirAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readRequirePINforRemoteOperationAttribute( - BooleanAttributeCallback callback - ) { - readRequirePINforRemoteOperationAttribute(chipClusterPtr, callback); - } - public void writeRequirePINforRemoteOperationAttribute(DefaultClusterCallback callback, Boolean value) { - writeRequirePINforRemoteOperationAttribute(chipClusterPtr, callback, value, null); - } - - public void writeRequirePINforRemoteOperationAttribute(DefaultClusterCallback callback, Boolean value, int timedWriteTimeoutMs) { - writeRequirePINforRemoteOperationAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeRequirePINforRemoteOperationAttribute( - BooleanAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeRequirePINforRemoteOperationAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readExpiringUserTimeoutAttribute( - IntegerAttributeCallback callback - ) { - readExpiringUserTimeoutAttribute(chipClusterPtr, callback); - } - public void writeExpiringUserTimeoutAttribute(DefaultClusterCallback callback, Integer value) { - writeExpiringUserTimeoutAttribute(chipClusterPtr, callback, value, null); - } - - public void writeExpiringUserTimeoutAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeExpiringUserTimeoutAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeExpiringUserTimeoutAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeExpiringUserTimeoutAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - ) { - readGeneratedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - ) { - readAcceptedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readEventListAttribute( - EventListAttributeCallback callback - ) { - readEventListAttribute(chipClusterPtr, callback); - } - public void subscribeEventListAttribute( - EventListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAttributeListAttribute( - AttributeListAttributeCallback callback - ) { - readAttributeListAttribute(chipClusterPtr, callback); - } - public void subscribeAttributeListAttribute( - AttributeListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readFeatureMapAttribute( - LongAttributeCallback callback - ) { - readFeatureMapAttribute(chipClusterPtr, callback); - } - public void subscribeFeatureMapAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readClusterRevisionAttribute( - IntegerAttributeCallback callback - ) { - readClusterRevisionAttribute(chipClusterPtr, callback); - } - public void subscribeClusterRevisionAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - private native void readLockStateAttribute(long chipClusterPtr, - LockStateAttributeCallback callback - ); - private native void subscribeLockStateAttribute(long chipClusterPtr, - LockStateAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readLockTypeAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeLockTypeAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readActuatorEnabledAttribute(long chipClusterPtr, - BooleanAttributeCallback callback - ); - private native void subscribeActuatorEnabledAttribute(long chipClusterPtr, - BooleanAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readDoorStateAttribute(long chipClusterPtr, - DoorStateAttributeCallback callback - ); - private native void subscribeDoorStateAttribute(long chipClusterPtr, - DoorStateAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readDoorOpenEventsAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - - private native void writeDoorOpenEventsAttribute(long chipClusterPtr, DefaultClusterCallback callback, Long value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeDoorOpenEventsAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readDoorClosedEventsAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - - private native void writeDoorClosedEventsAttribute(long chipClusterPtr, DefaultClusterCallback callback, Long value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeDoorClosedEventsAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readOpenPeriodAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - - private native void writeOpenPeriodAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeOpenPeriodAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readNumberOfTotalUsersSupportedAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeNumberOfTotalUsersSupportedAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readNumberOfPINUsersSupportedAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeNumberOfPINUsersSupportedAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readNumberOfRFIDUsersSupportedAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeNumberOfRFIDUsersSupportedAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readNumberOfWeekDaySchedulesSupportedPerUserAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeNumberOfWeekDaySchedulesSupportedPerUserAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readNumberOfYearDaySchedulesSupportedPerUserAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeNumberOfYearDaySchedulesSupportedPerUserAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readNumberOfHolidaySchedulesSupportedAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeNumberOfHolidaySchedulesSupportedAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readMaxPINCodeLengthAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeMaxPINCodeLengthAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readMinPINCodeLengthAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeMinPINCodeLengthAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readMaxRFIDCodeLengthAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeMaxRFIDCodeLengthAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readMinRFIDCodeLengthAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeMinRFIDCodeLengthAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readCredentialRulesSupportAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeCredentialRulesSupportAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readNumberOfCredentialsSupportedPerUserAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeNumberOfCredentialsSupportedPerUserAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readLanguageAttribute(long chipClusterPtr, - CharStringAttributeCallback callback - ); - - private native void writeLanguageAttribute(long chipClusterPtr, DefaultClusterCallback callback, String value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeLanguageAttribute(long chipClusterPtr, - CharStringAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readLEDSettingsAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - - private native void writeLEDSettingsAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeLEDSettingsAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readAutoRelockTimeAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - - private native void writeAutoRelockTimeAttribute(long chipClusterPtr, DefaultClusterCallback callback, Long value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeAutoRelockTimeAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readSoundVolumeAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - - private native void writeSoundVolumeAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeSoundVolumeAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readOperatingModeAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - - private native void writeOperatingModeAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeOperatingModeAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readSupportedOperatingModesAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeSupportedOperatingModesAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readDefaultConfigurationRegisterAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeDefaultConfigurationRegisterAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readEnableLocalProgrammingAttribute(long chipClusterPtr, - BooleanAttributeCallback callback - ); - - private native void writeEnableLocalProgrammingAttribute(long chipClusterPtr, DefaultClusterCallback callback, Boolean value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeEnableLocalProgrammingAttribute(long chipClusterPtr, - BooleanAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readEnableOneTouchLockingAttribute(long chipClusterPtr, - BooleanAttributeCallback callback - ); - - private native void writeEnableOneTouchLockingAttribute(long chipClusterPtr, DefaultClusterCallback callback, Boolean value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeEnableOneTouchLockingAttribute(long chipClusterPtr, - BooleanAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readEnableInsideStatusLEDAttribute(long chipClusterPtr, - BooleanAttributeCallback callback - ); - - private native void writeEnableInsideStatusLEDAttribute(long chipClusterPtr, DefaultClusterCallback callback, Boolean value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeEnableInsideStatusLEDAttribute(long chipClusterPtr, - BooleanAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readEnablePrivacyModeButtonAttribute(long chipClusterPtr, - BooleanAttributeCallback callback - ); - - private native void writeEnablePrivacyModeButtonAttribute(long chipClusterPtr, DefaultClusterCallback callback, Boolean value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeEnablePrivacyModeButtonAttribute(long chipClusterPtr, - BooleanAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readLocalProgrammingFeaturesAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - - private native void writeLocalProgrammingFeaturesAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeLocalProgrammingFeaturesAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readWrongCodeEntryLimitAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - - private native void writeWrongCodeEntryLimitAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeWrongCodeEntryLimitAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readUserCodeTemporaryDisableTimeAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - - private native void writeUserCodeTemporaryDisableTimeAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeUserCodeTemporaryDisableTimeAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readSendPINOverTheAirAttribute(long chipClusterPtr, - BooleanAttributeCallback callback - ); - - private native void writeSendPINOverTheAirAttribute(long chipClusterPtr, DefaultClusterCallback callback, Boolean value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeSendPINOverTheAirAttribute(long chipClusterPtr, - BooleanAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readRequirePINforRemoteOperationAttribute(long chipClusterPtr, - BooleanAttributeCallback callback - ); - - private native void writeRequirePINforRemoteOperationAttribute(long chipClusterPtr, DefaultClusterCallback callback, Boolean value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeRequirePINforRemoteOperationAttribute(long chipClusterPtr, - BooleanAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readExpiringUserTimeoutAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - - private native void writeExpiringUserTimeoutAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeExpiringUserTimeoutAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - ); - private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - ); - private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - ); - private native void subscribeEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - ); - private native void subscribeAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - } - - public static class WindowCoveringCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 0x00000102L; - - public WindowCoveringCluster(long devicePtr, int endpointId) { - super(devicePtr, endpointId); - } - - @Override - public native long initWithDevice(long devicePtr, int endpointId); - - public void upOrOpen(DefaultClusterCallback callback - ) { - upOrOpen(chipClusterPtr, callback, null); - } - - public void upOrOpen(DefaultClusterCallback callback - - , int timedInvokeTimeoutMs) { - upOrOpen(chipClusterPtr, callback, timedInvokeTimeoutMs); - } - - public void downOrClose(DefaultClusterCallback callback - ) { - downOrClose(chipClusterPtr, callback, null); - } - - public void downOrClose(DefaultClusterCallback callback - - , int timedInvokeTimeoutMs) { - downOrClose(chipClusterPtr, callback, timedInvokeTimeoutMs); - } - - public void stopMotion(DefaultClusterCallback callback - ) { - stopMotion(chipClusterPtr, callback, null); - } - - public void stopMotion(DefaultClusterCallback callback - - , int timedInvokeTimeoutMs) { - stopMotion(chipClusterPtr, callback, timedInvokeTimeoutMs); - } - - public void goToLiftValue(DefaultClusterCallback callback - , Integer liftValue) { - goToLiftValue(chipClusterPtr, callback, liftValue, null); - } - - public void goToLiftValue(DefaultClusterCallback callback - , Integer liftValue - , int timedInvokeTimeoutMs) { - goToLiftValue(chipClusterPtr, callback, liftValue, timedInvokeTimeoutMs); - } - - public void goToLiftPercentage(DefaultClusterCallback callback - , Integer liftPercent100thsValue) { - goToLiftPercentage(chipClusterPtr, callback, liftPercent100thsValue, null); - } - - public void goToLiftPercentage(DefaultClusterCallback callback - , Integer liftPercent100thsValue - , int timedInvokeTimeoutMs) { - goToLiftPercentage(chipClusterPtr, callback, liftPercent100thsValue, timedInvokeTimeoutMs); - } - - public void goToTiltValue(DefaultClusterCallback callback - , Integer tiltValue) { - goToTiltValue(chipClusterPtr, callback, tiltValue, null); - } - - public void goToTiltValue(DefaultClusterCallback callback - , Integer tiltValue - , int timedInvokeTimeoutMs) { - goToTiltValue(chipClusterPtr, callback, tiltValue, timedInvokeTimeoutMs); - } - - public void goToTiltPercentage(DefaultClusterCallback callback - , Integer tiltPercent100thsValue) { - goToTiltPercentage(chipClusterPtr, callback, tiltPercent100thsValue, null); - } - - public void goToTiltPercentage(DefaultClusterCallback callback - , Integer tiltPercent100thsValue - , int timedInvokeTimeoutMs) { - goToTiltPercentage(chipClusterPtr, callback, tiltPercent100thsValue, timedInvokeTimeoutMs); - } - private native void upOrOpen(long chipClusterPtr, DefaultClusterCallback Callback - - , @Nullable Integer timedInvokeTimeoutMs); - private native void downOrClose(long chipClusterPtr, DefaultClusterCallback Callback - - , @Nullable Integer timedInvokeTimeoutMs); - private native void stopMotion(long chipClusterPtr, DefaultClusterCallback Callback - - , @Nullable Integer timedInvokeTimeoutMs); - private native void goToLiftValue(long chipClusterPtr, DefaultClusterCallback Callback - , Integer liftValue - , @Nullable Integer timedInvokeTimeoutMs); - private native void goToLiftPercentage(long chipClusterPtr, DefaultClusterCallback Callback - , Integer liftPercent100thsValue - , @Nullable Integer timedInvokeTimeoutMs); - private native void goToTiltValue(long chipClusterPtr, DefaultClusterCallback Callback - , Integer tiltValue - , @Nullable Integer timedInvokeTimeoutMs); - private native void goToTiltPercentage(long chipClusterPtr, DefaultClusterCallback Callback - , Integer tiltPercent100thsValue - , @Nullable Integer timedInvokeTimeoutMs); - - public interface CurrentPositionLiftAttributeCallback { - void onSuccess(@Nullable Integer value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface CurrentPositionTiltAttributeCallback { - void onSuccess(@Nullable Integer value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface CurrentPositionLiftPercentageAttributeCallback { - void onSuccess(@Nullable Integer value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface CurrentPositionTiltPercentageAttributeCallback { - void onSuccess(@Nullable Integer value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface TargetPositionLiftPercent100thsAttributeCallback { - void onSuccess(@Nullable Integer value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface TargetPositionTiltPercent100thsAttributeCallback { - void onSuccess(@Nullable Integer value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface CurrentPositionLiftPercent100thsAttributeCallback { - void onSuccess(@Nullable Integer value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface CurrentPositionTiltPercent100thsAttributeCallback { - void onSuccess(@Nullable Integer value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface GeneratedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AcceptedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface EventListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AttributeListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - - public void readTypeAttribute( - IntegerAttributeCallback callback - ) { - readTypeAttribute(chipClusterPtr, callback); - } - public void subscribeTypeAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeTypeAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readPhysicalClosedLimitLiftAttribute( - IntegerAttributeCallback callback - ) { - readPhysicalClosedLimitLiftAttribute(chipClusterPtr, callback); - } - public void subscribePhysicalClosedLimitLiftAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribePhysicalClosedLimitLiftAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readPhysicalClosedLimitTiltAttribute( - IntegerAttributeCallback callback - ) { - readPhysicalClosedLimitTiltAttribute(chipClusterPtr, callback); - } - public void subscribePhysicalClosedLimitTiltAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribePhysicalClosedLimitTiltAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readCurrentPositionLiftAttribute( - CurrentPositionLiftAttributeCallback callback - ) { - readCurrentPositionLiftAttribute(chipClusterPtr, callback); - } - public void subscribeCurrentPositionLiftAttribute( - CurrentPositionLiftAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeCurrentPositionLiftAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readCurrentPositionTiltAttribute( - CurrentPositionTiltAttributeCallback callback - ) { - readCurrentPositionTiltAttribute(chipClusterPtr, callback); - } - public void subscribeCurrentPositionTiltAttribute( - CurrentPositionTiltAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeCurrentPositionTiltAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readNumberOfActuationsLiftAttribute( - IntegerAttributeCallback callback - ) { - readNumberOfActuationsLiftAttribute(chipClusterPtr, callback); - } - public void subscribeNumberOfActuationsLiftAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeNumberOfActuationsLiftAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readNumberOfActuationsTiltAttribute( - IntegerAttributeCallback callback - ) { - readNumberOfActuationsTiltAttribute(chipClusterPtr, callback); - } - public void subscribeNumberOfActuationsTiltAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeNumberOfActuationsTiltAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readConfigStatusAttribute( - IntegerAttributeCallback callback - ) { - readConfigStatusAttribute(chipClusterPtr, callback); - } - public void subscribeConfigStatusAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeConfigStatusAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readCurrentPositionLiftPercentageAttribute( - CurrentPositionLiftPercentageAttributeCallback callback - ) { - readCurrentPositionLiftPercentageAttribute(chipClusterPtr, callback); - } - public void subscribeCurrentPositionLiftPercentageAttribute( - CurrentPositionLiftPercentageAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeCurrentPositionLiftPercentageAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readCurrentPositionTiltPercentageAttribute( - CurrentPositionTiltPercentageAttributeCallback callback - ) { - readCurrentPositionTiltPercentageAttribute(chipClusterPtr, callback); - } - public void subscribeCurrentPositionTiltPercentageAttribute( - CurrentPositionTiltPercentageAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeCurrentPositionTiltPercentageAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readOperationalStatusAttribute( - IntegerAttributeCallback callback - ) { - readOperationalStatusAttribute(chipClusterPtr, callback); - } - public void subscribeOperationalStatusAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeOperationalStatusAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readTargetPositionLiftPercent100thsAttribute( - TargetPositionLiftPercent100thsAttributeCallback callback - ) { - readTargetPositionLiftPercent100thsAttribute(chipClusterPtr, callback); - } - public void subscribeTargetPositionLiftPercent100thsAttribute( - TargetPositionLiftPercent100thsAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeTargetPositionLiftPercent100thsAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readTargetPositionTiltPercent100thsAttribute( - TargetPositionTiltPercent100thsAttributeCallback callback - ) { - readTargetPositionTiltPercent100thsAttribute(chipClusterPtr, callback); - } - public void subscribeTargetPositionTiltPercent100thsAttribute( - TargetPositionTiltPercent100thsAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeTargetPositionTiltPercent100thsAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readEndProductTypeAttribute( - IntegerAttributeCallback callback - ) { - readEndProductTypeAttribute(chipClusterPtr, callback); - } - public void subscribeEndProductTypeAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeEndProductTypeAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readCurrentPositionLiftPercent100thsAttribute( - CurrentPositionLiftPercent100thsAttributeCallback callback - ) { - readCurrentPositionLiftPercent100thsAttribute(chipClusterPtr, callback); - } - public void subscribeCurrentPositionLiftPercent100thsAttribute( - CurrentPositionLiftPercent100thsAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeCurrentPositionLiftPercent100thsAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readCurrentPositionTiltPercent100thsAttribute( - CurrentPositionTiltPercent100thsAttributeCallback callback - ) { - readCurrentPositionTiltPercent100thsAttribute(chipClusterPtr, callback); - } - public void subscribeCurrentPositionTiltPercent100thsAttribute( - CurrentPositionTiltPercent100thsAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeCurrentPositionTiltPercent100thsAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readInstalledOpenLimitLiftAttribute( - IntegerAttributeCallback callback - ) { - readInstalledOpenLimitLiftAttribute(chipClusterPtr, callback); - } - public void subscribeInstalledOpenLimitLiftAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeInstalledOpenLimitLiftAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readInstalledClosedLimitLiftAttribute( - IntegerAttributeCallback callback - ) { - readInstalledClosedLimitLiftAttribute(chipClusterPtr, callback); - } - public void subscribeInstalledClosedLimitLiftAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeInstalledClosedLimitLiftAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readInstalledOpenLimitTiltAttribute( - IntegerAttributeCallback callback - ) { - readInstalledOpenLimitTiltAttribute(chipClusterPtr, callback); - } - public void subscribeInstalledOpenLimitTiltAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeInstalledOpenLimitTiltAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readInstalledClosedLimitTiltAttribute( - IntegerAttributeCallback callback - ) { - readInstalledClosedLimitTiltAttribute(chipClusterPtr, callback); - } - public void subscribeInstalledClosedLimitTiltAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeInstalledClosedLimitTiltAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readModeAttribute( - IntegerAttributeCallback callback - ) { - readModeAttribute(chipClusterPtr, callback); - } - public void writeModeAttribute(DefaultClusterCallback callback, Integer value) { - writeModeAttribute(chipClusterPtr, callback, value, null); - } - - public void writeModeAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeModeAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeModeAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeModeAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readSafetyStatusAttribute( - IntegerAttributeCallback callback - ) { - readSafetyStatusAttribute(chipClusterPtr, callback); - } - public void subscribeSafetyStatusAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeSafetyStatusAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - ) { - readGeneratedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - ) { - readAcceptedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readEventListAttribute( - EventListAttributeCallback callback - ) { - readEventListAttribute(chipClusterPtr, callback); - } - public void subscribeEventListAttribute( - EventListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAttributeListAttribute( - AttributeListAttributeCallback callback - ) { - readAttributeListAttribute(chipClusterPtr, callback); - } - public void subscribeAttributeListAttribute( - AttributeListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readFeatureMapAttribute( - LongAttributeCallback callback - ) { - readFeatureMapAttribute(chipClusterPtr, callback); - } - public void subscribeFeatureMapAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readClusterRevisionAttribute( - IntegerAttributeCallback callback - ) { - readClusterRevisionAttribute(chipClusterPtr, callback); - } - public void subscribeClusterRevisionAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - private native void readTypeAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeTypeAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readPhysicalClosedLimitLiftAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribePhysicalClosedLimitLiftAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readPhysicalClosedLimitTiltAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribePhysicalClosedLimitTiltAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readCurrentPositionLiftAttribute(long chipClusterPtr, - CurrentPositionLiftAttributeCallback callback - ); - private native void subscribeCurrentPositionLiftAttribute(long chipClusterPtr, - CurrentPositionLiftAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readCurrentPositionTiltAttribute(long chipClusterPtr, - CurrentPositionTiltAttributeCallback callback - ); - private native void subscribeCurrentPositionTiltAttribute(long chipClusterPtr, - CurrentPositionTiltAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readNumberOfActuationsLiftAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeNumberOfActuationsLiftAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readNumberOfActuationsTiltAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeNumberOfActuationsTiltAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readConfigStatusAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeConfigStatusAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readCurrentPositionLiftPercentageAttribute(long chipClusterPtr, - CurrentPositionLiftPercentageAttributeCallback callback - ); - private native void subscribeCurrentPositionLiftPercentageAttribute(long chipClusterPtr, - CurrentPositionLiftPercentageAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readCurrentPositionTiltPercentageAttribute(long chipClusterPtr, - CurrentPositionTiltPercentageAttributeCallback callback - ); - private native void subscribeCurrentPositionTiltPercentageAttribute(long chipClusterPtr, - CurrentPositionTiltPercentageAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readOperationalStatusAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeOperationalStatusAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readTargetPositionLiftPercent100thsAttribute(long chipClusterPtr, - TargetPositionLiftPercent100thsAttributeCallback callback - ); - private native void subscribeTargetPositionLiftPercent100thsAttribute(long chipClusterPtr, - TargetPositionLiftPercent100thsAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readTargetPositionTiltPercent100thsAttribute(long chipClusterPtr, - TargetPositionTiltPercent100thsAttributeCallback callback - ); - private native void subscribeTargetPositionTiltPercent100thsAttribute(long chipClusterPtr, - TargetPositionTiltPercent100thsAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readEndProductTypeAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeEndProductTypeAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readCurrentPositionLiftPercent100thsAttribute(long chipClusterPtr, - CurrentPositionLiftPercent100thsAttributeCallback callback - ); - private native void subscribeCurrentPositionLiftPercent100thsAttribute(long chipClusterPtr, - CurrentPositionLiftPercent100thsAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readCurrentPositionTiltPercent100thsAttribute(long chipClusterPtr, - CurrentPositionTiltPercent100thsAttributeCallback callback - ); - private native void subscribeCurrentPositionTiltPercent100thsAttribute(long chipClusterPtr, - CurrentPositionTiltPercent100thsAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readInstalledOpenLimitLiftAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeInstalledOpenLimitLiftAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readInstalledClosedLimitLiftAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeInstalledClosedLimitLiftAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readInstalledOpenLimitTiltAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeInstalledOpenLimitTiltAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readInstalledClosedLimitTiltAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeInstalledClosedLimitTiltAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readModeAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - - private native void writeModeAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeModeAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readSafetyStatusAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeSafetyStatusAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - ); - private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - ); - private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - ); - private native void subscribeEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - ); - private native void subscribeAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - } - - public static class BarrierControlCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 0x00000103L; - - public BarrierControlCluster(long devicePtr, int endpointId) { - super(devicePtr, endpointId); - } - - @Override - public native long initWithDevice(long devicePtr, int endpointId); - - public void barrierControlGoToPercent(DefaultClusterCallback callback - , Integer percentOpen) { - barrierControlGoToPercent(chipClusterPtr, callback, percentOpen, null); - } - - public void barrierControlGoToPercent(DefaultClusterCallback callback - , Integer percentOpen - , int timedInvokeTimeoutMs) { - barrierControlGoToPercent(chipClusterPtr, callback, percentOpen, timedInvokeTimeoutMs); - } - - public void barrierControlStop(DefaultClusterCallback callback - ) { - barrierControlStop(chipClusterPtr, callback, null); - } - - public void barrierControlStop(DefaultClusterCallback callback - - , int timedInvokeTimeoutMs) { - barrierControlStop(chipClusterPtr, callback, timedInvokeTimeoutMs); - } - private native void barrierControlGoToPercent(long chipClusterPtr, DefaultClusterCallback Callback - , Integer percentOpen - , @Nullable Integer timedInvokeTimeoutMs); - private native void barrierControlStop(long chipClusterPtr, DefaultClusterCallback Callback - - , @Nullable Integer timedInvokeTimeoutMs); - - public interface GeneratedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AcceptedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface EventListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AttributeListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - - public void readBarrierMovingStateAttribute( - IntegerAttributeCallback callback - ) { - readBarrierMovingStateAttribute(chipClusterPtr, callback); - } - public void subscribeBarrierMovingStateAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeBarrierMovingStateAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readBarrierSafetyStatusAttribute( - IntegerAttributeCallback callback - ) { - readBarrierSafetyStatusAttribute(chipClusterPtr, callback); - } - public void subscribeBarrierSafetyStatusAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeBarrierSafetyStatusAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readBarrierCapabilitiesAttribute( - IntegerAttributeCallback callback - ) { - readBarrierCapabilitiesAttribute(chipClusterPtr, callback); - } - public void subscribeBarrierCapabilitiesAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeBarrierCapabilitiesAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readBarrierOpenEventsAttribute( - IntegerAttributeCallback callback - ) { - readBarrierOpenEventsAttribute(chipClusterPtr, callback); - } - public void writeBarrierOpenEventsAttribute(DefaultClusterCallback callback, Integer value) { - writeBarrierOpenEventsAttribute(chipClusterPtr, callback, value, null); - } - - public void writeBarrierOpenEventsAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeBarrierOpenEventsAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeBarrierOpenEventsAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeBarrierOpenEventsAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readBarrierCloseEventsAttribute( - IntegerAttributeCallback callback - ) { - readBarrierCloseEventsAttribute(chipClusterPtr, callback); - } - public void writeBarrierCloseEventsAttribute(DefaultClusterCallback callback, Integer value) { - writeBarrierCloseEventsAttribute(chipClusterPtr, callback, value, null); - } - - public void writeBarrierCloseEventsAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeBarrierCloseEventsAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeBarrierCloseEventsAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeBarrierCloseEventsAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readBarrierCommandOpenEventsAttribute( - IntegerAttributeCallback callback - ) { - readBarrierCommandOpenEventsAttribute(chipClusterPtr, callback); - } - public void writeBarrierCommandOpenEventsAttribute(DefaultClusterCallback callback, Integer value) { - writeBarrierCommandOpenEventsAttribute(chipClusterPtr, callback, value, null); - } - - public void writeBarrierCommandOpenEventsAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeBarrierCommandOpenEventsAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeBarrierCommandOpenEventsAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeBarrierCommandOpenEventsAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readBarrierCommandCloseEventsAttribute( - IntegerAttributeCallback callback - ) { - readBarrierCommandCloseEventsAttribute(chipClusterPtr, callback); - } - public void writeBarrierCommandCloseEventsAttribute(DefaultClusterCallback callback, Integer value) { - writeBarrierCommandCloseEventsAttribute(chipClusterPtr, callback, value, null); - } - - public void writeBarrierCommandCloseEventsAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeBarrierCommandCloseEventsAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeBarrierCommandCloseEventsAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeBarrierCommandCloseEventsAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readBarrierOpenPeriodAttribute( - IntegerAttributeCallback callback - ) { - readBarrierOpenPeriodAttribute(chipClusterPtr, callback); - } - public void writeBarrierOpenPeriodAttribute(DefaultClusterCallback callback, Integer value) { - writeBarrierOpenPeriodAttribute(chipClusterPtr, callback, value, null); - } - - public void writeBarrierOpenPeriodAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeBarrierOpenPeriodAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeBarrierOpenPeriodAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeBarrierOpenPeriodAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readBarrierClosePeriodAttribute( - IntegerAttributeCallback callback - ) { - readBarrierClosePeriodAttribute(chipClusterPtr, callback); - } - public void writeBarrierClosePeriodAttribute(DefaultClusterCallback callback, Integer value) { - writeBarrierClosePeriodAttribute(chipClusterPtr, callback, value, null); - } - - public void writeBarrierClosePeriodAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeBarrierClosePeriodAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeBarrierClosePeriodAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeBarrierClosePeriodAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readBarrierPositionAttribute( - IntegerAttributeCallback callback - ) { - readBarrierPositionAttribute(chipClusterPtr, callback); - } - public void subscribeBarrierPositionAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeBarrierPositionAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - ) { - readGeneratedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - ) { - readAcceptedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readEventListAttribute( - EventListAttributeCallback callback - ) { - readEventListAttribute(chipClusterPtr, callback); - } - public void subscribeEventListAttribute( - EventListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAttributeListAttribute( - AttributeListAttributeCallback callback - ) { - readAttributeListAttribute(chipClusterPtr, callback); - } - public void subscribeAttributeListAttribute( - AttributeListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readFeatureMapAttribute( - LongAttributeCallback callback - ) { - readFeatureMapAttribute(chipClusterPtr, callback); - } - public void subscribeFeatureMapAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readClusterRevisionAttribute( - IntegerAttributeCallback callback - ) { - readClusterRevisionAttribute(chipClusterPtr, callback); - } - public void subscribeClusterRevisionAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - private native void readBarrierMovingStateAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeBarrierMovingStateAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readBarrierSafetyStatusAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeBarrierSafetyStatusAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readBarrierCapabilitiesAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeBarrierCapabilitiesAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readBarrierOpenEventsAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - - private native void writeBarrierOpenEventsAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeBarrierOpenEventsAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readBarrierCloseEventsAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - - private native void writeBarrierCloseEventsAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeBarrierCloseEventsAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readBarrierCommandOpenEventsAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - - private native void writeBarrierCommandOpenEventsAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeBarrierCommandOpenEventsAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readBarrierCommandCloseEventsAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - - private native void writeBarrierCommandCloseEventsAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeBarrierCommandCloseEventsAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readBarrierOpenPeriodAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - - private native void writeBarrierOpenPeriodAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeBarrierOpenPeriodAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readBarrierClosePeriodAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - - private native void writeBarrierClosePeriodAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeBarrierClosePeriodAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readBarrierPositionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeBarrierPositionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - ); - private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - ); - private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - ); - private native void subscribeEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - ); - private native void subscribeAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - } - - public static class PumpConfigurationAndControlCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 0x00000200L; - - public PumpConfigurationAndControlCluster(long devicePtr, int endpointId) { - super(devicePtr, endpointId); - } - - @Override - public native long initWithDevice(long devicePtr, int endpointId); - - public interface MaxPressureAttributeCallback { - void onSuccess(@Nullable Integer value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface MaxSpeedAttributeCallback { - void onSuccess(@Nullable Integer value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface MaxFlowAttributeCallback { - void onSuccess(@Nullable Integer value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface MinConstPressureAttributeCallback { - void onSuccess(@Nullable Integer value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface MaxConstPressureAttributeCallback { - void onSuccess(@Nullable Integer value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface MinCompPressureAttributeCallback { - void onSuccess(@Nullable Integer value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface MaxCompPressureAttributeCallback { - void onSuccess(@Nullable Integer value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface MinConstSpeedAttributeCallback { - void onSuccess(@Nullable Integer value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface MaxConstSpeedAttributeCallback { - void onSuccess(@Nullable Integer value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface MinConstFlowAttributeCallback { - void onSuccess(@Nullable Integer value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface MaxConstFlowAttributeCallback { - void onSuccess(@Nullable Integer value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface MinConstTempAttributeCallback { - void onSuccess(@Nullable Integer value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface MaxConstTempAttributeCallback { - void onSuccess(@Nullable Integer value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface CapacityAttributeCallback { - void onSuccess(@Nullable Integer value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface SpeedAttributeCallback { - void onSuccess(@Nullable Integer value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface LifetimeRunningHoursAttributeCallback { - void onSuccess(@Nullable Long value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface PowerAttributeCallback { - void onSuccess(@Nullable Long value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface LifetimeEnergyConsumedAttributeCallback { - void onSuccess(@Nullable Long value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface GeneratedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AcceptedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface EventListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AttributeListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - - public void readMaxPressureAttribute( - MaxPressureAttributeCallback callback - ) { - readMaxPressureAttribute(chipClusterPtr, callback); - } - public void subscribeMaxPressureAttribute( - MaxPressureAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeMaxPressureAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readMaxSpeedAttribute( - MaxSpeedAttributeCallback callback - ) { - readMaxSpeedAttribute(chipClusterPtr, callback); - } - public void subscribeMaxSpeedAttribute( - MaxSpeedAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeMaxSpeedAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readMaxFlowAttribute( - MaxFlowAttributeCallback callback - ) { - readMaxFlowAttribute(chipClusterPtr, callback); - } - public void subscribeMaxFlowAttribute( - MaxFlowAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeMaxFlowAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readMinConstPressureAttribute( - MinConstPressureAttributeCallback callback - ) { - readMinConstPressureAttribute(chipClusterPtr, callback); - } - public void subscribeMinConstPressureAttribute( - MinConstPressureAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeMinConstPressureAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readMaxConstPressureAttribute( - MaxConstPressureAttributeCallback callback - ) { - readMaxConstPressureAttribute(chipClusterPtr, callback); - } - public void subscribeMaxConstPressureAttribute( - MaxConstPressureAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeMaxConstPressureAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readMinCompPressureAttribute( - MinCompPressureAttributeCallback callback - ) { - readMinCompPressureAttribute(chipClusterPtr, callback); - } - public void subscribeMinCompPressureAttribute( - MinCompPressureAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeMinCompPressureAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readMaxCompPressureAttribute( - MaxCompPressureAttributeCallback callback - ) { - readMaxCompPressureAttribute(chipClusterPtr, callback); - } - public void subscribeMaxCompPressureAttribute( - MaxCompPressureAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeMaxCompPressureAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readMinConstSpeedAttribute( - MinConstSpeedAttributeCallback callback - ) { - readMinConstSpeedAttribute(chipClusterPtr, callback); - } - public void subscribeMinConstSpeedAttribute( - MinConstSpeedAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeMinConstSpeedAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readMaxConstSpeedAttribute( - MaxConstSpeedAttributeCallback callback - ) { - readMaxConstSpeedAttribute(chipClusterPtr, callback); - } - public void subscribeMaxConstSpeedAttribute( - MaxConstSpeedAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeMaxConstSpeedAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readMinConstFlowAttribute( - MinConstFlowAttributeCallback callback - ) { - readMinConstFlowAttribute(chipClusterPtr, callback); - } - public void subscribeMinConstFlowAttribute( - MinConstFlowAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeMinConstFlowAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readMaxConstFlowAttribute( - MaxConstFlowAttributeCallback callback - ) { - readMaxConstFlowAttribute(chipClusterPtr, callback); - } - public void subscribeMaxConstFlowAttribute( - MaxConstFlowAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeMaxConstFlowAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readMinConstTempAttribute( - MinConstTempAttributeCallback callback - ) { - readMinConstTempAttribute(chipClusterPtr, callback); - } - public void subscribeMinConstTempAttribute( - MinConstTempAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeMinConstTempAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readMaxConstTempAttribute( - MaxConstTempAttributeCallback callback - ) { - readMaxConstTempAttribute(chipClusterPtr, callback); - } - public void subscribeMaxConstTempAttribute( - MaxConstTempAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeMaxConstTempAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readPumpStatusAttribute( - IntegerAttributeCallback callback - ) { - readPumpStatusAttribute(chipClusterPtr, callback); - } - public void subscribePumpStatusAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribePumpStatusAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readEffectiveOperationModeAttribute( - IntegerAttributeCallback callback - ) { - readEffectiveOperationModeAttribute(chipClusterPtr, callback); - } - public void subscribeEffectiveOperationModeAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeEffectiveOperationModeAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readEffectiveControlModeAttribute( - IntegerAttributeCallback callback - ) { - readEffectiveControlModeAttribute(chipClusterPtr, callback); - } - public void subscribeEffectiveControlModeAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeEffectiveControlModeAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readCapacityAttribute( - CapacityAttributeCallback callback - ) { - readCapacityAttribute(chipClusterPtr, callback); - } - public void subscribeCapacityAttribute( - CapacityAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeCapacityAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readSpeedAttribute( - SpeedAttributeCallback callback - ) { - readSpeedAttribute(chipClusterPtr, callback); - } - public void subscribeSpeedAttribute( - SpeedAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeSpeedAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readLifetimeRunningHoursAttribute( - LifetimeRunningHoursAttributeCallback callback - ) { - readLifetimeRunningHoursAttribute(chipClusterPtr, callback); - } - public void writeLifetimeRunningHoursAttribute(DefaultClusterCallback callback, Long value) { - writeLifetimeRunningHoursAttribute(chipClusterPtr, callback, value, null); - } - - public void writeLifetimeRunningHoursAttribute(DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { - writeLifetimeRunningHoursAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeLifetimeRunningHoursAttribute( - LifetimeRunningHoursAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeLifetimeRunningHoursAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readPowerAttribute( - PowerAttributeCallback callback - ) { - readPowerAttribute(chipClusterPtr, callback); - } - public void subscribePowerAttribute( - PowerAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribePowerAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readLifetimeEnergyConsumedAttribute( - LifetimeEnergyConsumedAttributeCallback callback - ) { - readLifetimeEnergyConsumedAttribute(chipClusterPtr, callback); - } - public void writeLifetimeEnergyConsumedAttribute(DefaultClusterCallback callback, Long value) { - writeLifetimeEnergyConsumedAttribute(chipClusterPtr, callback, value, null); - } - - public void writeLifetimeEnergyConsumedAttribute(DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { - writeLifetimeEnergyConsumedAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeLifetimeEnergyConsumedAttribute( - LifetimeEnergyConsumedAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeLifetimeEnergyConsumedAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readOperationModeAttribute( - IntegerAttributeCallback callback - ) { - readOperationModeAttribute(chipClusterPtr, callback); - } - public void writeOperationModeAttribute(DefaultClusterCallback callback, Integer value) { - writeOperationModeAttribute(chipClusterPtr, callback, value, null); - } - - public void writeOperationModeAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeOperationModeAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeOperationModeAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeOperationModeAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readControlModeAttribute( - IntegerAttributeCallback callback - ) { - readControlModeAttribute(chipClusterPtr, callback); - } - public void writeControlModeAttribute(DefaultClusterCallback callback, Integer value) { - writeControlModeAttribute(chipClusterPtr, callback, value, null); - } - - public void writeControlModeAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeControlModeAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeControlModeAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeControlModeAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - ) { - readGeneratedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - ) { - readAcceptedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readEventListAttribute( - EventListAttributeCallback callback - ) { - readEventListAttribute(chipClusterPtr, callback); - } - public void subscribeEventListAttribute( - EventListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAttributeListAttribute( - AttributeListAttributeCallback callback - ) { - readAttributeListAttribute(chipClusterPtr, callback); - } - public void subscribeAttributeListAttribute( - AttributeListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readFeatureMapAttribute( - LongAttributeCallback callback - ) { - readFeatureMapAttribute(chipClusterPtr, callback); - } - public void subscribeFeatureMapAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readClusterRevisionAttribute( - IntegerAttributeCallback callback - ) { - readClusterRevisionAttribute(chipClusterPtr, callback); - } - public void subscribeClusterRevisionAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - private native void readMaxPressureAttribute(long chipClusterPtr, - MaxPressureAttributeCallback callback - ); - private native void subscribeMaxPressureAttribute(long chipClusterPtr, - MaxPressureAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readMaxSpeedAttribute(long chipClusterPtr, - MaxSpeedAttributeCallback callback - ); - private native void subscribeMaxSpeedAttribute(long chipClusterPtr, - MaxSpeedAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readMaxFlowAttribute(long chipClusterPtr, - MaxFlowAttributeCallback callback - ); - private native void subscribeMaxFlowAttribute(long chipClusterPtr, - MaxFlowAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readMinConstPressureAttribute(long chipClusterPtr, - MinConstPressureAttributeCallback callback - ); - private native void subscribeMinConstPressureAttribute(long chipClusterPtr, - MinConstPressureAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readMaxConstPressureAttribute(long chipClusterPtr, - MaxConstPressureAttributeCallback callback - ); - private native void subscribeMaxConstPressureAttribute(long chipClusterPtr, - MaxConstPressureAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readMinCompPressureAttribute(long chipClusterPtr, - MinCompPressureAttributeCallback callback - ); - private native void subscribeMinCompPressureAttribute(long chipClusterPtr, - MinCompPressureAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readMaxCompPressureAttribute(long chipClusterPtr, - MaxCompPressureAttributeCallback callback - ); - private native void subscribeMaxCompPressureAttribute(long chipClusterPtr, - MaxCompPressureAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readMinConstSpeedAttribute(long chipClusterPtr, - MinConstSpeedAttributeCallback callback - ); - private native void subscribeMinConstSpeedAttribute(long chipClusterPtr, - MinConstSpeedAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readMaxConstSpeedAttribute(long chipClusterPtr, - MaxConstSpeedAttributeCallback callback - ); - private native void subscribeMaxConstSpeedAttribute(long chipClusterPtr, - MaxConstSpeedAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readMinConstFlowAttribute(long chipClusterPtr, - MinConstFlowAttributeCallback callback - ); - private native void subscribeMinConstFlowAttribute(long chipClusterPtr, - MinConstFlowAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readMaxConstFlowAttribute(long chipClusterPtr, - MaxConstFlowAttributeCallback callback - ); - private native void subscribeMaxConstFlowAttribute(long chipClusterPtr, - MaxConstFlowAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readMinConstTempAttribute(long chipClusterPtr, - MinConstTempAttributeCallback callback - ); - private native void subscribeMinConstTempAttribute(long chipClusterPtr, - MinConstTempAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readMaxConstTempAttribute(long chipClusterPtr, - MaxConstTempAttributeCallback callback - ); - private native void subscribeMaxConstTempAttribute(long chipClusterPtr, - MaxConstTempAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readPumpStatusAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribePumpStatusAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readEffectiveOperationModeAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeEffectiveOperationModeAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readEffectiveControlModeAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeEffectiveControlModeAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readCapacityAttribute(long chipClusterPtr, - CapacityAttributeCallback callback - ); - private native void subscribeCapacityAttribute(long chipClusterPtr, - CapacityAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readSpeedAttribute(long chipClusterPtr, - SpeedAttributeCallback callback - ); - private native void subscribeSpeedAttribute(long chipClusterPtr, - SpeedAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readLifetimeRunningHoursAttribute(long chipClusterPtr, - LifetimeRunningHoursAttributeCallback callback - ); - - private native void writeLifetimeRunningHoursAttribute(long chipClusterPtr, DefaultClusterCallback callback, Long value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeLifetimeRunningHoursAttribute(long chipClusterPtr, - LifetimeRunningHoursAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readPowerAttribute(long chipClusterPtr, - PowerAttributeCallback callback - ); - private native void subscribePowerAttribute(long chipClusterPtr, - PowerAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readLifetimeEnergyConsumedAttribute(long chipClusterPtr, - LifetimeEnergyConsumedAttributeCallback callback - ); - - private native void writeLifetimeEnergyConsumedAttribute(long chipClusterPtr, DefaultClusterCallback callback, Long value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeLifetimeEnergyConsumedAttribute(long chipClusterPtr, - LifetimeEnergyConsumedAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readOperationModeAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - - private native void writeOperationModeAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeOperationModeAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readControlModeAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - - private native void writeControlModeAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeControlModeAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - ); - private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - ); - private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - ); - private native void subscribeEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - ); - private native void subscribeAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - } - - public static class ThermostatCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 0x00000201L; - - public ThermostatCluster(long devicePtr, int endpointId) { - super(devicePtr, endpointId); - } - - @Override - public native long initWithDevice(long devicePtr, int endpointId); - - public void setpointRaiseLower(DefaultClusterCallback callback - , Integer mode, Integer amount) { - setpointRaiseLower(chipClusterPtr, callback, mode, amount, null); - } - - public void setpointRaiseLower(DefaultClusterCallback callback - , Integer mode, Integer amount - , int timedInvokeTimeoutMs) { - setpointRaiseLower(chipClusterPtr, callback, mode, amount, timedInvokeTimeoutMs); - } - - public void setWeeklySchedule(DefaultClusterCallback callback - , Integer numberOfTransitionsForSequence, Integer dayOfWeekForSequence, Integer modeForSequence, ArrayList transitions) { - setWeeklySchedule(chipClusterPtr, callback, numberOfTransitionsForSequence, dayOfWeekForSequence, modeForSequence, transitions, null); - } - - public void setWeeklySchedule(DefaultClusterCallback callback - , Integer numberOfTransitionsForSequence, Integer dayOfWeekForSequence, Integer modeForSequence, ArrayList transitions - , int timedInvokeTimeoutMs) { - setWeeklySchedule(chipClusterPtr, callback, numberOfTransitionsForSequence, dayOfWeekForSequence, modeForSequence, transitions, timedInvokeTimeoutMs); - } - - public void getWeeklySchedule(GetWeeklyScheduleResponseCallback callback - , Integer daysToReturn, Integer modeToReturn) { - getWeeklySchedule(chipClusterPtr, callback, daysToReturn, modeToReturn, null); - } - - public void getWeeklySchedule(GetWeeklyScheduleResponseCallback callback - , Integer daysToReturn, Integer modeToReturn - , int timedInvokeTimeoutMs) { - getWeeklySchedule(chipClusterPtr, callback, daysToReturn, modeToReturn, timedInvokeTimeoutMs); - } - - public void clearWeeklySchedule(DefaultClusterCallback callback - ) { - clearWeeklySchedule(chipClusterPtr, callback, null); - } - - public void clearWeeklySchedule(DefaultClusterCallback callback - - , int timedInvokeTimeoutMs) { - clearWeeklySchedule(chipClusterPtr, callback, timedInvokeTimeoutMs); - } - private native void setpointRaiseLower(long chipClusterPtr, DefaultClusterCallback Callback - , Integer mode, Integer amount - , @Nullable Integer timedInvokeTimeoutMs); - private native void setWeeklySchedule(long chipClusterPtr, DefaultClusterCallback Callback - , Integer numberOfTransitionsForSequence, Integer dayOfWeekForSequence, Integer modeForSequence, ArrayList transitions - , @Nullable Integer timedInvokeTimeoutMs); - private native void getWeeklySchedule(long chipClusterPtr, GetWeeklyScheduleResponseCallback Callback - , Integer daysToReturn, Integer modeToReturn - , @Nullable Integer timedInvokeTimeoutMs); - private native void clearWeeklySchedule(long chipClusterPtr, DefaultClusterCallback Callback - - , @Nullable Integer timedInvokeTimeoutMs); - public interface GetWeeklyScheduleResponseCallback { - void onSuccess(Integer numberOfTransitionsForSequence, Integer dayOfWeekForSequence, Integer modeForSequence, ArrayList transitions); - - void onError(Exception error); - } - - - public interface LocalTemperatureAttributeCallback { - void onSuccess(@Nullable Integer value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface OutdoorTemperatureAttributeCallback { - void onSuccess(@Nullable Integer value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface TemperatureSetpointHoldDurationAttributeCallback { - void onSuccess(@Nullable Integer value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface SetpointChangeAmountAttributeCallback { - void onSuccess(@Nullable Integer value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface OccupiedSetbackAttributeCallback { - void onSuccess(@Nullable Integer value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface OccupiedSetbackMinAttributeCallback { - void onSuccess(@Nullable Integer value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface OccupiedSetbackMaxAttributeCallback { - void onSuccess(@Nullable Integer value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface UnoccupiedSetbackAttributeCallback { - void onSuccess(@Nullable Integer value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface UnoccupiedSetbackMinAttributeCallback { - void onSuccess(@Nullable Integer value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface UnoccupiedSetbackMaxAttributeCallback { - void onSuccess(@Nullable Integer value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface ACCoilTemperatureAttributeCallback { - void onSuccess(@Nullable Integer value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface GeneratedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AcceptedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface EventListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AttributeListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - - public void readLocalTemperatureAttribute( - LocalTemperatureAttributeCallback callback - ) { - readLocalTemperatureAttribute(chipClusterPtr, callback); - } - public void subscribeLocalTemperatureAttribute( - LocalTemperatureAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeLocalTemperatureAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readOutdoorTemperatureAttribute( - OutdoorTemperatureAttributeCallback callback - ) { - readOutdoorTemperatureAttribute(chipClusterPtr, callback); - } - public void subscribeOutdoorTemperatureAttribute( - OutdoorTemperatureAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeOutdoorTemperatureAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readOccupancyAttribute( - IntegerAttributeCallback callback - ) { - readOccupancyAttribute(chipClusterPtr, callback); - } - public void subscribeOccupancyAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeOccupancyAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAbsMinHeatSetpointLimitAttribute( - IntegerAttributeCallback callback - ) { - readAbsMinHeatSetpointLimitAttribute(chipClusterPtr, callback); - } - public void subscribeAbsMinHeatSetpointLimitAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeAbsMinHeatSetpointLimitAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAbsMaxHeatSetpointLimitAttribute( - IntegerAttributeCallback callback - ) { - readAbsMaxHeatSetpointLimitAttribute(chipClusterPtr, callback); - } - public void subscribeAbsMaxHeatSetpointLimitAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeAbsMaxHeatSetpointLimitAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAbsMinCoolSetpointLimitAttribute( - IntegerAttributeCallback callback - ) { - readAbsMinCoolSetpointLimitAttribute(chipClusterPtr, callback); - } - public void subscribeAbsMinCoolSetpointLimitAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeAbsMinCoolSetpointLimitAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAbsMaxCoolSetpointLimitAttribute( - IntegerAttributeCallback callback - ) { - readAbsMaxCoolSetpointLimitAttribute(chipClusterPtr, callback); - } - public void subscribeAbsMaxCoolSetpointLimitAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeAbsMaxCoolSetpointLimitAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readPICoolingDemandAttribute( - IntegerAttributeCallback callback - ) { - readPICoolingDemandAttribute(chipClusterPtr, callback); - } - public void subscribePICoolingDemandAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribePICoolingDemandAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readPIHeatingDemandAttribute( - IntegerAttributeCallback callback - ) { - readPIHeatingDemandAttribute(chipClusterPtr, callback); - } - public void subscribePIHeatingDemandAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribePIHeatingDemandAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readHVACSystemTypeConfigurationAttribute( - IntegerAttributeCallback callback - ) { - readHVACSystemTypeConfigurationAttribute(chipClusterPtr, callback); - } - public void writeHVACSystemTypeConfigurationAttribute(DefaultClusterCallback callback, Integer value) { - writeHVACSystemTypeConfigurationAttribute(chipClusterPtr, callback, value, null); - } - - public void writeHVACSystemTypeConfigurationAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeHVACSystemTypeConfigurationAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeHVACSystemTypeConfigurationAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeHVACSystemTypeConfigurationAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readLocalTemperatureCalibrationAttribute( - IntegerAttributeCallback callback - ) { - readLocalTemperatureCalibrationAttribute(chipClusterPtr, callback); - } - public void writeLocalTemperatureCalibrationAttribute(DefaultClusterCallback callback, Integer value) { - writeLocalTemperatureCalibrationAttribute(chipClusterPtr, callback, value, null); - } - - public void writeLocalTemperatureCalibrationAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeLocalTemperatureCalibrationAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeLocalTemperatureCalibrationAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeLocalTemperatureCalibrationAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readOccupiedCoolingSetpointAttribute( - IntegerAttributeCallback callback - ) { - readOccupiedCoolingSetpointAttribute(chipClusterPtr, callback); - } - public void writeOccupiedCoolingSetpointAttribute(DefaultClusterCallback callback, Integer value) { - writeOccupiedCoolingSetpointAttribute(chipClusterPtr, callback, value, null); - } - - public void writeOccupiedCoolingSetpointAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeOccupiedCoolingSetpointAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeOccupiedCoolingSetpointAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeOccupiedCoolingSetpointAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readOccupiedHeatingSetpointAttribute( - IntegerAttributeCallback callback - ) { - readOccupiedHeatingSetpointAttribute(chipClusterPtr, callback); - } - public void writeOccupiedHeatingSetpointAttribute(DefaultClusterCallback callback, Integer value) { - writeOccupiedHeatingSetpointAttribute(chipClusterPtr, callback, value, null); - } - - public void writeOccupiedHeatingSetpointAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeOccupiedHeatingSetpointAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeOccupiedHeatingSetpointAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeOccupiedHeatingSetpointAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readUnoccupiedCoolingSetpointAttribute( - IntegerAttributeCallback callback - ) { - readUnoccupiedCoolingSetpointAttribute(chipClusterPtr, callback); - } - public void writeUnoccupiedCoolingSetpointAttribute(DefaultClusterCallback callback, Integer value) { - writeUnoccupiedCoolingSetpointAttribute(chipClusterPtr, callback, value, null); - } - - public void writeUnoccupiedCoolingSetpointAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeUnoccupiedCoolingSetpointAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeUnoccupiedCoolingSetpointAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeUnoccupiedCoolingSetpointAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readUnoccupiedHeatingSetpointAttribute( - IntegerAttributeCallback callback - ) { - readUnoccupiedHeatingSetpointAttribute(chipClusterPtr, callback); - } - public void writeUnoccupiedHeatingSetpointAttribute(DefaultClusterCallback callback, Integer value) { - writeUnoccupiedHeatingSetpointAttribute(chipClusterPtr, callback, value, null); - } - - public void writeUnoccupiedHeatingSetpointAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeUnoccupiedHeatingSetpointAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeUnoccupiedHeatingSetpointAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeUnoccupiedHeatingSetpointAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readMinHeatSetpointLimitAttribute( - IntegerAttributeCallback callback - ) { - readMinHeatSetpointLimitAttribute(chipClusterPtr, callback); - } - public void writeMinHeatSetpointLimitAttribute(DefaultClusterCallback callback, Integer value) { - writeMinHeatSetpointLimitAttribute(chipClusterPtr, callback, value, null); - } - - public void writeMinHeatSetpointLimitAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeMinHeatSetpointLimitAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeMinHeatSetpointLimitAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeMinHeatSetpointLimitAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readMaxHeatSetpointLimitAttribute( - IntegerAttributeCallback callback - ) { - readMaxHeatSetpointLimitAttribute(chipClusterPtr, callback); - } - public void writeMaxHeatSetpointLimitAttribute(DefaultClusterCallback callback, Integer value) { - writeMaxHeatSetpointLimitAttribute(chipClusterPtr, callback, value, null); - } - - public void writeMaxHeatSetpointLimitAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeMaxHeatSetpointLimitAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeMaxHeatSetpointLimitAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeMaxHeatSetpointLimitAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readMinCoolSetpointLimitAttribute( - IntegerAttributeCallback callback - ) { - readMinCoolSetpointLimitAttribute(chipClusterPtr, callback); - } - public void writeMinCoolSetpointLimitAttribute(DefaultClusterCallback callback, Integer value) { - writeMinCoolSetpointLimitAttribute(chipClusterPtr, callback, value, null); - } - - public void writeMinCoolSetpointLimitAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeMinCoolSetpointLimitAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeMinCoolSetpointLimitAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeMinCoolSetpointLimitAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readMaxCoolSetpointLimitAttribute( - IntegerAttributeCallback callback - ) { - readMaxCoolSetpointLimitAttribute(chipClusterPtr, callback); - } - public void writeMaxCoolSetpointLimitAttribute(DefaultClusterCallback callback, Integer value) { - writeMaxCoolSetpointLimitAttribute(chipClusterPtr, callback, value, null); - } - - public void writeMaxCoolSetpointLimitAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeMaxCoolSetpointLimitAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeMaxCoolSetpointLimitAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeMaxCoolSetpointLimitAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readMinSetpointDeadBandAttribute( - IntegerAttributeCallback callback - ) { - readMinSetpointDeadBandAttribute(chipClusterPtr, callback); - } - public void writeMinSetpointDeadBandAttribute(DefaultClusterCallback callback, Integer value) { - writeMinSetpointDeadBandAttribute(chipClusterPtr, callback, value, null); - } - - public void writeMinSetpointDeadBandAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeMinSetpointDeadBandAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeMinSetpointDeadBandAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeMinSetpointDeadBandAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readRemoteSensingAttribute( - IntegerAttributeCallback callback - ) { - readRemoteSensingAttribute(chipClusterPtr, callback); - } - public void writeRemoteSensingAttribute(DefaultClusterCallback callback, Integer value) { - writeRemoteSensingAttribute(chipClusterPtr, callback, value, null); - } - - public void writeRemoteSensingAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeRemoteSensingAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeRemoteSensingAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeRemoteSensingAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readControlSequenceOfOperationAttribute( - IntegerAttributeCallback callback - ) { - readControlSequenceOfOperationAttribute(chipClusterPtr, callback); - } - public void writeControlSequenceOfOperationAttribute(DefaultClusterCallback callback, Integer value) { - writeControlSequenceOfOperationAttribute(chipClusterPtr, callback, value, null); - } - - public void writeControlSequenceOfOperationAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeControlSequenceOfOperationAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeControlSequenceOfOperationAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeControlSequenceOfOperationAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readSystemModeAttribute( - IntegerAttributeCallback callback - ) { - readSystemModeAttribute(chipClusterPtr, callback); - } - public void writeSystemModeAttribute(DefaultClusterCallback callback, Integer value) { - writeSystemModeAttribute(chipClusterPtr, callback, value, null); - } - - public void writeSystemModeAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeSystemModeAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeSystemModeAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeSystemModeAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readThermostatRunningModeAttribute( - IntegerAttributeCallback callback - ) { - readThermostatRunningModeAttribute(chipClusterPtr, callback); - } - public void subscribeThermostatRunningModeAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeThermostatRunningModeAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readStartOfWeekAttribute( - IntegerAttributeCallback callback - ) { - readStartOfWeekAttribute(chipClusterPtr, callback); - } - public void subscribeStartOfWeekAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeStartOfWeekAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readNumberOfWeeklyTransitionsAttribute( - IntegerAttributeCallback callback - ) { - readNumberOfWeeklyTransitionsAttribute(chipClusterPtr, callback); - } - public void subscribeNumberOfWeeklyTransitionsAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeNumberOfWeeklyTransitionsAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readNumberOfDailyTransitionsAttribute( - IntegerAttributeCallback callback - ) { - readNumberOfDailyTransitionsAttribute(chipClusterPtr, callback); - } - public void subscribeNumberOfDailyTransitionsAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeNumberOfDailyTransitionsAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readTemperatureSetpointHoldAttribute( - IntegerAttributeCallback callback - ) { - readTemperatureSetpointHoldAttribute(chipClusterPtr, callback); - } - public void writeTemperatureSetpointHoldAttribute(DefaultClusterCallback callback, Integer value) { - writeTemperatureSetpointHoldAttribute(chipClusterPtr, callback, value, null); - } - - public void writeTemperatureSetpointHoldAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeTemperatureSetpointHoldAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeTemperatureSetpointHoldAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeTemperatureSetpointHoldAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readTemperatureSetpointHoldDurationAttribute( - TemperatureSetpointHoldDurationAttributeCallback callback - ) { - readTemperatureSetpointHoldDurationAttribute(chipClusterPtr, callback); - } - public void writeTemperatureSetpointHoldDurationAttribute(DefaultClusterCallback callback, Integer value) { - writeTemperatureSetpointHoldDurationAttribute(chipClusterPtr, callback, value, null); - } - - public void writeTemperatureSetpointHoldDurationAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeTemperatureSetpointHoldDurationAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeTemperatureSetpointHoldDurationAttribute( - TemperatureSetpointHoldDurationAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeTemperatureSetpointHoldDurationAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readThermostatProgrammingOperationModeAttribute( - IntegerAttributeCallback callback - ) { - readThermostatProgrammingOperationModeAttribute(chipClusterPtr, callback); - } - public void writeThermostatProgrammingOperationModeAttribute(DefaultClusterCallback callback, Integer value) { - writeThermostatProgrammingOperationModeAttribute(chipClusterPtr, callback, value, null); - } - - public void writeThermostatProgrammingOperationModeAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeThermostatProgrammingOperationModeAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeThermostatProgrammingOperationModeAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeThermostatProgrammingOperationModeAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readThermostatRunningStateAttribute( - IntegerAttributeCallback callback - ) { - readThermostatRunningStateAttribute(chipClusterPtr, callback); - } - public void subscribeThermostatRunningStateAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeThermostatRunningStateAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readSetpointChangeSourceAttribute( - IntegerAttributeCallback callback - ) { - readSetpointChangeSourceAttribute(chipClusterPtr, callback); - } - public void subscribeSetpointChangeSourceAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeSetpointChangeSourceAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readSetpointChangeAmountAttribute( - SetpointChangeAmountAttributeCallback callback - ) { - readSetpointChangeAmountAttribute(chipClusterPtr, callback); - } - public void subscribeSetpointChangeAmountAttribute( - SetpointChangeAmountAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeSetpointChangeAmountAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readSetpointChangeSourceTimestampAttribute( - LongAttributeCallback callback - ) { - readSetpointChangeSourceTimestampAttribute(chipClusterPtr, callback); - } - public void subscribeSetpointChangeSourceTimestampAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeSetpointChangeSourceTimestampAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readOccupiedSetbackAttribute( - OccupiedSetbackAttributeCallback callback - ) { - readOccupiedSetbackAttribute(chipClusterPtr, callback); - } - public void writeOccupiedSetbackAttribute(DefaultClusterCallback callback, Integer value) { - writeOccupiedSetbackAttribute(chipClusterPtr, callback, value, null); - } - - public void writeOccupiedSetbackAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeOccupiedSetbackAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeOccupiedSetbackAttribute( - OccupiedSetbackAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeOccupiedSetbackAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readOccupiedSetbackMinAttribute( - OccupiedSetbackMinAttributeCallback callback - ) { - readOccupiedSetbackMinAttribute(chipClusterPtr, callback); - } - public void subscribeOccupiedSetbackMinAttribute( - OccupiedSetbackMinAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeOccupiedSetbackMinAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readOccupiedSetbackMaxAttribute( - OccupiedSetbackMaxAttributeCallback callback - ) { - readOccupiedSetbackMaxAttribute(chipClusterPtr, callback); - } - public void subscribeOccupiedSetbackMaxAttribute( - OccupiedSetbackMaxAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeOccupiedSetbackMaxAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readUnoccupiedSetbackAttribute( - UnoccupiedSetbackAttributeCallback callback - ) { - readUnoccupiedSetbackAttribute(chipClusterPtr, callback); - } - public void writeUnoccupiedSetbackAttribute(DefaultClusterCallback callback, Integer value) { - writeUnoccupiedSetbackAttribute(chipClusterPtr, callback, value, null); - } - - public void writeUnoccupiedSetbackAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeUnoccupiedSetbackAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeUnoccupiedSetbackAttribute( - UnoccupiedSetbackAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeUnoccupiedSetbackAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readUnoccupiedSetbackMinAttribute( - UnoccupiedSetbackMinAttributeCallback callback - ) { - readUnoccupiedSetbackMinAttribute(chipClusterPtr, callback); - } - public void subscribeUnoccupiedSetbackMinAttribute( - UnoccupiedSetbackMinAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeUnoccupiedSetbackMinAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readUnoccupiedSetbackMaxAttribute( - UnoccupiedSetbackMaxAttributeCallback callback - ) { - readUnoccupiedSetbackMaxAttribute(chipClusterPtr, callback); - } - public void subscribeUnoccupiedSetbackMaxAttribute( - UnoccupiedSetbackMaxAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeUnoccupiedSetbackMaxAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readEmergencyHeatDeltaAttribute( - IntegerAttributeCallback callback - ) { - readEmergencyHeatDeltaAttribute(chipClusterPtr, callback); - } - public void writeEmergencyHeatDeltaAttribute(DefaultClusterCallback callback, Integer value) { - writeEmergencyHeatDeltaAttribute(chipClusterPtr, callback, value, null); - } - - public void writeEmergencyHeatDeltaAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeEmergencyHeatDeltaAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeEmergencyHeatDeltaAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeEmergencyHeatDeltaAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readACTypeAttribute( - IntegerAttributeCallback callback - ) { - readACTypeAttribute(chipClusterPtr, callback); - } - public void writeACTypeAttribute(DefaultClusterCallback callback, Integer value) { - writeACTypeAttribute(chipClusterPtr, callback, value, null); - } - - public void writeACTypeAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeACTypeAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeACTypeAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeACTypeAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readACCapacityAttribute( - IntegerAttributeCallback callback - ) { - readACCapacityAttribute(chipClusterPtr, callback); - } - public void writeACCapacityAttribute(DefaultClusterCallback callback, Integer value) { - writeACCapacityAttribute(chipClusterPtr, callback, value, null); - } - - public void writeACCapacityAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeACCapacityAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeACCapacityAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeACCapacityAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readACRefrigerantTypeAttribute( - IntegerAttributeCallback callback - ) { - readACRefrigerantTypeAttribute(chipClusterPtr, callback); - } - public void writeACRefrigerantTypeAttribute(DefaultClusterCallback callback, Integer value) { - writeACRefrigerantTypeAttribute(chipClusterPtr, callback, value, null); - } - - public void writeACRefrigerantTypeAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeACRefrigerantTypeAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeACRefrigerantTypeAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeACRefrigerantTypeAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readACCompressorTypeAttribute( - IntegerAttributeCallback callback - ) { - readACCompressorTypeAttribute(chipClusterPtr, callback); - } - public void writeACCompressorTypeAttribute(DefaultClusterCallback callback, Integer value) { - writeACCompressorTypeAttribute(chipClusterPtr, callback, value, null); - } - - public void writeACCompressorTypeAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeACCompressorTypeAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeACCompressorTypeAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeACCompressorTypeAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readACErrorCodeAttribute( - LongAttributeCallback callback - ) { - readACErrorCodeAttribute(chipClusterPtr, callback); - } - public void writeACErrorCodeAttribute(DefaultClusterCallback callback, Long value) { - writeACErrorCodeAttribute(chipClusterPtr, callback, value, null); - } - - public void writeACErrorCodeAttribute(DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { - writeACErrorCodeAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeACErrorCodeAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeACErrorCodeAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readACLouverPositionAttribute( - IntegerAttributeCallback callback - ) { - readACLouverPositionAttribute(chipClusterPtr, callback); - } - public void writeACLouverPositionAttribute(DefaultClusterCallback callback, Integer value) { - writeACLouverPositionAttribute(chipClusterPtr, callback, value, null); - } - - public void writeACLouverPositionAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeACLouverPositionAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeACLouverPositionAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeACLouverPositionAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readACCoilTemperatureAttribute( - ACCoilTemperatureAttributeCallback callback - ) { - readACCoilTemperatureAttribute(chipClusterPtr, callback); - } - public void subscribeACCoilTemperatureAttribute( - ACCoilTemperatureAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeACCoilTemperatureAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readACCapacityformatAttribute( - IntegerAttributeCallback callback - ) { - readACCapacityformatAttribute(chipClusterPtr, callback); - } - public void writeACCapacityformatAttribute(DefaultClusterCallback callback, Integer value) { - writeACCapacityformatAttribute(chipClusterPtr, callback, value, null); - } - - public void writeACCapacityformatAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeACCapacityformatAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeACCapacityformatAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeACCapacityformatAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - ) { - readGeneratedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - ) { - readAcceptedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readEventListAttribute( - EventListAttributeCallback callback - ) { - readEventListAttribute(chipClusterPtr, callback); - } - public void subscribeEventListAttribute( - EventListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAttributeListAttribute( - AttributeListAttributeCallback callback - ) { - readAttributeListAttribute(chipClusterPtr, callback); - } - public void subscribeAttributeListAttribute( - AttributeListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readFeatureMapAttribute( - LongAttributeCallback callback - ) { - readFeatureMapAttribute(chipClusterPtr, callback); - } - public void subscribeFeatureMapAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readClusterRevisionAttribute( - IntegerAttributeCallback callback - ) { - readClusterRevisionAttribute(chipClusterPtr, callback); - } - public void subscribeClusterRevisionAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - private native void readLocalTemperatureAttribute(long chipClusterPtr, - LocalTemperatureAttributeCallback callback - ); - private native void subscribeLocalTemperatureAttribute(long chipClusterPtr, - LocalTemperatureAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readOutdoorTemperatureAttribute(long chipClusterPtr, - OutdoorTemperatureAttributeCallback callback - ); - private native void subscribeOutdoorTemperatureAttribute(long chipClusterPtr, - OutdoorTemperatureAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readOccupancyAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeOccupancyAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readAbsMinHeatSetpointLimitAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeAbsMinHeatSetpointLimitAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readAbsMaxHeatSetpointLimitAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeAbsMaxHeatSetpointLimitAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readAbsMinCoolSetpointLimitAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeAbsMinCoolSetpointLimitAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readAbsMaxCoolSetpointLimitAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeAbsMaxCoolSetpointLimitAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readPICoolingDemandAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribePICoolingDemandAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readPIHeatingDemandAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribePIHeatingDemandAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readHVACSystemTypeConfigurationAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - - private native void writeHVACSystemTypeConfigurationAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeHVACSystemTypeConfigurationAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readLocalTemperatureCalibrationAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - - private native void writeLocalTemperatureCalibrationAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeLocalTemperatureCalibrationAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readOccupiedCoolingSetpointAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - - private native void writeOccupiedCoolingSetpointAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeOccupiedCoolingSetpointAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readOccupiedHeatingSetpointAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - - private native void writeOccupiedHeatingSetpointAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeOccupiedHeatingSetpointAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readUnoccupiedCoolingSetpointAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - - private native void writeUnoccupiedCoolingSetpointAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeUnoccupiedCoolingSetpointAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readUnoccupiedHeatingSetpointAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - - private native void writeUnoccupiedHeatingSetpointAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeUnoccupiedHeatingSetpointAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readMinHeatSetpointLimitAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - - private native void writeMinHeatSetpointLimitAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeMinHeatSetpointLimitAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readMaxHeatSetpointLimitAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - - private native void writeMaxHeatSetpointLimitAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeMaxHeatSetpointLimitAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readMinCoolSetpointLimitAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - - private native void writeMinCoolSetpointLimitAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeMinCoolSetpointLimitAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readMaxCoolSetpointLimitAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - - private native void writeMaxCoolSetpointLimitAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeMaxCoolSetpointLimitAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readMinSetpointDeadBandAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - - private native void writeMinSetpointDeadBandAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeMinSetpointDeadBandAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readRemoteSensingAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - - private native void writeRemoteSensingAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeRemoteSensingAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readControlSequenceOfOperationAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - - private native void writeControlSequenceOfOperationAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeControlSequenceOfOperationAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readSystemModeAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - - private native void writeSystemModeAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeSystemModeAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readThermostatRunningModeAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeThermostatRunningModeAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readStartOfWeekAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeStartOfWeekAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readNumberOfWeeklyTransitionsAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeNumberOfWeeklyTransitionsAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readNumberOfDailyTransitionsAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeNumberOfDailyTransitionsAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readTemperatureSetpointHoldAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - - private native void writeTemperatureSetpointHoldAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeTemperatureSetpointHoldAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readTemperatureSetpointHoldDurationAttribute(long chipClusterPtr, - TemperatureSetpointHoldDurationAttributeCallback callback - ); - - private native void writeTemperatureSetpointHoldDurationAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeTemperatureSetpointHoldDurationAttribute(long chipClusterPtr, - TemperatureSetpointHoldDurationAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readThermostatProgrammingOperationModeAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - - private native void writeThermostatProgrammingOperationModeAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeThermostatProgrammingOperationModeAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readThermostatRunningStateAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeThermostatRunningStateAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readSetpointChangeSourceAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeSetpointChangeSourceAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readSetpointChangeAmountAttribute(long chipClusterPtr, - SetpointChangeAmountAttributeCallback callback - ); - private native void subscribeSetpointChangeAmountAttribute(long chipClusterPtr, - SetpointChangeAmountAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readSetpointChangeSourceTimestampAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeSetpointChangeSourceTimestampAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readOccupiedSetbackAttribute(long chipClusterPtr, - OccupiedSetbackAttributeCallback callback - ); - - private native void writeOccupiedSetbackAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeOccupiedSetbackAttribute(long chipClusterPtr, - OccupiedSetbackAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readOccupiedSetbackMinAttribute(long chipClusterPtr, - OccupiedSetbackMinAttributeCallback callback - ); - private native void subscribeOccupiedSetbackMinAttribute(long chipClusterPtr, - OccupiedSetbackMinAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readOccupiedSetbackMaxAttribute(long chipClusterPtr, - OccupiedSetbackMaxAttributeCallback callback - ); - private native void subscribeOccupiedSetbackMaxAttribute(long chipClusterPtr, - OccupiedSetbackMaxAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readUnoccupiedSetbackAttribute(long chipClusterPtr, - UnoccupiedSetbackAttributeCallback callback - ); - - private native void writeUnoccupiedSetbackAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeUnoccupiedSetbackAttribute(long chipClusterPtr, - UnoccupiedSetbackAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readUnoccupiedSetbackMinAttribute(long chipClusterPtr, - UnoccupiedSetbackMinAttributeCallback callback - ); - private native void subscribeUnoccupiedSetbackMinAttribute(long chipClusterPtr, - UnoccupiedSetbackMinAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readUnoccupiedSetbackMaxAttribute(long chipClusterPtr, - UnoccupiedSetbackMaxAttributeCallback callback - ); - private native void subscribeUnoccupiedSetbackMaxAttribute(long chipClusterPtr, - UnoccupiedSetbackMaxAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readEmergencyHeatDeltaAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - - private native void writeEmergencyHeatDeltaAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeEmergencyHeatDeltaAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readACTypeAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - - private native void writeACTypeAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeACTypeAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readACCapacityAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - - private native void writeACCapacityAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeACCapacityAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readACRefrigerantTypeAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - - private native void writeACRefrigerantTypeAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeACRefrigerantTypeAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readACCompressorTypeAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - - private native void writeACCompressorTypeAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeACCompressorTypeAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readACErrorCodeAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - - private native void writeACErrorCodeAttribute(long chipClusterPtr, DefaultClusterCallback callback, Long value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeACErrorCodeAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readACLouverPositionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - - private native void writeACLouverPositionAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeACLouverPositionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readACCoilTemperatureAttribute(long chipClusterPtr, - ACCoilTemperatureAttributeCallback callback - ); - private native void subscribeACCoilTemperatureAttribute(long chipClusterPtr, - ACCoilTemperatureAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readACCapacityformatAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - - private native void writeACCapacityformatAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeACCapacityformatAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - ); - private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - ); - private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - ); - private native void subscribeEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - ); - private native void subscribeAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - } - - public static class FanControlCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 0x00000202L; - - public FanControlCluster(long devicePtr, int endpointId) { - super(devicePtr, endpointId); - } - - @Override - public native long initWithDevice(long devicePtr, int endpointId); - - public void step(DefaultClusterCallback callback - , Integer direction, Optional wrap, Optional lowestOff) { - step(chipClusterPtr, callback, direction, wrap, lowestOff, null); - } - - public void step(DefaultClusterCallback callback - , Integer direction, Optional wrap, Optional lowestOff - , int timedInvokeTimeoutMs) { - step(chipClusterPtr, callback, direction, wrap, lowestOff, timedInvokeTimeoutMs); - } - private native void step(long chipClusterPtr, DefaultClusterCallback Callback - , Integer direction, Optional wrap, Optional lowestOff - , @Nullable Integer timedInvokeTimeoutMs); - - public interface PercentSettingAttributeCallback { - void onSuccess(@Nullable Integer value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface SpeedSettingAttributeCallback { - void onSuccess(@Nullable Integer value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface GeneratedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AcceptedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface EventListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AttributeListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - - public void readFanModeAttribute( - IntegerAttributeCallback callback - ) { - readFanModeAttribute(chipClusterPtr, callback); - } - public void writeFanModeAttribute(DefaultClusterCallback callback, Integer value) { - writeFanModeAttribute(chipClusterPtr, callback, value, null); - } - - public void writeFanModeAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeFanModeAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeFanModeAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeFanModeAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readFanModeSequenceAttribute( - IntegerAttributeCallback callback - ) { - readFanModeSequenceAttribute(chipClusterPtr, callback); - } - public void writeFanModeSequenceAttribute(DefaultClusterCallback callback, Integer value) { - writeFanModeSequenceAttribute(chipClusterPtr, callback, value, null); - } - - public void writeFanModeSequenceAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeFanModeSequenceAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeFanModeSequenceAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeFanModeSequenceAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readPercentSettingAttribute( - PercentSettingAttributeCallback callback - ) { - readPercentSettingAttribute(chipClusterPtr, callback); - } - public void writePercentSettingAttribute(DefaultClusterCallback callback, Integer value) { - writePercentSettingAttribute(chipClusterPtr, callback, value, null); - } - - public void writePercentSettingAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writePercentSettingAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribePercentSettingAttribute( - PercentSettingAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribePercentSettingAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readPercentCurrentAttribute( - IntegerAttributeCallback callback - ) { - readPercentCurrentAttribute(chipClusterPtr, callback); - } - public void subscribePercentCurrentAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribePercentCurrentAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readSpeedMaxAttribute( - IntegerAttributeCallback callback - ) { - readSpeedMaxAttribute(chipClusterPtr, callback); - } - public void subscribeSpeedMaxAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeSpeedMaxAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readSpeedSettingAttribute( - SpeedSettingAttributeCallback callback - ) { - readSpeedSettingAttribute(chipClusterPtr, callback); - } - public void writeSpeedSettingAttribute(DefaultClusterCallback callback, Integer value) { - writeSpeedSettingAttribute(chipClusterPtr, callback, value, null); - } - - public void writeSpeedSettingAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeSpeedSettingAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeSpeedSettingAttribute( - SpeedSettingAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeSpeedSettingAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readSpeedCurrentAttribute( - IntegerAttributeCallback callback - ) { - readSpeedCurrentAttribute(chipClusterPtr, callback); - } - public void subscribeSpeedCurrentAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeSpeedCurrentAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readRockSupportAttribute( - IntegerAttributeCallback callback - ) { - readRockSupportAttribute(chipClusterPtr, callback); - } - public void subscribeRockSupportAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeRockSupportAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readRockSettingAttribute( - IntegerAttributeCallback callback - ) { - readRockSettingAttribute(chipClusterPtr, callback); - } - public void writeRockSettingAttribute(DefaultClusterCallback callback, Integer value) { - writeRockSettingAttribute(chipClusterPtr, callback, value, null); - } - - public void writeRockSettingAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeRockSettingAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeRockSettingAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeRockSettingAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readWindSupportAttribute( - IntegerAttributeCallback callback - ) { - readWindSupportAttribute(chipClusterPtr, callback); - } - public void subscribeWindSupportAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeWindSupportAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readWindSettingAttribute( - IntegerAttributeCallback callback - ) { - readWindSettingAttribute(chipClusterPtr, callback); - } - public void writeWindSettingAttribute(DefaultClusterCallback callback, Integer value) { - writeWindSettingAttribute(chipClusterPtr, callback, value, null); - } - - public void writeWindSettingAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeWindSettingAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeWindSettingAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeWindSettingAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAirflowDirectionAttribute( - IntegerAttributeCallback callback - ) { - readAirflowDirectionAttribute(chipClusterPtr, callback); - } - public void writeAirflowDirectionAttribute(DefaultClusterCallback callback, Integer value) { - writeAirflowDirectionAttribute(chipClusterPtr, callback, value, null); - } - - public void writeAirflowDirectionAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeAirflowDirectionAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeAirflowDirectionAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeAirflowDirectionAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - ) { - readGeneratedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - ) { - readAcceptedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readEventListAttribute( - EventListAttributeCallback callback - ) { - readEventListAttribute(chipClusterPtr, callback); - } - public void subscribeEventListAttribute( - EventListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAttributeListAttribute( - AttributeListAttributeCallback callback - ) { - readAttributeListAttribute(chipClusterPtr, callback); - } - public void subscribeAttributeListAttribute( - AttributeListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readFeatureMapAttribute( - LongAttributeCallback callback - ) { - readFeatureMapAttribute(chipClusterPtr, callback); - } - public void subscribeFeatureMapAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readClusterRevisionAttribute( - IntegerAttributeCallback callback - ) { - readClusterRevisionAttribute(chipClusterPtr, callback); - } - public void subscribeClusterRevisionAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - private native void readFanModeAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - - private native void writeFanModeAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeFanModeAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readFanModeSequenceAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - - private native void writeFanModeSequenceAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeFanModeSequenceAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readPercentSettingAttribute(long chipClusterPtr, - PercentSettingAttributeCallback callback - ); - - private native void writePercentSettingAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribePercentSettingAttribute(long chipClusterPtr, - PercentSettingAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readPercentCurrentAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribePercentCurrentAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readSpeedMaxAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeSpeedMaxAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readSpeedSettingAttribute(long chipClusterPtr, - SpeedSettingAttributeCallback callback - ); - - private native void writeSpeedSettingAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeSpeedSettingAttribute(long chipClusterPtr, - SpeedSettingAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readSpeedCurrentAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeSpeedCurrentAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readRockSupportAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeRockSupportAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readRockSettingAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - - private native void writeRockSettingAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeRockSettingAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readWindSupportAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeWindSupportAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readWindSettingAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - - private native void writeWindSettingAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeWindSettingAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readAirflowDirectionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - - private native void writeAirflowDirectionAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeAirflowDirectionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - ); - private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - ); - private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - ); - private native void subscribeEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - ); - private native void subscribeAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - } - - public static class ThermostatUserInterfaceConfigurationCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 0x00000204L; - - public ThermostatUserInterfaceConfigurationCluster(long devicePtr, int endpointId) { - super(devicePtr, endpointId); - } - - @Override - public native long initWithDevice(long devicePtr, int endpointId); - - public interface GeneratedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AcceptedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface EventListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AttributeListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - - public void readTemperatureDisplayModeAttribute( - IntegerAttributeCallback callback - ) { - readTemperatureDisplayModeAttribute(chipClusterPtr, callback); - } - public void writeTemperatureDisplayModeAttribute(DefaultClusterCallback callback, Integer value) { - writeTemperatureDisplayModeAttribute(chipClusterPtr, callback, value, null); - } - - public void writeTemperatureDisplayModeAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeTemperatureDisplayModeAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeTemperatureDisplayModeAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeTemperatureDisplayModeAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readKeypadLockoutAttribute( - IntegerAttributeCallback callback - ) { - readKeypadLockoutAttribute(chipClusterPtr, callback); - } - public void writeKeypadLockoutAttribute(DefaultClusterCallback callback, Integer value) { - writeKeypadLockoutAttribute(chipClusterPtr, callback, value, null); - } - - public void writeKeypadLockoutAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeKeypadLockoutAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeKeypadLockoutAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeKeypadLockoutAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readScheduleProgrammingVisibilityAttribute( - IntegerAttributeCallback callback - ) { - readScheduleProgrammingVisibilityAttribute(chipClusterPtr, callback); - } - public void writeScheduleProgrammingVisibilityAttribute(DefaultClusterCallback callback, Integer value) { - writeScheduleProgrammingVisibilityAttribute(chipClusterPtr, callback, value, null); - } - - public void writeScheduleProgrammingVisibilityAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeScheduleProgrammingVisibilityAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeScheduleProgrammingVisibilityAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeScheduleProgrammingVisibilityAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - ) { - readGeneratedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - ) { - readAcceptedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readEventListAttribute( - EventListAttributeCallback callback - ) { - readEventListAttribute(chipClusterPtr, callback); - } - public void subscribeEventListAttribute( - EventListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAttributeListAttribute( - AttributeListAttributeCallback callback - ) { - readAttributeListAttribute(chipClusterPtr, callback); - } - public void subscribeAttributeListAttribute( - AttributeListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readFeatureMapAttribute( - LongAttributeCallback callback - ) { - readFeatureMapAttribute(chipClusterPtr, callback); - } - public void subscribeFeatureMapAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readClusterRevisionAttribute( - IntegerAttributeCallback callback - ) { - readClusterRevisionAttribute(chipClusterPtr, callback); - } - public void subscribeClusterRevisionAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - private native void readTemperatureDisplayModeAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - - private native void writeTemperatureDisplayModeAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeTemperatureDisplayModeAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readKeypadLockoutAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - - private native void writeKeypadLockoutAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeKeypadLockoutAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readScheduleProgrammingVisibilityAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - - private native void writeScheduleProgrammingVisibilityAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeScheduleProgrammingVisibilityAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - ); - private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - ); - private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - ); - private native void subscribeEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - ); - private native void subscribeAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - } - - public static class ColorControlCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 0x00000300L; - - public ColorControlCluster(long devicePtr, int endpointId) { - super(devicePtr, endpointId); - } - - @Override - public native long initWithDevice(long devicePtr, int endpointId); - - public void moveToHue(DefaultClusterCallback callback - , Integer hue, Integer direction, Integer transitionTime, Integer optionsMask, Integer optionsOverride) { - moveToHue(chipClusterPtr, callback, hue, direction, transitionTime, optionsMask, optionsOverride, null); - } - - public void moveToHue(DefaultClusterCallback callback - , Integer hue, Integer direction, Integer transitionTime, Integer optionsMask, Integer optionsOverride - , int timedInvokeTimeoutMs) { - moveToHue(chipClusterPtr, callback, hue, direction, transitionTime, optionsMask, optionsOverride, timedInvokeTimeoutMs); - } - - public void moveHue(DefaultClusterCallback callback - , Integer moveMode, Integer rate, Integer optionsMask, Integer optionsOverride) { - moveHue(chipClusterPtr, callback, moveMode, rate, optionsMask, optionsOverride, null); - } - - public void moveHue(DefaultClusterCallback callback - , Integer moveMode, Integer rate, Integer optionsMask, Integer optionsOverride - , int timedInvokeTimeoutMs) { - moveHue(chipClusterPtr, callback, moveMode, rate, optionsMask, optionsOverride, timedInvokeTimeoutMs); - } - - public void stepHue(DefaultClusterCallback callback - , Integer stepMode, Integer stepSize, Integer transitionTime, Integer optionsMask, Integer optionsOverride) { - stepHue(chipClusterPtr, callback, stepMode, stepSize, transitionTime, optionsMask, optionsOverride, null); - } - - public void stepHue(DefaultClusterCallback callback - , Integer stepMode, Integer stepSize, Integer transitionTime, Integer optionsMask, Integer optionsOverride - , int timedInvokeTimeoutMs) { - stepHue(chipClusterPtr, callback, stepMode, stepSize, transitionTime, optionsMask, optionsOverride, timedInvokeTimeoutMs); - } - - public void moveToSaturation(DefaultClusterCallback callback - , Integer saturation, Integer transitionTime, Integer optionsMask, Integer optionsOverride) { - moveToSaturation(chipClusterPtr, callback, saturation, transitionTime, optionsMask, optionsOverride, null); - } - - public void moveToSaturation(DefaultClusterCallback callback - , Integer saturation, Integer transitionTime, Integer optionsMask, Integer optionsOverride - , int timedInvokeTimeoutMs) { - moveToSaturation(chipClusterPtr, callback, saturation, transitionTime, optionsMask, optionsOverride, timedInvokeTimeoutMs); - } - - public void moveSaturation(DefaultClusterCallback callback - , Integer moveMode, Integer rate, Integer optionsMask, Integer optionsOverride) { - moveSaturation(chipClusterPtr, callback, moveMode, rate, optionsMask, optionsOverride, null); - } - - public void moveSaturation(DefaultClusterCallback callback - , Integer moveMode, Integer rate, Integer optionsMask, Integer optionsOverride - , int timedInvokeTimeoutMs) { - moveSaturation(chipClusterPtr, callback, moveMode, rate, optionsMask, optionsOverride, timedInvokeTimeoutMs); - } - - public void stepSaturation(DefaultClusterCallback callback - , Integer stepMode, Integer stepSize, Integer transitionTime, Integer optionsMask, Integer optionsOverride) { - stepSaturation(chipClusterPtr, callback, stepMode, stepSize, transitionTime, optionsMask, optionsOverride, null); - } - - public void stepSaturation(DefaultClusterCallback callback - , Integer stepMode, Integer stepSize, Integer transitionTime, Integer optionsMask, Integer optionsOverride - , int timedInvokeTimeoutMs) { - stepSaturation(chipClusterPtr, callback, stepMode, stepSize, transitionTime, optionsMask, optionsOverride, timedInvokeTimeoutMs); - } - - public void moveToHueAndSaturation(DefaultClusterCallback callback - , Integer hue, Integer saturation, Integer transitionTime, Integer optionsMask, Integer optionsOverride) { - moveToHueAndSaturation(chipClusterPtr, callback, hue, saturation, transitionTime, optionsMask, optionsOverride, null); - } - - public void moveToHueAndSaturation(DefaultClusterCallback callback - , Integer hue, Integer saturation, Integer transitionTime, Integer optionsMask, Integer optionsOverride - , int timedInvokeTimeoutMs) { - moveToHueAndSaturation(chipClusterPtr, callback, hue, saturation, transitionTime, optionsMask, optionsOverride, timedInvokeTimeoutMs); - } - - public void moveToColor(DefaultClusterCallback callback - , Integer colorX, Integer colorY, Integer transitionTime, Integer optionsMask, Integer optionsOverride) { - moveToColor(chipClusterPtr, callback, colorX, colorY, transitionTime, optionsMask, optionsOverride, null); - } - - public void moveToColor(DefaultClusterCallback callback - , Integer colorX, Integer colorY, Integer transitionTime, Integer optionsMask, Integer optionsOverride - , int timedInvokeTimeoutMs) { - moveToColor(chipClusterPtr, callback, colorX, colorY, transitionTime, optionsMask, optionsOverride, timedInvokeTimeoutMs); - } - - public void moveColor(DefaultClusterCallback callback - , Integer rateX, Integer rateY, Integer optionsMask, Integer optionsOverride) { - moveColor(chipClusterPtr, callback, rateX, rateY, optionsMask, optionsOverride, null); - } - - public void moveColor(DefaultClusterCallback callback - , Integer rateX, Integer rateY, Integer optionsMask, Integer optionsOverride - , int timedInvokeTimeoutMs) { - moveColor(chipClusterPtr, callback, rateX, rateY, optionsMask, optionsOverride, timedInvokeTimeoutMs); - } - - public void stepColor(DefaultClusterCallback callback - , Integer stepX, Integer stepY, Integer transitionTime, Integer optionsMask, Integer optionsOverride) { - stepColor(chipClusterPtr, callback, stepX, stepY, transitionTime, optionsMask, optionsOverride, null); - } - - public void stepColor(DefaultClusterCallback callback - , Integer stepX, Integer stepY, Integer transitionTime, Integer optionsMask, Integer optionsOverride - , int timedInvokeTimeoutMs) { - stepColor(chipClusterPtr, callback, stepX, stepY, transitionTime, optionsMask, optionsOverride, timedInvokeTimeoutMs); - } - - public void moveToColorTemperature(DefaultClusterCallback callback - , Integer colorTemperatureMireds, Integer transitionTime, Integer optionsMask, Integer optionsOverride) { - moveToColorTemperature(chipClusterPtr, callback, colorTemperatureMireds, transitionTime, optionsMask, optionsOverride, null); - } - - public void moveToColorTemperature(DefaultClusterCallback callback - , Integer colorTemperatureMireds, Integer transitionTime, Integer optionsMask, Integer optionsOverride - , int timedInvokeTimeoutMs) { - moveToColorTemperature(chipClusterPtr, callback, colorTemperatureMireds, transitionTime, optionsMask, optionsOverride, timedInvokeTimeoutMs); - } - - public void enhancedMoveToHue(DefaultClusterCallback callback - , Integer enhancedHue, Integer direction, Integer transitionTime, Integer optionsMask, Integer optionsOverride) { - enhancedMoveToHue(chipClusterPtr, callback, enhancedHue, direction, transitionTime, optionsMask, optionsOverride, null); - } - - public void enhancedMoveToHue(DefaultClusterCallback callback - , Integer enhancedHue, Integer direction, Integer transitionTime, Integer optionsMask, Integer optionsOverride - , int timedInvokeTimeoutMs) { - enhancedMoveToHue(chipClusterPtr, callback, enhancedHue, direction, transitionTime, optionsMask, optionsOverride, timedInvokeTimeoutMs); - } - - public void enhancedMoveHue(DefaultClusterCallback callback - , Integer moveMode, Integer rate, Integer optionsMask, Integer optionsOverride) { - enhancedMoveHue(chipClusterPtr, callback, moveMode, rate, optionsMask, optionsOverride, null); - } - - public void enhancedMoveHue(DefaultClusterCallback callback - , Integer moveMode, Integer rate, Integer optionsMask, Integer optionsOverride - , int timedInvokeTimeoutMs) { - enhancedMoveHue(chipClusterPtr, callback, moveMode, rate, optionsMask, optionsOverride, timedInvokeTimeoutMs); - } - - public void enhancedStepHue(DefaultClusterCallback callback - , Integer stepMode, Integer stepSize, Integer transitionTime, Integer optionsMask, Integer optionsOverride) { - enhancedStepHue(chipClusterPtr, callback, stepMode, stepSize, transitionTime, optionsMask, optionsOverride, null); - } - - public void enhancedStepHue(DefaultClusterCallback callback - , Integer stepMode, Integer stepSize, Integer transitionTime, Integer optionsMask, Integer optionsOverride - , int timedInvokeTimeoutMs) { - enhancedStepHue(chipClusterPtr, callback, stepMode, stepSize, transitionTime, optionsMask, optionsOverride, timedInvokeTimeoutMs); - } - - public void enhancedMoveToHueAndSaturation(DefaultClusterCallback callback - , Integer enhancedHue, Integer saturation, Integer transitionTime, Integer optionsMask, Integer optionsOverride) { - enhancedMoveToHueAndSaturation(chipClusterPtr, callback, enhancedHue, saturation, transitionTime, optionsMask, optionsOverride, null); - } - - public void enhancedMoveToHueAndSaturation(DefaultClusterCallback callback - , Integer enhancedHue, Integer saturation, Integer transitionTime, Integer optionsMask, Integer optionsOverride - , int timedInvokeTimeoutMs) { - enhancedMoveToHueAndSaturation(chipClusterPtr, callback, enhancedHue, saturation, transitionTime, optionsMask, optionsOverride, timedInvokeTimeoutMs); - } - - public void colorLoopSet(DefaultClusterCallback callback - , Integer updateFlags, Integer action, Integer direction, Integer time, Integer startHue, Integer optionsMask, Integer optionsOverride) { - colorLoopSet(chipClusterPtr, callback, updateFlags, action, direction, time, startHue, optionsMask, optionsOverride, null); - } - - public void colorLoopSet(DefaultClusterCallback callback - , Integer updateFlags, Integer action, Integer direction, Integer time, Integer startHue, Integer optionsMask, Integer optionsOverride - , int timedInvokeTimeoutMs) { - colorLoopSet(chipClusterPtr, callback, updateFlags, action, direction, time, startHue, optionsMask, optionsOverride, timedInvokeTimeoutMs); - } - - public void stopMoveStep(DefaultClusterCallback callback - , Integer optionsMask, Integer optionsOverride) { - stopMoveStep(chipClusterPtr, callback, optionsMask, optionsOverride, null); - } - - public void stopMoveStep(DefaultClusterCallback callback - , Integer optionsMask, Integer optionsOverride - , int timedInvokeTimeoutMs) { - stopMoveStep(chipClusterPtr, callback, optionsMask, optionsOverride, timedInvokeTimeoutMs); - } - - public void moveColorTemperature(DefaultClusterCallback callback - , Integer moveMode, Integer rate, Integer colorTemperatureMinimumMireds, Integer colorTemperatureMaximumMireds, Integer optionsMask, Integer optionsOverride) { - moveColorTemperature(chipClusterPtr, callback, moveMode, rate, colorTemperatureMinimumMireds, colorTemperatureMaximumMireds, optionsMask, optionsOverride, null); - } - - public void moveColorTemperature(DefaultClusterCallback callback - , Integer moveMode, Integer rate, Integer colorTemperatureMinimumMireds, Integer colorTemperatureMaximumMireds, Integer optionsMask, Integer optionsOverride - , int timedInvokeTimeoutMs) { - moveColorTemperature(chipClusterPtr, callback, moveMode, rate, colorTemperatureMinimumMireds, colorTemperatureMaximumMireds, optionsMask, optionsOverride, timedInvokeTimeoutMs); - } - - public void stepColorTemperature(DefaultClusterCallback callback - , Integer stepMode, Integer stepSize, Integer transitionTime, Integer colorTemperatureMinimumMireds, Integer colorTemperatureMaximumMireds, Integer optionsMask, Integer optionsOverride) { - stepColorTemperature(chipClusterPtr, callback, stepMode, stepSize, transitionTime, colorTemperatureMinimumMireds, colorTemperatureMaximumMireds, optionsMask, optionsOverride, null); - } - - public void stepColorTemperature(DefaultClusterCallback callback - , Integer stepMode, Integer stepSize, Integer transitionTime, Integer colorTemperatureMinimumMireds, Integer colorTemperatureMaximumMireds, Integer optionsMask, Integer optionsOverride - , int timedInvokeTimeoutMs) { - stepColorTemperature(chipClusterPtr, callback, stepMode, stepSize, transitionTime, colorTemperatureMinimumMireds, colorTemperatureMaximumMireds, optionsMask, optionsOverride, timedInvokeTimeoutMs); - } - private native void moveToHue(long chipClusterPtr, DefaultClusterCallback Callback - , Integer hue, Integer direction, Integer transitionTime, Integer optionsMask, Integer optionsOverride - , @Nullable Integer timedInvokeTimeoutMs); - private native void moveHue(long chipClusterPtr, DefaultClusterCallback Callback - , Integer moveMode, Integer rate, Integer optionsMask, Integer optionsOverride - , @Nullable Integer timedInvokeTimeoutMs); - private native void stepHue(long chipClusterPtr, DefaultClusterCallback Callback - , Integer stepMode, Integer stepSize, Integer transitionTime, Integer optionsMask, Integer optionsOverride - , @Nullable Integer timedInvokeTimeoutMs); - private native void moveToSaturation(long chipClusterPtr, DefaultClusterCallback Callback - , Integer saturation, Integer transitionTime, Integer optionsMask, Integer optionsOverride - , @Nullable Integer timedInvokeTimeoutMs); - private native void moveSaturation(long chipClusterPtr, DefaultClusterCallback Callback - , Integer moveMode, Integer rate, Integer optionsMask, Integer optionsOverride - , @Nullable Integer timedInvokeTimeoutMs); - private native void stepSaturation(long chipClusterPtr, DefaultClusterCallback Callback - , Integer stepMode, Integer stepSize, Integer transitionTime, Integer optionsMask, Integer optionsOverride - , @Nullable Integer timedInvokeTimeoutMs); - private native void moveToHueAndSaturation(long chipClusterPtr, DefaultClusterCallback Callback - , Integer hue, Integer saturation, Integer transitionTime, Integer optionsMask, Integer optionsOverride - , @Nullable Integer timedInvokeTimeoutMs); - private native void moveToColor(long chipClusterPtr, DefaultClusterCallback Callback - , Integer colorX, Integer colorY, Integer transitionTime, Integer optionsMask, Integer optionsOverride - , @Nullable Integer timedInvokeTimeoutMs); - private native void moveColor(long chipClusterPtr, DefaultClusterCallback Callback - , Integer rateX, Integer rateY, Integer optionsMask, Integer optionsOverride - , @Nullable Integer timedInvokeTimeoutMs); - private native void stepColor(long chipClusterPtr, DefaultClusterCallback Callback - , Integer stepX, Integer stepY, Integer transitionTime, Integer optionsMask, Integer optionsOverride - , @Nullable Integer timedInvokeTimeoutMs); - private native void moveToColorTemperature(long chipClusterPtr, DefaultClusterCallback Callback - , Integer colorTemperatureMireds, Integer transitionTime, Integer optionsMask, Integer optionsOverride - , @Nullable Integer timedInvokeTimeoutMs); - private native void enhancedMoveToHue(long chipClusterPtr, DefaultClusterCallback Callback - , Integer enhancedHue, Integer direction, Integer transitionTime, Integer optionsMask, Integer optionsOverride - , @Nullable Integer timedInvokeTimeoutMs); - private native void enhancedMoveHue(long chipClusterPtr, DefaultClusterCallback Callback - , Integer moveMode, Integer rate, Integer optionsMask, Integer optionsOverride - , @Nullable Integer timedInvokeTimeoutMs); - private native void enhancedStepHue(long chipClusterPtr, DefaultClusterCallback Callback - , Integer stepMode, Integer stepSize, Integer transitionTime, Integer optionsMask, Integer optionsOverride - , @Nullable Integer timedInvokeTimeoutMs); - private native void enhancedMoveToHueAndSaturation(long chipClusterPtr, DefaultClusterCallback Callback - , Integer enhancedHue, Integer saturation, Integer transitionTime, Integer optionsMask, Integer optionsOverride - , @Nullable Integer timedInvokeTimeoutMs); - private native void colorLoopSet(long chipClusterPtr, DefaultClusterCallback Callback - , Integer updateFlags, Integer action, Integer direction, Integer time, Integer startHue, Integer optionsMask, Integer optionsOverride - , @Nullable Integer timedInvokeTimeoutMs); - private native void stopMoveStep(long chipClusterPtr, DefaultClusterCallback Callback - , Integer optionsMask, Integer optionsOverride - , @Nullable Integer timedInvokeTimeoutMs); - private native void moveColorTemperature(long chipClusterPtr, DefaultClusterCallback Callback - , Integer moveMode, Integer rate, Integer colorTemperatureMinimumMireds, Integer colorTemperatureMaximumMireds, Integer optionsMask, Integer optionsOverride - , @Nullable Integer timedInvokeTimeoutMs); - private native void stepColorTemperature(long chipClusterPtr, DefaultClusterCallback Callback - , Integer stepMode, Integer stepSize, Integer transitionTime, Integer colorTemperatureMinimumMireds, Integer colorTemperatureMaximumMireds, Integer optionsMask, Integer optionsOverride - , @Nullable Integer timedInvokeTimeoutMs); - - public interface NumberOfPrimariesAttributeCallback { - void onSuccess(@Nullable Integer value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface Primary1IntensityAttributeCallback { - void onSuccess(@Nullable Integer value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface Primary2IntensityAttributeCallback { - void onSuccess(@Nullable Integer value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface Primary3IntensityAttributeCallback { - void onSuccess(@Nullable Integer value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface Primary4IntensityAttributeCallback { - void onSuccess(@Nullable Integer value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface Primary5IntensityAttributeCallback { - void onSuccess(@Nullable Integer value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface Primary6IntensityAttributeCallback { - void onSuccess(@Nullable Integer value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface ColorPointRIntensityAttributeCallback { - void onSuccess(@Nullable Integer value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface ColorPointGIntensityAttributeCallback { - void onSuccess(@Nullable Integer value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface ColorPointBIntensityAttributeCallback { - void onSuccess(@Nullable Integer value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface StartUpColorTemperatureMiredsAttributeCallback { - void onSuccess(@Nullable Integer value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface GeneratedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AcceptedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface EventListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AttributeListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - - public void readCurrentHueAttribute( - IntegerAttributeCallback callback - ) { - readCurrentHueAttribute(chipClusterPtr, callback); - } - public void subscribeCurrentHueAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeCurrentHueAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readCurrentSaturationAttribute( - IntegerAttributeCallback callback - ) { - readCurrentSaturationAttribute(chipClusterPtr, callback); - } - public void subscribeCurrentSaturationAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeCurrentSaturationAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readRemainingTimeAttribute( - IntegerAttributeCallback callback - ) { - readRemainingTimeAttribute(chipClusterPtr, callback); - } - public void subscribeRemainingTimeAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeRemainingTimeAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readCurrentXAttribute( - IntegerAttributeCallback callback - ) { - readCurrentXAttribute(chipClusterPtr, callback); - } - public void subscribeCurrentXAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeCurrentXAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readCurrentYAttribute( - IntegerAttributeCallback callback - ) { - readCurrentYAttribute(chipClusterPtr, callback); - } - public void subscribeCurrentYAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeCurrentYAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readDriftCompensationAttribute( - IntegerAttributeCallback callback - ) { - readDriftCompensationAttribute(chipClusterPtr, callback); - } - public void subscribeDriftCompensationAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeDriftCompensationAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readCompensationTextAttribute( - CharStringAttributeCallback callback - ) { - readCompensationTextAttribute(chipClusterPtr, callback); - } - public void subscribeCompensationTextAttribute( - CharStringAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeCompensationTextAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readColorTemperatureMiredsAttribute( - IntegerAttributeCallback callback - ) { - readColorTemperatureMiredsAttribute(chipClusterPtr, callback); - } - public void subscribeColorTemperatureMiredsAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeColorTemperatureMiredsAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readColorModeAttribute( - IntegerAttributeCallback callback - ) { - readColorModeAttribute(chipClusterPtr, callback); - } - public void subscribeColorModeAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeColorModeAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readOptionsAttribute( - IntegerAttributeCallback callback - ) { - readOptionsAttribute(chipClusterPtr, callback); - } - public void writeOptionsAttribute(DefaultClusterCallback callback, Integer value) { - writeOptionsAttribute(chipClusterPtr, callback, value, null); - } - - public void writeOptionsAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeOptionsAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeOptionsAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeOptionsAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readNumberOfPrimariesAttribute( - NumberOfPrimariesAttributeCallback callback - ) { - readNumberOfPrimariesAttribute(chipClusterPtr, callback); - } - public void subscribeNumberOfPrimariesAttribute( - NumberOfPrimariesAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeNumberOfPrimariesAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readPrimary1XAttribute( - IntegerAttributeCallback callback - ) { - readPrimary1XAttribute(chipClusterPtr, callback); - } - public void subscribePrimary1XAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribePrimary1XAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readPrimary1YAttribute( - IntegerAttributeCallback callback - ) { - readPrimary1YAttribute(chipClusterPtr, callback); - } - public void subscribePrimary1YAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribePrimary1YAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readPrimary1IntensityAttribute( - Primary1IntensityAttributeCallback callback - ) { - readPrimary1IntensityAttribute(chipClusterPtr, callback); - } - public void subscribePrimary1IntensityAttribute( - Primary1IntensityAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribePrimary1IntensityAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readPrimary2XAttribute( - IntegerAttributeCallback callback - ) { - readPrimary2XAttribute(chipClusterPtr, callback); - } - public void subscribePrimary2XAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribePrimary2XAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readPrimary2YAttribute( - IntegerAttributeCallback callback - ) { - readPrimary2YAttribute(chipClusterPtr, callback); - } - public void subscribePrimary2YAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribePrimary2YAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readPrimary2IntensityAttribute( - Primary2IntensityAttributeCallback callback - ) { - readPrimary2IntensityAttribute(chipClusterPtr, callback); - } - public void subscribePrimary2IntensityAttribute( - Primary2IntensityAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribePrimary2IntensityAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readPrimary3XAttribute( - IntegerAttributeCallback callback - ) { - readPrimary3XAttribute(chipClusterPtr, callback); - } - public void subscribePrimary3XAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribePrimary3XAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readPrimary3YAttribute( - IntegerAttributeCallback callback - ) { - readPrimary3YAttribute(chipClusterPtr, callback); - } - public void subscribePrimary3YAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribePrimary3YAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readPrimary3IntensityAttribute( - Primary3IntensityAttributeCallback callback - ) { - readPrimary3IntensityAttribute(chipClusterPtr, callback); - } - public void subscribePrimary3IntensityAttribute( - Primary3IntensityAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribePrimary3IntensityAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readPrimary4XAttribute( - IntegerAttributeCallback callback - ) { - readPrimary4XAttribute(chipClusterPtr, callback); - } - public void subscribePrimary4XAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribePrimary4XAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readPrimary4YAttribute( - IntegerAttributeCallback callback - ) { - readPrimary4YAttribute(chipClusterPtr, callback); - } - public void subscribePrimary4YAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribePrimary4YAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readPrimary4IntensityAttribute( - Primary4IntensityAttributeCallback callback - ) { - readPrimary4IntensityAttribute(chipClusterPtr, callback); - } - public void subscribePrimary4IntensityAttribute( - Primary4IntensityAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribePrimary4IntensityAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readPrimary5XAttribute( - IntegerAttributeCallback callback - ) { - readPrimary5XAttribute(chipClusterPtr, callback); - } - public void subscribePrimary5XAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribePrimary5XAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readPrimary5YAttribute( - IntegerAttributeCallback callback - ) { - readPrimary5YAttribute(chipClusterPtr, callback); - } - public void subscribePrimary5YAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribePrimary5YAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readPrimary5IntensityAttribute( - Primary5IntensityAttributeCallback callback - ) { - readPrimary5IntensityAttribute(chipClusterPtr, callback); - } - public void subscribePrimary5IntensityAttribute( - Primary5IntensityAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribePrimary5IntensityAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readPrimary6XAttribute( - IntegerAttributeCallback callback - ) { - readPrimary6XAttribute(chipClusterPtr, callback); - } - public void subscribePrimary6XAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribePrimary6XAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readPrimary6YAttribute( - IntegerAttributeCallback callback - ) { - readPrimary6YAttribute(chipClusterPtr, callback); - } - public void subscribePrimary6YAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribePrimary6YAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readPrimary6IntensityAttribute( - Primary6IntensityAttributeCallback callback - ) { - readPrimary6IntensityAttribute(chipClusterPtr, callback); - } - public void subscribePrimary6IntensityAttribute( - Primary6IntensityAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribePrimary6IntensityAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readWhitePointXAttribute( - IntegerAttributeCallback callback - ) { - readWhitePointXAttribute(chipClusterPtr, callback); - } - public void writeWhitePointXAttribute(DefaultClusterCallback callback, Integer value) { - writeWhitePointXAttribute(chipClusterPtr, callback, value, null); - } - - public void writeWhitePointXAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeWhitePointXAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeWhitePointXAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeWhitePointXAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readWhitePointYAttribute( - IntegerAttributeCallback callback - ) { - readWhitePointYAttribute(chipClusterPtr, callback); - } - public void writeWhitePointYAttribute(DefaultClusterCallback callback, Integer value) { - writeWhitePointYAttribute(chipClusterPtr, callback, value, null); - } - - public void writeWhitePointYAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeWhitePointYAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeWhitePointYAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeWhitePointYAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readColorPointRXAttribute( - IntegerAttributeCallback callback - ) { - readColorPointRXAttribute(chipClusterPtr, callback); - } - public void writeColorPointRXAttribute(DefaultClusterCallback callback, Integer value) { - writeColorPointRXAttribute(chipClusterPtr, callback, value, null); - } - - public void writeColorPointRXAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeColorPointRXAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeColorPointRXAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeColorPointRXAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readColorPointRYAttribute( - IntegerAttributeCallback callback - ) { - readColorPointRYAttribute(chipClusterPtr, callback); - } - public void writeColorPointRYAttribute(DefaultClusterCallback callback, Integer value) { - writeColorPointRYAttribute(chipClusterPtr, callback, value, null); - } - - public void writeColorPointRYAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeColorPointRYAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeColorPointRYAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeColorPointRYAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readColorPointRIntensityAttribute( - ColorPointRIntensityAttributeCallback callback - ) { - readColorPointRIntensityAttribute(chipClusterPtr, callback); - } - public void writeColorPointRIntensityAttribute(DefaultClusterCallback callback, Integer value) { - writeColorPointRIntensityAttribute(chipClusterPtr, callback, value, null); - } - - public void writeColorPointRIntensityAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeColorPointRIntensityAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeColorPointRIntensityAttribute( - ColorPointRIntensityAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeColorPointRIntensityAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readColorPointGXAttribute( - IntegerAttributeCallback callback - ) { - readColorPointGXAttribute(chipClusterPtr, callback); - } - public void writeColorPointGXAttribute(DefaultClusterCallback callback, Integer value) { - writeColorPointGXAttribute(chipClusterPtr, callback, value, null); - } - - public void writeColorPointGXAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeColorPointGXAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeColorPointGXAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeColorPointGXAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readColorPointGYAttribute( - IntegerAttributeCallback callback - ) { - readColorPointGYAttribute(chipClusterPtr, callback); - } - public void writeColorPointGYAttribute(DefaultClusterCallback callback, Integer value) { - writeColorPointGYAttribute(chipClusterPtr, callback, value, null); - } - - public void writeColorPointGYAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeColorPointGYAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeColorPointGYAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeColorPointGYAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readColorPointGIntensityAttribute( - ColorPointGIntensityAttributeCallback callback - ) { - readColorPointGIntensityAttribute(chipClusterPtr, callback); - } - public void writeColorPointGIntensityAttribute(DefaultClusterCallback callback, Integer value) { - writeColorPointGIntensityAttribute(chipClusterPtr, callback, value, null); - } - - public void writeColorPointGIntensityAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeColorPointGIntensityAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeColorPointGIntensityAttribute( - ColorPointGIntensityAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeColorPointGIntensityAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readColorPointBXAttribute( - IntegerAttributeCallback callback - ) { - readColorPointBXAttribute(chipClusterPtr, callback); - } - public void writeColorPointBXAttribute(DefaultClusterCallback callback, Integer value) { - writeColorPointBXAttribute(chipClusterPtr, callback, value, null); - } - - public void writeColorPointBXAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeColorPointBXAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeColorPointBXAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeColorPointBXAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readColorPointBYAttribute( - IntegerAttributeCallback callback - ) { - readColorPointBYAttribute(chipClusterPtr, callback); - } - public void writeColorPointBYAttribute(DefaultClusterCallback callback, Integer value) { - writeColorPointBYAttribute(chipClusterPtr, callback, value, null); - } - - public void writeColorPointBYAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeColorPointBYAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeColorPointBYAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeColorPointBYAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readColorPointBIntensityAttribute( - ColorPointBIntensityAttributeCallback callback - ) { - readColorPointBIntensityAttribute(chipClusterPtr, callback); - } - public void writeColorPointBIntensityAttribute(DefaultClusterCallback callback, Integer value) { - writeColorPointBIntensityAttribute(chipClusterPtr, callback, value, null); - } - - public void writeColorPointBIntensityAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeColorPointBIntensityAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeColorPointBIntensityAttribute( - ColorPointBIntensityAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeColorPointBIntensityAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readEnhancedCurrentHueAttribute( - IntegerAttributeCallback callback - ) { - readEnhancedCurrentHueAttribute(chipClusterPtr, callback); - } - public void subscribeEnhancedCurrentHueAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeEnhancedCurrentHueAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readEnhancedColorModeAttribute( - IntegerAttributeCallback callback - ) { - readEnhancedColorModeAttribute(chipClusterPtr, callback); - } - public void subscribeEnhancedColorModeAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeEnhancedColorModeAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readColorLoopActiveAttribute( - IntegerAttributeCallback callback - ) { - readColorLoopActiveAttribute(chipClusterPtr, callback); - } - public void subscribeColorLoopActiveAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeColorLoopActiveAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readColorLoopDirectionAttribute( - IntegerAttributeCallback callback - ) { - readColorLoopDirectionAttribute(chipClusterPtr, callback); - } - public void subscribeColorLoopDirectionAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeColorLoopDirectionAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readColorLoopTimeAttribute( - IntegerAttributeCallback callback - ) { - readColorLoopTimeAttribute(chipClusterPtr, callback); - } - public void subscribeColorLoopTimeAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeColorLoopTimeAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readColorLoopStartEnhancedHueAttribute( - IntegerAttributeCallback callback - ) { - readColorLoopStartEnhancedHueAttribute(chipClusterPtr, callback); - } - public void subscribeColorLoopStartEnhancedHueAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeColorLoopStartEnhancedHueAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readColorLoopStoredEnhancedHueAttribute( - IntegerAttributeCallback callback - ) { - readColorLoopStoredEnhancedHueAttribute(chipClusterPtr, callback); - } - public void subscribeColorLoopStoredEnhancedHueAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeColorLoopStoredEnhancedHueAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readColorCapabilitiesAttribute( - IntegerAttributeCallback callback - ) { - readColorCapabilitiesAttribute(chipClusterPtr, callback); - } - public void subscribeColorCapabilitiesAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeColorCapabilitiesAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readColorTempPhysicalMinMiredsAttribute( - IntegerAttributeCallback callback - ) { - readColorTempPhysicalMinMiredsAttribute(chipClusterPtr, callback); - } - public void subscribeColorTempPhysicalMinMiredsAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeColorTempPhysicalMinMiredsAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readColorTempPhysicalMaxMiredsAttribute( - IntegerAttributeCallback callback - ) { - readColorTempPhysicalMaxMiredsAttribute(chipClusterPtr, callback); - } - public void subscribeColorTempPhysicalMaxMiredsAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeColorTempPhysicalMaxMiredsAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readCoupleColorTempToLevelMinMiredsAttribute( - IntegerAttributeCallback callback - ) { - readCoupleColorTempToLevelMinMiredsAttribute(chipClusterPtr, callback); - } - public void subscribeCoupleColorTempToLevelMinMiredsAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeCoupleColorTempToLevelMinMiredsAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readStartUpColorTemperatureMiredsAttribute( - StartUpColorTemperatureMiredsAttributeCallback callback - ) { - readStartUpColorTemperatureMiredsAttribute(chipClusterPtr, callback); - } - public void writeStartUpColorTemperatureMiredsAttribute(DefaultClusterCallback callback, Integer value) { - writeStartUpColorTemperatureMiredsAttribute(chipClusterPtr, callback, value, null); - } - - public void writeStartUpColorTemperatureMiredsAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeStartUpColorTemperatureMiredsAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeStartUpColorTemperatureMiredsAttribute( - StartUpColorTemperatureMiredsAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeStartUpColorTemperatureMiredsAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - ) { - readGeneratedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - ) { - readAcceptedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readEventListAttribute( - EventListAttributeCallback callback - ) { - readEventListAttribute(chipClusterPtr, callback); - } - public void subscribeEventListAttribute( - EventListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAttributeListAttribute( - AttributeListAttributeCallback callback - ) { - readAttributeListAttribute(chipClusterPtr, callback); - } - public void subscribeAttributeListAttribute( - AttributeListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readFeatureMapAttribute( - LongAttributeCallback callback - ) { - readFeatureMapAttribute(chipClusterPtr, callback); - } - public void subscribeFeatureMapAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readClusterRevisionAttribute( - IntegerAttributeCallback callback - ) { - readClusterRevisionAttribute(chipClusterPtr, callback); - } - public void subscribeClusterRevisionAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - private native void readCurrentHueAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeCurrentHueAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readCurrentSaturationAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeCurrentSaturationAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readRemainingTimeAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeRemainingTimeAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readCurrentXAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeCurrentXAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readCurrentYAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeCurrentYAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readDriftCompensationAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeDriftCompensationAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readCompensationTextAttribute(long chipClusterPtr, - CharStringAttributeCallback callback - ); - private native void subscribeCompensationTextAttribute(long chipClusterPtr, - CharStringAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readColorTemperatureMiredsAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeColorTemperatureMiredsAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readColorModeAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeColorModeAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readOptionsAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - - private native void writeOptionsAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeOptionsAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readNumberOfPrimariesAttribute(long chipClusterPtr, - NumberOfPrimariesAttributeCallback callback - ); - private native void subscribeNumberOfPrimariesAttribute(long chipClusterPtr, - NumberOfPrimariesAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readPrimary1XAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribePrimary1XAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readPrimary1YAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribePrimary1YAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readPrimary1IntensityAttribute(long chipClusterPtr, - Primary1IntensityAttributeCallback callback - ); - private native void subscribePrimary1IntensityAttribute(long chipClusterPtr, - Primary1IntensityAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readPrimary2XAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribePrimary2XAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readPrimary2YAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribePrimary2YAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readPrimary2IntensityAttribute(long chipClusterPtr, - Primary2IntensityAttributeCallback callback - ); - private native void subscribePrimary2IntensityAttribute(long chipClusterPtr, - Primary2IntensityAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readPrimary3XAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribePrimary3XAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readPrimary3YAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribePrimary3YAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readPrimary3IntensityAttribute(long chipClusterPtr, - Primary3IntensityAttributeCallback callback - ); - private native void subscribePrimary3IntensityAttribute(long chipClusterPtr, - Primary3IntensityAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readPrimary4XAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribePrimary4XAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readPrimary4YAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribePrimary4YAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readPrimary4IntensityAttribute(long chipClusterPtr, - Primary4IntensityAttributeCallback callback - ); - private native void subscribePrimary4IntensityAttribute(long chipClusterPtr, - Primary4IntensityAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readPrimary5XAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribePrimary5XAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readPrimary5YAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribePrimary5YAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readPrimary5IntensityAttribute(long chipClusterPtr, - Primary5IntensityAttributeCallback callback - ); - private native void subscribePrimary5IntensityAttribute(long chipClusterPtr, - Primary5IntensityAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readPrimary6XAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribePrimary6XAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readPrimary6YAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribePrimary6YAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readPrimary6IntensityAttribute(long chipClusterPtr, - Primary6IntensityAttributeCallback callback - ); - private native void subscribePrimary6IntensityAttribute(long chipClusterPtr, - Primary6IntensityAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readWhitePointXAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - - private native void writeWhitePointXAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeWhitePointXAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readWhitePointYAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - - private native void writeWhitePointYAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeWhitePointYAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readColorPointRXAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - - private native void writeColorPointRXAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeColorPointRXAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readColorPointRYAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - - private native void writeColorPointRYAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeColorPointRYAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readColorPointRIntensityAttribute(long chipClusterPtr, - ColorPointRIntensityAttributeCallback callback - ); - - private native void writeColorPointRIntensityAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeColorPointRIntensityAttribute(long chipClusterPtr, - ColorPointRIntensityAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readColorPointGXAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - - private native void writeColorPointGXAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeColorPointGXAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readColorPointGYAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - - private native void writeColorPointGYAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeColorPointGYAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readColorPointGIntensityAttribute(long chipClusterPtr, - ColorPointGIntensityAttributeCallback callback - ); - - private native void writeColorPointGIntensityAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeColorPointGIntensityAttribute(long chipClusterPtr, - ColorPointGIntensityAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readColorPointBXAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - - private native void writeColorPointBXAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeColorPointBXAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readColorPointBYAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - - private native void writeColorPointBYAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeColorPointBYAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readColorPointBIntensityAttribute(long chipClusterPtr, - ColorPointBIntensityAttributeCallback callback - ); - - private native void writeColorPointBIntensityAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeColorPointBIntensityAttribute(long chipClusterPtr, - ColorPointBIntensityAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readEnhancedCurrentHueAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeEnhancedCurrentHueAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readEnhancedColorModeAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeEnhancedColorModeAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readColorLoopActiveAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeColorLoopActiveAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readColorLoopDirectionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeColorLoopDirectionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readColorLoopTimeAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeColorLoopTimeAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readColorLoopStartEnhancedHueAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeColorLoopStartEnhancedHueAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readColorLoopStoredEnhancedHueAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeColorLoopStoredEnhancedHueAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readColorCapabilitiesAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeColorCapabilitiesAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readColorTempPhysicalMinMiredsAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeColorTempPhysicalMinMiredsAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readColorTempPhysicalMaxMiredsAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeColorTempPhysicalMaxMiredsAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readCoupleColorTempToLevelMinMiredsAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeCoupleColorTempToLevelMinMiredsAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readStartUpColorTemperatureMiredsAttribute(long chipClusterPtr, - StartUpColorTemperatureMiredsAttributeCallback callback - ); - - private native void writeStartUpColorTemperatureMiredsAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeStartUpColorTemperatureMiredsAttribute(long chipClusterPtr, - StartUpColorTemperatureMiredsAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - ); - private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - ); - private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - ); - private native void subscribeEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - ); - private native void subscribeAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - } - - public static class BallastConfigurationCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 0x00000301L; - - public BallastConfigurationCluster(long devicePtr, int endpointId) { - super(devicePtr, endpointId); - } - - @Override - public native long initWithDevice(long devicePtr, int endpointId); - - public interface IntrinsicBallastFactorAttributeCallback { - void onSuccess(@Nullable Integer value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface BallastFactorAdjustmentAttributeCallback { - void onSuccess(@Nullable Integer value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface LampRatedHoursAttributeCallback { - void onSuccess(@Nullable Long value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface LampBurnHoursAttributeCallback { - void onSuccess(@Nullable Long value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface LampBurnHoursTripPointAttributeCallback { - void onSuccess(@Nullable Long value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface GeneratedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AcceptedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface EventListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AttributeListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - - public void readPhysicalMinLevelAttribute( - IntegerAttributeCallback callback - ) { - readPhysicalMinLevelAttribute(chipClusterPtr, callback); - } - public void subscribePhysicalMinLevelAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribePhysicalMinLevelAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readPhysicalMaxLevelAttribute( - IntegerAttributeCallback callback - ) { - readPhysicalMaxLevelAttribute(chipClusterPtr, callback); - } - public void subscribePhysicalMaxLevelAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribePhysicalMaxLevelAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readBallastStatusAttribute( - IntegerAttributeCallback callback - ) { - readBallastStatusAttribute(chipClusterPtr, callback); - } - public void subscribeBallastStatusAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeBallastStatusAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readMinLevelAttribute( - IntegerAttributeCallback callback - ) { - readMinLevelAttribute(chipClusterPtr, callback); - } - public void writeMinLevelAttribute(DefaultClusterCallback callback, Integer value) { - writeMinLevelAttribute(chipClusterPtr, callback, value, null); - } - - public void writeMinLevelAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeMinLevelAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeMinLevelAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeMinLevelAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readMaxLevelAttribute( - IntegerAttributeCallback callback - ) { - readMaxLevelAttribute(chipClusterPtr, callback); - } - public void writeMaxLevelAttribute(DefaultClusterCallback callback, Integer value) { - writeMaxLevelAttribute(chipClusterPtr, callback, value, null); - } - - public void writeMaxLevelAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeMaxLevelAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeMaxLevelAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeMaxLevelAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readIntrinsicBallastFactorAttribute( - IntrinsicBallastFactorAttributeCallback callback - ) { - readIntrinsicBallastFactorAttribute(chipClusterPtr, callback); - } - public void writeIntrinsicBallastFactorAttribute(DefaultClusterCallback callback, Integer value) { - writeIntrinsicBallastFactorAttribute(chipClusterPtr, callback, value, null); - } - - public void writeIntrinsicBallastFactorAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeIntrinsicBallastFactorAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeIntrinsicBallastFactorAttribute( - IntrinsicBallastFactorAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeIntrinsicBallastFactorAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readBallastFactorAdjustmentAttribute( - BallastFactorAdjustmentAttributeCallback callback - ) { - readBallastFactorAdjustmentAttribute(chipClusterPtr, callback); - } - public void writeBallastFactorAdjustmentAttribute(DefaultClusterCallback callback, Integer value) { - writeBallastFactorAdjustmentAttribute(chipClusterPtr, callback, value, null); - } - - public void writeBallastFactorAdjustmentAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeBallastFactorAdjustmentAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeBallastFactorAdjustmentAttribute( - BallastFactorAdjustmentAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeBallastFactorAdjustmentAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readLampQuantityAttribute( - IntegerAttributeCallback callback - ) { - readLampQuantityAttribute(chipClusterPtr, callback); - } - public void subscribeLampQuantityAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeLampQuantityAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readLampTypeAttribute( - CharStringAttributeCallback callback - ) { - readLampTypeAttribute(chipClusterPtr, callback); - } - public void writeLampTypeAttribute(DefaultClusterCallback callback, String value) { - writeLampTypeAttribute(chipClusterPtr, callback, value, null); - } - - public void writeLampTypeAttribute(DefaultClusterCallback callback, String value, int timedWriteTimeoutMs) { - writeLampTypeAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeLampTypeAttribute( - CharStringAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeLampTypeAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readLampManufacturerAttribute( - CharStringAttributeCallback callback - ) { - readLampManufacturerAttribute(chipClusterPtr, callback); - } - public void writeLampManufacturerAttribute(DefaultClusterCallback callback, String value) { - writeLampManufacturerAttribute(chipClusterPtr, callback, value, null); - } - - public void writeLampManufacturerAttribute(DefaultClusterCallback callback, String value, int timedWriteTimeoutMs) { - writeLampManufacturerAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeLampManufacturerAttribute( - CharStringAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeLampManufacturerAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readLampRatedHoursAttribute( - LampRatedHoursAttributeCallback callback - ) { - readLampRatedHoursAttribute(chipClusterPtr, callback); - } - public void writeLampRatedHoursAttribute(DefaultClusterCallback callback, Long value) { - writeLampRatedHoursAttribute(chipClusterPtr, callback, value, null); - } - - public void writeLampRatedHoursAttribute(DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { - writeLampRatedHoursAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeLampRatedHoursAttribute( - LampRatedHoursAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeLampRatedHoursAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readLampBurnHoursAttribute( - LampBurnHoursAttributeCallback callback - ) { - readLampBurnHoursAttribute(chipClusterPtr, callback); - } - public void writeLampBurnHoursAttribute(DefaultClusterCallback callback, Long value) { - writeLampBurnHoursAttribute(chipClusterPtr, callback, value, null); - } - - public void writeLampBurnHoursAttribute(DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { - writeLampBurnHoursAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeLampBurnHoursAttribute( - LampBurnHoursAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeLampBurnHoursAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readLampAlarmModeAttribute( - IntegerAttributeCallback callback - ) { - readLampAlarmModeAttribute(chipClusterPtr, callback); - } - public void writeLampAlarmModeAttribute(DefaultClusterCallback callback, Integer value) { - writeLampAlarmModeAttribute(chipClusterPtr, callback, value, null); - } - - public void writeLampAlarmModeAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeLampAlarmModeAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeLampAlarmModeAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeLampAlarmModeAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readLampBurnHoursTripPointAttribute( - LampBurnHoursTripPointAttributeCallback callback - ) { - readLampBurnHoursTripPointAttribute(chipClusterPtr, callback); - } - public void writeLampBurnHoursTripPointAttribute(DefaultClusterCallback callback, Long value) { - writeLampBurnHoursTripPointAttribute(chipClusterPtr, callback, value, null); - } - - public void writeLampBurnHoursTripPointAttribute(DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { - writeLampBurnHoursTripPointAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeLampBurnHoursTripPointAttribute( - LampBurnHoursTripPointAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeLampBurnHoursTripPointAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - ) { - readGeneratedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - ) { - readAcceptedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readEventListAttribute( - EventListAttributeCallback callback - ) { - readEventListAttribute(chipClusterPtr, callback); - } - public void subscribeEventListAttribute( - EventListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAttributeListAttribute( - AttributeListAttributeCallback callback - ) { - readAttributeListAttribute(chipClusterPtr, callback); - } - public void subscribeAttributeListAttribute( - AttributeListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readFeatureMapAttribute( - LongAttributeCallback callback - ) { - readFeatureMapAttribute(chipClusterPtr, callback); - } - public void subscribeFeatureMapAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readClusterRevisionAttribute( - IntegerAttributeCallback callback - ) { - readClusterRevisionAttribute(chipClusterPtr, callback); - } - public void subscribeClusterRevisionAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - private native void readPhysicalMinLevelAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribePhysicalMinLevelAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readPhysicalMaxLevelAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribePhysicalMaxLevelAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readBallastStatusAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeBallastStatusAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readMinLevelAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - - private native void writeMinLevelAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeMinLevelAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readMaxLevelAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - - private native void writeMaxLevelAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeMaxLevelAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readIntrinsicBallastFactorAttribute(long chipClusterPtr, - IntrinsicBallastFactorAttributeCallback callback - ); - - private native void writeIntrinsicBallastFactorAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeIntrinsicBallastFactorAttribute(long chipClusterPtr, - IntrinsicBallastFactorAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readBallastFactorAdjustmentAttribute(long chipClusterPtr, - BallastFactorAdjustmentAttributeCallback callback - ); - - private native void writeBallastFactorAdjustmentAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeBallastFactorAdjustmentAttribute(long chipClusterPtr, - BallastFactorAdjustmentAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readLampQuantityAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeLampQuantityAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readLampTypeAttribute(long chipClusterPtr, - CharStringAttributeCallback callback - ); - - private native void writeLampTypeAttribute(long chipClusterPtr, DefaultClusterCallback callback, String value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeLampTypeAttribute(long chipClusterPtr, - CharStringAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readLampManufacturerAttribute(long chipClusterPtr, - CharStringAttributeCallback callback - ); - - private native void writeLampManufacturerAttribute(long chipClusterPtr, DefaultClusterCallback callback, String value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeLampManufacturerAttribute(long chipClusterPtr, - CharStringAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readLampRatedHoursAttribute(long chipClusterPtr, - LampRatedHoursAttributeCallback callback - ); - - private native void writeLampRatedHoursAttribute(long chipClusterPtr, DefaultClusterCallback callback, Long value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeLampRatedHoursAttribute(long chipClusterPtr, - LampRatedHoursAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readLampBurnHoursAttribute(long chipClusterPtr, - LampBurnHoursAttributeCallback callback - ); - - private native void writeLampBurnHoursAttribute(long chipClusterPtr, DefaultClusterCallback callback, Long value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeLampBurnHoursAttribute(long chipClusterPtr, - LampBurnHoursAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readLampAlarmModeAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - - private native void writeLampAlarmModeAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeLampAlarmModeAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readLampBurnHoursTripPointAttribute(long chipClusterPtr, - LampBurnHoursTripPointAttributeCallback callback - ); - - private native void writeLampBurnHoursTripPointAttribute(long chipClusterPtr, DefaultClusterCallback callback, Long value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeLampBurnHoursTripPointAttribute(long chipClusterPtr, - LampBurnHoursTripPointAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - ); - private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - ); - private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - ); - private native void subscribeEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - ); - private native void subscribeAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - } - - public static class IlluminanceMeasurementCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 0x00000400L; - - public IlluminanceMeasurementCluster(long devicePtr, int endpointId) { - super(devicePtr, endpointId); - } - - @Override - public native long initWithDevice(long devicePtr, int endpointId); - - public interface MeasuredValueAttributeCallback { - void onSuccess(@Nullable Integer value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface MinMeasuredValueAttributeCallback { - void onSuccess(@Nullable Integer value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface MaxMeasuredValueAttributeCallback { - void onSuccess(@Nullable Integer value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface LightSensorTypeAttributeCallback { - void onSuccess(@Nullable Integer value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface GeneratedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AcceptedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface EventListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AttributeListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - - public void readMeasuredValueAttribute( - MeasuredValueAttributeCallback callback - ) { - readMeasuredValueAttribute(chipClusterPtr, callback); - } - public void subscribeMeasuredValueAttribute( - MeasuredValueAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeMeasuredValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readMinMeasuredValueAttribute( - MinMeasuredValueAttributeCallback callback - ) { - readMinMeasuredValueAttribute(chipClusterPtr, callback); - } - public void subscribeMinMeasuredValueAttribute( - MinMeasuredValueAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeMinMeasuredValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readMaxMeasuredValueAttribute( - MaxMeasuredValueAttributeCallback callback - ) { - readMaxMeasuredValueAttribute(chipClusterPtr, callback); - } - public void subscribeMaxMeasuredValueAttribute( - MaxMeasuredValueAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeMaxMeasuredValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readToleranceAttribute( - IntegerAttributeCallback callback - ) { - readToleranceAttribute(chipClusterPtr, callback); - } - public void subscribeToleranceAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeToleranceAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readLightSensorTypeAttribute( - LightSensorTypeAttributeCallback callback - ) { - readLightSensorTypeAttribute(chipClusterPtr, callback); - } - public void subscribeLightSensorTypeAttribute( - LightSensorTypeAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeLightSensorTypeAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - ) { - readGeneratedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - ) { - readAcceptedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readEventListAttribute( - EventListAttributeCallback callback - ) { - readEventListAttribute(chipClusterPtr, callback); - } - public void subscribeEventListAttribute( - EventListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAttributeListAttribute( - AttributeListAttributeCallback callback - ) { - readAttributeListAttribute(chipClusterPtr, callback); - } - public void subscribeAttributeListAttribute( - AttributeListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readFeatureMapAttribute( - LongAttributeCallback callback - ) { - readFeatureMapAttribute(chipClusterPtr, callback); - } - public void subscribeFeatureMapAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readClusterRevisionAttribute( - IntegerAttributeCallback callback - ) { - readClusterRevisionAttribute(chipClusterPtr, callback); - } - public void subscribeClusterRevisionAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - private native void readMeasuredValueAttribute(long chipClusterPtr, - MeasuredValueAttributeCallback callback - ); - private native void subscribeMeasuredValueAttribute(long chipClusterPtr, - MeasuredValueAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readMinMeasuredValueAttribute(long chipClusterPtr, - MinMeasuredValueAttributeCallback callback - ); - private native void subscribeMinMeasuredValueAttribute(long chipClusterPtr, - MinMeasuredValueAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readMaxMeasuredValueAttribute(long chipClusterPtr, - MaxMeasuredValueAttributeCallback callback - ); - private native void subscribeMaxMeasuredValueAttribute(long chipClusterPtr, - MaxMeasuredValueAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readToleranceAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeToleranceAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readLightSensorTypeAttribute(long chipClusterPtr, - LightSensorTypeAttributeCallback callback - ); - private native void subscribeLightSensorTypeAttribute(long chipClusterPtr, - LightSensorTypeAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - ); - private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - ); - private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - ); - private native void subscribeEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - ); - private native void subscribeAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - } - - public static class TemperatureMeasurementCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 0x00000402L; - - public TemperatureMeasurementCluster(long devicePtr, int endpointId) { - super(devicePtr, endpointId); - } - - @Override - public native long initWithDevice(long devicePtr, int endpointId); - - public interface MeasuredValueAttributeCallback { - void onSuccess(@Nullable Integer value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface MinMeasuredValueAttributeCallback { - void onSuccess(@Nullable Integer value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface MaxMeasuredValueAttributeCallback { - void onSuccess(@Nullable Integer value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface GeneratedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AcceptedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface EventListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AttributeListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - - public void readMeasuredValueAttribute( - MeasuredValueAttributeCallback callback - ) { - readMeasuredValueAttribute(chipClusterPtr, callback); - } - public void subscribeMeasuredValueAttribute( - MeasuredValueAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeMeasuredValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readMinMeasuredValueAttribute( - MinMeasuredValueAttributeCallback callback - ) { - readMinMeasuredValueAttribute(chipClusterPtr, callback); - } - public void subscribeMinMeasuredValueAttribute( - MinMeasuredValueAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeMinMeasuredValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readMaxMeasuredValueAttribute( - MaxMeasuredValueAttributeCallback callback - ) { - readMaxMeasuredValueAttribute(chipClusterPtr, callback); - } - public void subscribeMaxMeasuredValueAttribute( - MaxMeasuredValueAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeMaxMeasuredValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readToleranceAttribute( - IntegerAttributeCallback callback - ) { - readToleranceAttribute(chipClusterPtr, callback); - } - public void subscribeToleranceAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeToleranceAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - ) { - readGeneratedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - ) { - readAcceptedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readEventListAttribute( - EventListAttributeCallback callback - ) { - readEventListAttribute(chipClusterPtr, callback); - } - public void subscribeEventListAttribute( - EventListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAttributeListAttribute( - AttributeListAttributeCallback callback - ) { - readAttributeListAttribute(chipClusterPtr, callback); - } - public void subscribeAttributeListAttribute( - AttributeListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readFeatureMapAttribute( - LongAttributeCallback callback - ) { - readFeatureMapAttribute(chipClusterPtr, callback); - } - public void subscribeFeatureMapAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readClusterRevisionAttribute( - IntegerAttributeCallback callback - ) { - readClusterRevisionAttribute(chipClusterPtr, callback); - } - public void subscribeClusterRevisionAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - private native void readMeasuredValueAttribute(long chipClusterPtr, - MeasuredValueAttributeCallback callback - ); - private native void subscribeMeasuredValueAttribute(long chipClusterPtr, - MeasuredValueAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readMinMeasuredValueAttribute(long chipClusterPtr, - MinMeasuredValueAttributeCallback callback - ); - private native void subscribeMinMeasuredValueAttribute(long chipClusterPtr, - MinMeasuredValueAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readMaxMeasuredValueAttribute(long chipClusterPtr, - MaxMeasuredValueAttributeCallback callback - ); - private native void subscribeMaxMeasuredValueAttribute(long chipClusterPtr, - MaxMeasuredValueAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readToleranceAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeToleranceAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - ); - private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - ); - private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - ); - private native void subscribeEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - ); - private native void subscribeAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - } - - public static class PressureMeasurementCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 0x00000403L; - - public PressureMeasurementCluster(long devicePtr, int endpointId) { - super(devicePtr, endpointId); - } - - @Override - public native long initWithDevice(long devicePtr, int endpointId); - - public interface MeasuredValueAttributeCallback { - void onSuccess(@Nullable Integer value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface MinMeasuredValueAttributeCallback { - void onSuccess(@Nullable Integer value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface MaxMeasuredValueAttributeCallback { - void onSuccess(@Nullable Integer value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface ScaledValueAttributeCallback { - void onSuccess(@Nullable Integer value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface MinScaledValueAttributeCallback { - void onSuccess(@Nullable Integer value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface MaxScaledValueAttributeCallback { - void onSuccess(@Nullable Integer value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface GeneratedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AcceptedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface EventListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AttributeListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - - public void readMeasuredValueAttribute( - MeasuredValueAttributeCallback callback - ) { - readMeasuredValueAttribute(chipClusterPtr, callback); - } - public void subscribeMeasuredValueAttribute( - MeasuredValueAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeMeasuredValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readMinMeasuredValueAttribute( - MinMeasuredValueAttributeCallback callback - ) { - readMinMeasuredValueAttribute(chipClusterPtr, callback); - } - public void subscribeMinMeasuredValueAttribute( - MinMeasuredValueAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeMinMeasuredValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readMaxMeasuredValueAttribute( - MaxMeasuredValueAttributeCallback callback - ) { - readMaxMeasuredValueAttribute(chipClusterPtr, callback); - } - public void subscribeMaxMeasuredValueAttribute( - MaxMeasuredValueAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeMaxMeasuredValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readToleranceAttribute( - IntegerAttributeCallback callback - ) { - readToleranceAttribute(chipClusterPtr, callback); - } - public void subscribeToleranceAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeToleranceAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readScaledValueAttribute( - ScaledValueAttributeCallback callback - ) { - readScaledValueAttribute(chipClusterPtr, callback); - } - public void subscribeScaledValueAttribute( - ScaledValueAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeScaledValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readMinScaledValueAttribute( - MinScaledValueAttributeCallback callback - ) { - readMinScaledValueAttribute(chipClusterPtr, callback); - } - public void subscribeMinScaledValueAttribute( - MinScaledValueAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeMinScaledValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readMaxScaledValueAttribute( - MaxScaledValueAttributeCallback callback - ) { - readMaxScaledValueAttribute(chipClusterPtr, callback); - } - public void subscribeMaxScaledValueAttribute( - MaxScaledValueAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeMaxScaledValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readScaledToleranceAttribute( - IntegerAttributeCallback callback - ) { - readScaledToleranceAttribute(chipClusterPtr, callback); - } - public void subscribeScaledToleranceAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeScaledToleranceAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readScaleAttribute( - IntegerAttributeCallback callback - ) { - readScaleAttribute(chipClusterPtr, callback); - } - public void subscribeScaleAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeScaleAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - ) { - readGeneratedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - ) { - readAcceptedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readEventListAttribute( - EventListAttributeCallback callback - ) { - readEventListAttribute(chipClusterPtr, callback); - } - public void subscribeEventListAttribute( - EventListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAttributeListAttribute( - AttributeListAttributeCallback callback - ) { - readAttributeListAttribute(chipClusterPtr, callback); - } - public void subscribeAttributeListAttribute( - AttributeListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readFeatureMapAttribute( - LongAttributeCallback callback - ) { - readFeatureMapAttribute(chipClusterPtr, callback); - } - public void subscribeFeatureMapAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readClusterRevisionAttribute( - IntegerAttributeCallback callback - ) { - readClusterRevisionAttribute(chipClusterPtr, callback); - } - public void subscribeClusterRevisionAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - private native void readMeasuredValueAttribute(long chipClusterPtr, - MeasuredValueAttributeCallback callback - ); - private native void subscribeMeasuredValueAttribute(long chipClusterPtr, - MeasuredValueAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readMinMeasuredValueAttribute(long chipClusterPtr, - MinMeasuredValueAttributeCallback callback - ); - private native void subscribeMinMeasuredValueAttribute(long chipClusterPtr, - MinMeasuredValueAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readMaxMeasuredValueAttribute(long chipClusterPtr, - MaxMeasuredValueAttributeCallback callback - ); - private native void subscribeMaxMeasuredValueAttribute(long chipClusterPtr, - MaxMeasuredValueAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readToleranceAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeToleranceAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readScaledValueAttribute(long chipClusterPtr, - ScaledValueAttributeCallback callback - ); - private native void subscribeScaledValueAttribute(long chipClusterPtr, - ScaledValueAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readMinScaledValueAttribute(long chipClusterPtr, - MinScaledValueAttributeCallback callback - ); - private native void subscribeMinScaledValueAttribute(long chipClusterPtr, - MinScaledValueAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readMaxScaledValueAttribute(long chipClusterPtr, - MaxScaledValueAttributeCallback callback - ); - private native void subscribeMaxScaledValueAttribute(long chipClusterPtr, - MaxScaledValueAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readScaledToleranceAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeScaledToleranceAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readScaleAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeScaleAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - ); - private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - ); - private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - ); - private native void subscribeEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - ); - private native void subscribeAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - } - - public static class FlowMeasurementCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 0x00000404L; - - public FlowMeasurementCluster(long devicePtr, int endpointId) { - super(devicePtr, endpointId); - } - - @Override - public native long initWithDevice(long devicePtr, int endpointId); - - public interface MeasuredValueAttributeCallback { - void onSuccess(@Nullable Integer value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface MinMeasuredValueAttributeCallback { - void onSuccess(@Nullable Integer value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface MaxMeasuredValueAttributeCallback { - void onSuccess(@Nullable Integer value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface GeneratedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AcceptedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface EventListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AttributeListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - - public void readMeasuredValueAttribute( - MeasuredValueAttributeCallback callback - ) { - readMeasuredValueAttribute(chipClusterPtr, callback); - } - public void subscribeMeasuredValueAttribute( - MeasuredValueAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeMeasuredValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readMinMeasuredValueAttribute( - MinMeasuredValueAttributeCallback callback - ) { - readMinMeasuredValueAttribute(chipClusterPtr, callback); - } - public void subscribeMinMeasuredValueAttribute( - MinMeasuredValueAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeMinMeasuredValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readMaxMeasuredValueAttribute( - MaxMeasuredValueAttributeCallback callback - ) { - readMaxMeasuredValueAttribute(chipClusterPtr, callback); - } - public void subscribeMaxMeasuredValueAttribute( - MaxMeasuredValueAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeMaxMeasuredValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readToleranceAttribute( - IntegerAttributeCallback callback - ) { - readToleranceAttribute(chipClusterPtr, callback); - } - public void subscribeToleranceAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeToleranceAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - ) { - readGeneratedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - ) { - readAcceptedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readEventListAttribute( - EventListAttributeCallback callback - ) { - readEventListAttribute(chipClusterPtr, callback); - } - public void subscribeEventListAttribute( - EventListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAttributeListAttribute( - AttributeListAttributeCallback callback - ) { - readAttributeListAttribute(chipClusterPtr, callback); - } - public void subscribeAttributeListAttribute( - AttributeListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readFeatureMapAttribute( - LongAttributeCallback callback - ) { - readFeatureMapAttribute(chipClusterPtr, callback); - } - public void subscribeFeatureMapAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readClusterRevisionAttribute( - IntegerAttributeCallback callback - ) { - readClusterRevisionAttribute(chipClusterPtr, callback); - } - public void subscribeClusterRevisionAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - private native void readMeasuredValueAttribute(long chipClusterPtr, - MeasuredValueAttributeCallback callback - ); - private native void subscribeMeasuredValueAttribute(long chipClusterPtr, - MeasuredValueAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readMinMeasuredValueAttribute(long chipClusterPtr, - MinMeasuredValueAttributeCallback callback - ); - private native void subscribeMinMeasuredValueAttribute(long chipClusterPtr, - MinMeasuredValueAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readMaxMeasuredValueAttribute(long chipClusterPtr, - MaxMeasuredValueAttributeCallback callback - ); - private native void subscribeMaxMeasuredValueAttribute(long chipClusterPtr, - MaxMeasuredValueAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readToleranceAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeToleranceAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - ); - private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - ); - private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - ); - private native void subscribeEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - ); - private native void subscribeAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - } - - public static class RelativeHumidityMeasurementCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 0x00000405L; - - public RelativeHumidityMeasurementCluster(long devicePtr, int endpointId) { - super(devicePtr, endpointId); - } - - @Override - public native long initWithDevice(long devicePtr, int endpointId); - - public interface MeasuredValueAttributeCallback { - void onSuccess(@Nullable Integer value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface MinMeasuredValueAttributeCallback { - void onSuccess(@Nullable Integer value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface MaxMeasuredValueAttributeCallback { - void onSuccess(@Nullable Integer value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface GeneratedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AcceptedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface EventListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AttributeListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - - public void readMeasuredValueAttribute( - MeasuredValueAttributeCallback callback - ) { - readMeasuredValueAttribute(chipClusterPtr, callback); - } - public void subscribeMeasuredValueAttribute( - MeasuredValueAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeMeasuredValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readMinMeasuredValueAttribute( - MinMeasuredValueAttributeCallback callback - ) { - readMinMeasuredValueAttribute(chipClusterPtr, callback); - } - public void subscribeMinMeasuredValueAttribute( - MinMeasuredValueAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeMinMeasuredValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readMaxMeasuredValueAttribute( - MaxMeasuredValueAttributeCallback callback - ) { - readMaxMeasuredValueAttribute(chipClusterPtr, callback); - } - public void subscribeMaxMeasuredValueAttribute( - MaxMeasuredValueAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeMaxMeasuredValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readToleranceAttribute( - IntegerAttributeCallback callback - ) { - readToleranceAttribute(chipClusterPtr, callback); - } - public void subscribeToleranceAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeToleranceAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - ) { - readGeneratedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - ) { - readAcceptedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readEventListAttribute( - EventListAttributeCallback callback - ) { - readEventListAttribute(chipClusterPtr, callback); - } - public void subscribeEventListAttribute( - EventListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAttributeListAttribute( - AttributeListAttributeCallback callback - ) { - readAttributeListAttribute(chipClusterPtr, callback); - } - public void subscribeAttributeListAttribute( - AttributeListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readFeatureMapAttribute( - LongAttributeCallback callback - ) { - readFeatureMapAttribute(chipClusterPtr, callback); - } - public void subscribeFeatureMapAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readClusterRevisionAttribute( - IntegerAttributeCallback callback - ) { - readClusterRevisionAttribute(chipClusterPtr, callback); - } - public void subscribeClusterRevisionAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - private native void readMeasuredValueAttribute(long chipClusterPtr, - MeasuredValueAttributeCallback callback - ); - private native void subscribeMeasuredValueAttribute(long chipClusterPtr, - MeasuredValueAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readMinMeasuredValueAttribute(long chipClusterPtr, - MinMeasuredValueAttributeCallback callback - ); - private native void subscribeMinMeasuredValueAttribute(long chipClusterPtr, - MinMeasuredValueAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readMaxMeasuredValueAttribute(long chipClusterPtr, - MaxMeasuredValueAttributeCallback callback - ); - private native void subscribeMaxMeasuredValueAttribute(long chipClusterPtr, - MaxMeasuredValueAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readToleranceAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeToleranceAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - ); - private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - ); - private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - ); - private native void subscribeEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - ); - private native void subscribeAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - } - - public static class OccupancySensingCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 0x00000406L; - - public OccupancySensingCluster(long devicePtr, int endpointId) { - super(devicePtr, endpointId); - } - - @Override - public native long initWithDevice(long devicePtr, int endpointId); - - public interface GeneratedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AcceptedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface EventListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AttributeListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - - public void readOccupancyAttribute( - IntegerAttributeCallback callback - ) { - readOccupancyAttribute(chipClusterPtr, callback); - } - public void subscribeOccupancyAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeOccupancyAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readOccupancySensorTypeAttribute( - IntegerAttributeCallback callback - ) { - readOccupancySensorTypeAttribute(chipClusterPtr, callback); - } - public void subscribeOccupancySensorTypeAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeOccupancySensorTypeAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readOccupancySensorTypeBitmapAttribute( - IntegerAttributeCallback callback - ) { - readOccupancySensorTypeBitmapAttribute(chipClusterPtr, callback); - } - public void subscribeOccupancySensorTypeBitmapAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeOccupancySensorTypeBitmapAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readPIROccupiedToUnoccupiedDelayAttribute( - IntegerAttributeCallback callback - ) { - readPIROccupiedToUnoccupiedDelayAttribute(chipClusterPtr, callback); - } - public void writePIROccupiedToUnoccupiedDelayAttribute(DefaultClusterCallback callback, Integer value) { - writePIROccupiedToUnoccupiedDelayAttribute(chipClusterPtr, callback, value, null); - } - - public void writePIROccupiedToUnoccupiedDelayAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writePIROccupiedToUnoccupiedDelayAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribePIROccupiedToUnoccupiedDelayAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribePIROccupiedToUnoccupiedDelayAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readPIRUnoccupiedToOccupiedDelayAttribute( - IntegerAttributeCallback callback - ) { - readPIRUnoccupiedToOccupiedDelayAttribute(chipClusterPtr, callback); - } - public void writePIRUnoccupiedToOccupiedDelayAttribute(DefaultClusterCallback callback, Integer value) { - writePIRUnoccupiedToOccupiedDelayAttribute(chipClusterPtr, callback, value, null); - } - - public void writePIRUnoccupiedToOccupiedDelayAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writePIRUnoccupiedToOccupiedDelayAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribePIRUnoccupiedToOccupiedDelayAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribePIRUnoccupiedToOccupiedDelayAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readPIRUnoccupiedToOccupiedThresholdAttribute( - IntegerAttributeCallback callback - ) { - readPIRUnoccupiedToOccupiedThresholdAttribute(chipClusterPtr, callback); - } - public void writePIRUnoccupiedToOccupiedThresholdAttribute(DefaultClusterCallback callback, Integer value) { - writePIRUnoccupiedToOccupiedThresholdAttribute(chipClusterPtr, callback, value, null); - } - - public void writePIRUnoccupiedToOccupiedThresholdAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writePIRUnoccupiedToOccupiedThresholdAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribePIRUnoccupiedToOccupiedThresholdAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribePIRUnoccupiedToOccupiedThresholdAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readUltrasonicOccupiedToUnoccupiedDelayAttribute( - IntegerAttributeCallback callback - ) { - readUltrasonicOccupiedToUnoccupiedDelayAttribute(chipClusterPtr, callback); - } - public void writeUltrasonicOccupiedToUnoccupiedDelayAttribute(DefaultClusterCallback callback, Integer value) { - writeUltrasonicOccupiedToUnoccupiedDelayAttribute(chipClusterPtr, callback, value, null); - } - - public void writeUltrasonicOccupiedToUnoccupiedDelayAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeUltrasonicOccupiedToUnoccupiedDelayAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeUltrasonicOccupiedToUnoccupiedDelayAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeUltrasonicOccupiedToUnoccupiedDelayAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readUltrasonicUnoccupiedToOccupiedDelayAttribute( - IntegerAttributeCallback callback - ) { - readUltrasonicUnoccupiedToOccupiedDelayAttribute(chipClusterPtr, callback); - } - public void writeUltrasonicUnoccupiedToOccupiedDelayAttribute(DefaultClusterCallback callback, Integer value) { - writeUltrasonicUnoccupiedToOccupiedDelayAttribute(chipClusterPtr, callback, value, null); - } - - public void writeUltrasonicUnoccupiedToOccupiedDelayAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeUltrasonicUnoccupiedToOccupiedDelayAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeUltrasonicUnoccupiedToOccupiedDelayAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeUltrasonicUnoccupiedToOccupiedDelayAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readUltrasonicUnoccupiedToOccupiedThresholdAttribute( - IntegerAttributeCallback callback - ) { - readUltrasonicUnoccupiedToOccupiedThresholdAttribute(chipClusterPtr, callback); - } - public void writeUltrasonicUnoccupiedToOccupiedThresholdAttribute(DefaultClusterCallback callback, Integer value) { - writeUltrasonicUnoccupiedToOccupiedThresholdAttribute(chipClusterPtr, callback, value, null); - } - - public void writeUltrasonicUnoccupiedToOccupiedThresholdAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeUltrasonicUnoccupiedToOccupiedThresholdAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeUltrasonicUnoccupiedToOccupiedThresholdAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeUltrasonicUnoccupiedToOccupiedThresholdAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readPhysicalContactOccupiedToUnoccupiedDelayAttribute( - IntegerAttributeCallback callback - ) { - readPhysicalContactOccupiedToUnoccupiedDelayAttribute(chipClusterPtr, callback); - } - public void writePhysicalContactOccupiedToUnoccupiedDelayAttribute(DefaultClusterCallback callback, Integer value) { - writePhysicalContactOccupiedToUnoccupiedDelayAttribute(chipClusterPtr, callback, value, null); - } - - public void writePhysicalContactOccupiedToUnoccupiedDelayAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writePhysicalContactOccupiedToUnoccupiedDelayAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribePhysicalContactOccupiedToUnoccupiedDelayAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribePhysicalContactOccupiedToUnoccupiedDelayAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readPhysicalContactUnoccupiedToOccupiedDelayAttribute( - IntegerAttributeCallback callback - ) { - readPhysicalContactUnoccupiedToOccupiedDelayAttribute(chipClusterPtr, callback); - } - public void writePhysicalContactUnoccupiedToOccupiedDelayAttribute(DefaultClusterCallback callback, Integer value) { - writePhysicalContactUnoccupiedToOccupiedDelayAttribute(chipClusterPtr, callback, value, null); - } - - public void writePhysicalContactUnoccupiedToOccupiedDelayAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writePhysicalContactUnoccupiedToOccupiedDelayAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribePhysicalContactUnoccupiedToOccupiedDelayAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribePhysicalContactUnoccupiedToOccupiedDelayAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readPhysicalContactUnoccupiedToOccupiedThresholdAttribute( - IntegerAttributeCallback callback - ) { - readPhysicalContactUnoccupiedToOccupiedThresholdAttribute(chipClusterPtr, callback); - } - public void writePhysicalContactUnoccupiedToOccupiedThresholdAttribute(DefaultClusterCallback callback, Integer value) { - writePhysicalContactUnoccupiedToOccupiedThresholdAttribute(chipClusterPtr, callback, value, null); - } - - public void writePhysicalContactUnoccupiedToOccupiedThresholdAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writePhysicalContactUnoccupiedToOccupiedThresholdAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribePhysicalContactUnoccupiedToOccupiedThresholdAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribePhysicalContactUnoccupiedToOccupiedThresholdAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - ) { - readGeneratedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - ) { - readAcceptedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readEventListAttribute( - EventListAttributeCallback callback - ) { - readEventListAttribute(chipClusterPtr, callback); - } - public void subscribeEventListAttribute( - EventListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAttributeListAttribute( - AttributeListAttributeCallback callback - ) { - readAttributeListAttribute(chipClusterPtr, callback); - } - public void subscribeAttributeListAttribute( - AttributeListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readFeatureMapAttribute( - LongAttributeCallback callback - ) { - readFeatureMapAttribute(chipClusterPtr, callback); - } - public void subscribeFeatureMapAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readClusterRevisionAttribute( - IntegerAttributeCallback callback - ) { - readClusterRevisionAttribute(chipClusterPtr, callback); - } - public void subscribeClusterRevisionAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - private native void readOccupancyAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeOccupancyAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readOccupancySensorTypeAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeOccupancySensorTypeAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readOccupancySensorTypeBitmapAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeOccupancySensorTypeBitmapAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readPIROccupiedToUnoccupiedDelayAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - - private native void writePIROccupiedToUnoccupiedDelayAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribePIROccupiedToUnoccupiedDelayAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readPIRUnoccupiedToOccupiedDelayAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - - private native void writePIRUnoccupiedToOccupiedDelayAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribePIRUnoccupiedToOccupiedDelayAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readPIRUnoccupiedToOccupiedThresholdAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - - private native void writePIRUnoccupiedToOccupiedThresholdAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribePIRUnoccupiedToOccupiedThresholdAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readUltrasonicOccupiedToUnoccupiedDelayAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - - private native void writeUltrasonicOccupiedToUnoccupiedDelayAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeUltrasonicOccupiedToUnoccupiedDelayAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readUltrasonicUnoccupiedToOccupiedDelayAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - - private native void writeUltrasonicUnoccupiedToOccupiedDelayAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeUltrasonicUnoccupiedToOccupiedDelayAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readUltrasonicUnoccupiedToOccupiedThresholdAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - - private native void writeUltrasonicUnoccupiedToOccupiedThresholdAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeUltrasonicUnoccupiedToOccupiedThresholdAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readPhysicalContactOccupiedToUnoccupiedDelayAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - - private native void writePhysicalContactOccupiedToUnoccupiedDelayAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribePhysicalContactOccupiedToUnoccupiedDelayAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readPhysicalContactUnoccupiedToOccupiedDelayAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - - private native void writePhysicalContactUnoccupiedToOccupiedDelayAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribePhysicalContactUnoccupiedToOccupiedDelayAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readPhysicalContactUnoccupiedToOccupiedThresholdAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - - private native void writePhysicalContactUnoccupiedToOccupiedThresholdAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribePhysicalContactUnoccupiedToOccupiedThresholdAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - ); - private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - ); - private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - ); - private native void subscribeEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - ); - private native void subscribeAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - } - - public static class CarbonMonoxideConcentrationMeasurementCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 0x0000040CL; - - public CarbonMonoxideConcentrationMeasurementCluster(long devicePtr, int endpointId) { - super(devicePtr, endpointId); - } - - @Override - public native long initWithDevice(long devicePtr, int endpointId); - - public interface MeasuredValueAttributeCallback { - void onSuccess(@Nullable Float value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface MinMeasuredValueAttributeCallback { - void onSuccess(@Nullable Float value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface MaxMeasuredValueAttributeCallback { - void onSuccess(@Nullable Float value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface PeakMeasuredValueAttributeCallback { - void onSuccess(@Nullable Float value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AverageMeasuredValueAttributeCallback { - void onSuccess(@Nullable Float value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface GeneratedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AcceptedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface EventListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AttributeListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - - public void readMeasuredValueAttribute( - MeasuredValueAttributeCallback callback - ) { - readMeasuredValueAttribute(chipClusterPtr, callback); - } - public void subscribeMeasuredValueAttribute( - MeasuredValueAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeMeasuredValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readMinMeasuredValueAttribute( - MinMeasuredValueAttributeCallback callback - ) { - readMinMeasuredValueAttribute(chipClusterPtr, callback); - } - public void subscribeMinMeasuredValueAttribute( - MinMeasuredValueAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeMinMeasuredValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readMaxMeasuredValueAttribute( - MaxMeasuredValueAttributeCallback callback - ) { - readMaxMeasuredValueAttribute(chipClusterPtr, callback); - } - public void subscribeMaxMeasuredValueAttribute( - MaxMeasuredValueAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeMaxMeasuredValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readPeakMeasuredValueAttribute( - PeakMeasuredValueAttributeCallback callback - ) { - readPeakMeasuredValueAttribute(chipClusterPtr, callback); - } - public void subscribePeakMeasuredValueAttribute( - PeakMeasuredValueAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribePeakMeasuredValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readPeakMeasuredValueWindowAttribute( - LongAttributeCallback callback - ) { - readPeakMeasuredValueWindowAttribute(chipClusterPtr, callback); - } - public void subscribePeakMeasuredValueWindowAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribePeakMeasuredValueWindowAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAverageMeasuredValueAttribute( - AverageMeasuredValueAttributeCallback callback - ) { - readAverageMeasuredValueAttribute(chipClusterPtr, callback); - } - public void subscribeAverageMeasuredValueAttribute( - AverageMeasuredValueAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAverageMeasuredValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAverageMeasuredValueWindowAttribute( - LongAttributeCallback callback - ) { - readAverageMeasuredValueWindowAttribute(chipClusterPtr, callback); - } - public void subscribeAverageMeasuredValueWindowAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeAverageMeasuredValueWindowAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readUncertaintyAttribute( - FloatAttributeCallback callback - ) { - readUncertaintyAttribute(chipClusterPtr, callback); - } - public void subscribeUncertaintyAttribute( - FloatAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeUncertaintyAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readMeasurementUnitAttribute( - IntegerAttributeCallback callback - ) { - readMeasurementUnitAttribute(chipClusterPtr, callback); - } - public void subscribeMeasurementUnitAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeMeasurementUnitAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readMeasurementMediumAttribute( - IntegerAttributeCallback callback - ) { - readMeasurementMediumAttribute(chipClusterPtr, callback); - } - public void subscribeMeasurementMediumAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeMeasurementMediumAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readLevelValueAttribute( - IntegerAttributeCallback callback - ) { - readLevelValueAttribute(chipClusterPtr, callback); - } - public void subscribeLevelValueAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeLevelValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - ) { - readGeneratedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - ) { - readAcceptedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readEventListAttribute( - EventListAttributeCallback callback - ) { - readEventListAttribute(chipClusterPtr, callback); - } - public void subscribeEventListAttribute( - EventListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAttributeListAttribute( - AttributeListAttributeCallback callback - ) { - readAttributeListAttribute(chipClusterPtr, callback); - } - public void subscribeAttributeListAttribute( - AttributeListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readFeatureMapAttribute( - LongAttributeCallback callback - ) { - readFeatureMapAttribute(chipClusterPtr, callback); - } - public void subscribeFeatureMapAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readClusterRevisionAttribute( - IntegerAttributeCallback callback - ) { - readClusterRevisionAttribute(chipClusterPtr, callback); - } - public void subscribeClusterRevisionAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - private native void readMeasuredValueAttribute(long chipClusterPtr, - MeasuredValueAttributeCallback callback - ); - private native void subscribeMeasuredValueAttribute(long chipClusterPtr, - MeasuredValueAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readMinMeasuredValueAttribute(long chipClusterPtr, - MinMeasuredValueAttributeCallback callback - ); - private native void subscribeMinMeasuredValueAttribute(long chipClusterPtr, - MinMeasuredValueAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readMaxMeasuredValueAttribute(long chipClusterPtr, - MaxMeasuredValueAttributeCallback callback - ); - private native void subscribeMaxMeasuredValueAttribute(long chipClusterPtr, - MaxMeasuredValueAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readPeakMeasuredValueAttribute(long chipClusterPtr, - PeakMeasuredValueAttributeCallback callback - ); - private native void subscribePeakMeasuredValueAttribute(long chipClusterPtr, - PeakMeasuredValueAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readPeakMeasuredValueWindowAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribePeakMeasuredValueWindowAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readAverageMeasuredValueAttribute(long chipClusterPtr, - AverageMeasuredValueAttributeCallback callback - ); - private native void subscribeAverageMeasuredValueAttribute(long chipClusterPtr, - AverageMeasuredValueAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAverageMeasuredValueWindowAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeAverageMeasuredValueWindowAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readUncertaintyAttribute(long chipClusterPtr, - FloatAttributeCallback callback - ); - private native void subscribeUncertaintyAttribute(long chipClusterPtr, - FloatAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readMeasurementUnitAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeMeasurementUnitAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readMeasurementMediumAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeMeasurementMediumAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readLevelValueAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeLevelValueAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - ); - private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - ); - private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - ); - private native void subscribeEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - ); - private native void subscribeAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - } - - public static class CarbonDioxideConcentrationMeasurementCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 0x0000040DL; - - public CarbonDioxideConcentrationMeasurementCluster(long devicePtr, int endpointId) { - super(devicePtr, endpointId); - } - - @Override - public native long initWithDevice(long devicePtr, int endpointId); - - public interface MeasuredValueAttributeCallback { - void onSuccess(@Nullable Float value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface MinMeasuredValueAttributeCallback { - void onSuccess(@Nullable Float value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface MaxMeasuredValueAttributeCallback { - void onSuccess(@Nullable Float value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface PeakMeasuredValueAttributeCallback { - void onSuccess(@Nullable Float value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AverageMeasuredValueAttributeCallback { - void onSuccess(@Nullable Float value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface GeneratedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AcceptedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface EventListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AttributeListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - - public void readMeasuredValueAttribute( - MeasuredValueAttributeCallback callback - ) { - readMeasuredValueAttribute(chipClusterPtr, callback); - } - public void subscribeMeasuredValueAttribute( - MeasuredValueAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeMeasuredValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readMinMeasuredValueAttribute( - MinMeasuredValueAttributeCallback callback - ) { - readMinMeasuredValueAttribute(chipClusterPtr, callback); - } - public void subscribeMinMeasuredValueAttribute( - MinMeasuredValueAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeMinMeasuredValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readMaxMeasuredValueAttribute( - MaxMeasuredValueAttributeCallback callback - ) { - readMaxMeasuredValueAttribute(chipClusterPtr, callback); - } - public void subscribeMaxMeasuredValueAttribute( - MaxMeasuredValueAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeMaxMeasuredValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readPeakMeasuredValueAttribute( - PeakMeasuredValueAttributeCallback callback - ) { - readPeakMeasuredValueAttribute(chipClusterPtr, callback); - } - public void subscribePeakMeasuredValueAttribute( - PeakMeasuredValueAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribePeakMeasuredValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readPeakMeasuredValueWindowAttribute( - LongAttributeCallback callback - ) { - readPeakMeasuredValueWindowAttribute(chipClusterPtr, callback); - } - public void subscribePeakMeasuredValueWindowAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribePeakMeasuredValueWindowAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAverageMeasuredValueAttribute( - AverageMeasuredValueAttributeCallback callback - ) { - readAverageMeasuredValueAttribute(chipClusterPtr, callback); - } - public void subscribeAverageMeasuredValueAttribute( - AverageMeasuredValueAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAverageMeasuredValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAverageMeasuredValueWindowAttribute( - LongAttributeCallback callback - ) { - readAverageMeasuredValueWindowAttribute(chipClusterPtr, callback); - } - public void subscribeAverageMeasuredValueWindowAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeAverageMeasuredValueWindowAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readUncertaintyAttribute( - FloatAttributeCallback callback - ) { - readUncertaintyAttribute(chipClusterPtr, callback); - } - public void subscribeUncertaintyAttribute( - FloatAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeUncertaintyAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readMeasurementUnitAttribute( - IntegerAttributeCallback callback - ) { - readMeasurementUnitAttribute(chipClusterPtr, callback); - } - public void subscribeMeasurementUnitAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeMeasurementUnitAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readMeasurementMediumAttribute( - IntegerAttributeCallback callback - ) { - readMeasurementMediumAttribute(chipClusterPtr, callback); - } - public void subscribeMeasurementMediumAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeMeasurementMediumAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readLevelValueAttribute( - IntegerAttributeCallback callback - ) { - readLevelValueAttribute(chipClusterPtr, callback); - } - public void subscribeLevelValueAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeLevelValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - ) { - readGeneratedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - ) { - readAcceptedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readEventListAttribute( - EventListAttributeCallback callback - ) { - readEventListAttribute(chipClusterPtr, callback); - } - public void subscribeEventListAttribute( - EventListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAttributeListAttribute( - AttributeListAttributeCallback callback - ) { - readAttributeListAttribute(chipClusterPtr, callback); - } - public void subscribeAttributeListAttribute( - AttributeListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readFeatureMapAttribute( - LongAttributeCallback callback - ) { - readFeatureMapAttribute(chipClusterPtr, callback); - } - public void subscribeFeatureMapAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readClusterRevisionAttribute( - IntegerAttributeCallback callback - ) { - readClusterRevisionAttribute(chipClusterPtr, callback); - } - public void subscribeClusterRevisionAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - private native void readMeasuredValueAttribute(long chipClusterPtr, - MeasuredValueAttributeCallback callback - ); - private native void subscribeMeasuredValueAttribute(long chipClusterPtr, - MeasuredValueAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readMinMeasuredValueAttribute(long chipClusterPtr, - MinMeasuredValueAttributeCallback callback - ); - private native void subscribeMinMeasuredValueAttribute(long chipClusterPtr, - MinMeasuredValueAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readMaxMeasuredValueAttribute(long chipClusterPtr, - MaxMeasuredValueAttributeCallback callback - ); - private native void subscribeMaxMeasuredValueAttribute(long chipClusterPtr, - MaxMeasuredValueAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readPeakMeasuredValueAttribute(long chipClusterPtr, - PeakMeasuredValueAttributeCallback callback - ); - private native void subscribePeakMeasuredValueAttribute(long chipClusterPtr, - PeakMeasuredValueAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readPeakMeasuredValueWindowAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribePeakMeasuredValueWindowAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readAverageMeasuredValueAttribute(long chipClusterPtr, - AverageMeasuredValueAttributeCallback callback - ); - private native void subscribeAverageMeasuredValueAttribute(long chipClusterPtr, - AverageMeasuredValueAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAverageMeasuredValueWindowAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeAverageMeasuredValueWindowAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readUncertaintyAttribute(long chipClusterPtr, - FloatAttributeCallback callback - ); - private native void subscribeUncertaintyAttribute(long chipClusterPtr, - FloatAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readMeasurementUnitAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeMeasurementUnitAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readMeasurementMediumAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeMeasurementMediumAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readLevelValueAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeLevelValueAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - ); - private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - ); - private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - ); - private native void subscribeEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - ); - private native void subscribeAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - } - - public static class NitrogenDioxideConcentrationMeasurementCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 0x00000413L; - - public NitrogenDioxideConcentrationMeasurementCluster(long devicePtr, int endpointId) { - super(devicePtr, endpointId); - } - - @Override - public native long initWithDevice(long devicePtr, int endpointId); - - public interface MeasuredValueAttributeCallback { - void onSuccess(@Nullable Float value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface MinMeasuredValueAttributeCallback { - void onSuccess(@Nullable Float value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface MaxMeasuredValueAttributeCallback { - void onSuccess(@Nullable Float value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface PeakMeasuredValueAttributeCallback { - void onSuccess(@Nullable Float value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AverageMeasuredValueAttributeCallback { - void onSuccess(@Nullable Float value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface GeneratedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AcceptedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface EventListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AttributeListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - - public void readMeasuredValueAttribute( - MeasuredValueAttributeCallback callback - ) { - readMeasuredValueAttribute(chipClusterPtr, callback); - } - public void subscribeMeasuredValueAttribute( - MeasuredValueAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeMeasuredValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readMinMeasuredValueAttribute( - MinMeasuredValueAttributeCallback callback - ) { - readMinMeasuredValueAttribute(chipClusterPtr, callback); - } - public void subscribeMinMeasuredValueAttribute( - MinMeasuredValueAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeMinMeasuredValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readMaxMeasuredValueAttribute( - MaxMeasuredValueAttributeCallback callback - ) { - readMaxMeasuredValueAttribute(chipClusterPtr, callback); - } - public void subscribeMaxMeasuredValueAttribute( - MaxMeasuredValueAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeMaxMeasuredValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readPeakMeasuredValueAttribute( - PeakMeasuredValueAttributeCallback callback - ) { - readPeakMeasuredValueAttribute(chipClusterPtr, callback); - } - public void subscribePeakMeasuredValueAttribute( - PeakMeasuredValueAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribePeakMeasuredValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readPeakMeasuredValueWindowAttribute( - LongAttributeCallback callback - ) { - readPeakMeasuredValueWindowAttribute(chipClusterPtr, callback); - } - public void subscribePeakMeasuredValueWindowAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribePeakMeasuredValueWindowAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAverageMeasuredValueAttribute( - AverageMeasuredValueAttributeCallback callback - ) { - readAverageMeasuredValueAttribute(chipClusterPtr, callback); - } - public void subscribeAverageMeasuredValueAttribute( - AverageMeasuredValueAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAverageMeasuredValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAverageMeasuredValueWindowAttribute( - LongAttributeCallback callback - ) { - readAverageMeasuredValueWindowAttribute(chipClusterPtr, callback); - } - public void subscribeAverageMeasuredValueWindowAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeAverageMeasuredValueWindowAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readUncertaintyAttribute( - FloatAttributeCallback callback - ) { - readUncertaintyAttribute(chipClusterPtr, callback); - } - public void subscribeUncertaintyAttribute( - FloatAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeUncertaintyAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readMeasurementUnitAttribute( - IntegerAttributeCallback callback - ) { - readMeasurementUnitAttribute(chipClusterPtr, callback); - } - public void subscribeMeasurementUnitAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeMeasurementUnitAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readMeasurementMediumAttribute( - IntegerAttributeCallback callback - ) { - readMeasurementMediumAttribute(chipClusterPtr, callback); - } - public void subscribeMeasurementMediumAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeMeasurementMediumAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readLevelValueAttribute( - IntegerAttributeCallback callback - ) { - readLevelValueAttribute(chipClusterPtr, callback); - } - public void subscribeLevelValueAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeLevelValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - ) { - readGeneratedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - ) { - readAcceptedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readEventListAttribute( - EventListAttributeCallback callback - ) { - readEventListAttribute(chipClusterPtr, callback); - } - public void subscribeEventListAttribute( - EventListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAttributeListAttribute( - AttributeListAttributeCallback callback - ) { - readAttributeListAttribute(chipClusterPtr, callback); - } - public void subscribeAttributeListAttribute( - AttributeListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readFeatureMapAttribute( - LongAttributeCallback callback - ) { - readFeatureMapAttribute(chipClusterPtr, callback); - } - public void subscribeFeatureMapAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readClusterRevisionAttribute( - IntegerAttributeCallback callback - ) { - readClusterRevisionAttribute(chipClusterPtr, callback); - } - public void subscribeClusterRevisionAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - private native void readMeasuredValueAttribute(long chipClusterPtr, - MeasuredValueAttributeCallback callback - ); - private native void subscribeMeasuredValueAttribute(long chipClusterPtr, - MeasuredValueAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readMinMeasuredValueAttribute(long chipClusterPtr, - MinMeasuredValueAttributeCallback callback - ); - private native void subscribeMinMeasuredValueAttribute(long chipClusterPtr, - MinMeasuredValueAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readMaxMeasuredValueAttribute(long chipClusterPtr, - MaxMeasuredValueAttributeCallback callback - ); - private native void subscribeMaxMeasuredValueAttribute(long chipClusterPtr, - MaxMeasuredValueAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readPeakMeasuredValueAttribute(long chipClusterPtr, - PeakMeasuredValueAttributeCallback callback - ); - private native void subscribePeakMeasuredValueAttribute(long chipClusterPtr, - PeakMeasuredValueAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readPeakMeasuredValueWindowAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribePeakMeasuredValueWindowAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readAverageMeasuredValueAttribute(long chipClusterPtr, - AverageMeasuredValueAttributeCallback callback - ); - private native void subscribeAverageMeasuredValueAttribute(long chipClusterPtr, - AverageMeasuredValueAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAverageMeasuredValueWindowAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeAverageMeasuredValueWindowAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readUncertaintyAttribute(long chipClusterPtr, - FloatAttributeCallback callback - ); - private native void subscribeUncertaintyAttribute(long chipClusterPtr, - FloatAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readMeasurementUnitAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeMeasurementUnitAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readMeasurementMediumAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeMeasurementMediumAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readLevelValueAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeLevelValueAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - ); - private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - ); - private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - ); - private native void subscribeEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - ); - private native void subscribeAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - } - - public static class OzoneConcentrationMeasurementCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 0x00000415L; - - public OzoneConcentrationMeasurementCluster(long devicePtr, int endpointId) { - super(devicePtr, endpointId); - } - - @Override - public native long initWithDevice(long devicePtr, int endpointId); - - public interface MeasuredValueAttributeCallback { - void onSuccess(@Nullable Float value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface MinMeasuredValueAttributeCallback { - void onSuccess(@Nullable Float value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface MaxMeasuredValueAttributeCallback { - void onSuccess(@Nullable Float value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface PeakMeasuredValueAttributeCallback { - void onSuccess(@Nullable Float value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AverageMeasuredValueAttributeCallback { - void onSuccess(@Nullable Float value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface GeneratedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AcceptedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface EventListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AttributeListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - - public void readMeasuredValueAttribute( - MeasuredValueAttributeCallback callback - ) { - readMeasuredValueAttribute(chipClusterPtr, callback); - } - public void subscribeMeasuredValueAttribute( - MeasuredValueAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeMeasuredValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readMinMeasuredValueAttribute( - MinMeasuredValueAttributeCallback callback - ) { - readMinMeasuredValueAttribute(chipClusterPtr, callback); - } - public void subscribeMinMeasuredValueAttribute( - MinMeasuredValueAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeMinMeasuredValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readMaxMeasuredValueAttribute( - MaxMeasuredValueAttributeCallback callback - ) { - readMaxMeasuredValueAttribute(chipClusterPtr, callback); - } - public void subscribeMaxMeasuredValueAttribute( - MaxMeasuredValueAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeMaxMeasuredValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readPeakMeasuredValueAttribute( - PeakMeasuredValueAttributeCallback callback - ) { - readPeakMeasuredValueAttribute(chipClusterPtr, callback); - } - public void subscribePeakMeasuredValueAttribute( - PeakMeasuredValueAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribePeakMeasuredValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readPeakMeasuredValueWindowAttribute( - LongAttributeCallback callback - ) { - readPeakMeasuredValueWindowAttribute(chipClusterPtr, callback); - } - public void subscribePeakMeasuredValueWindowAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribePeakMeasuredValueWindowAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAverageMeasuredValueAttribute( - AverageMeasuredValueAttributeCallback callback - ) { - readAverageMeasuredValueAttribute(chipClusterPtr, callback); - } - public void subscribeAverageMeasuredValueAttribute( - AverageMeasuredValueAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAverageMeasuredValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAverageMeasuredValueWindowAttribute( - LongAttributeCallback callback - ) { - readAverageMeasuredValueWindowAttribute(chipClusterPtr, callback); - } - public void subscribeAverageMeasuredValueWindowAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeAverageMeasuredValueWindowAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readUncertaintyAttribute( - FloatAttributeCallback callback - ) { - readUncertaintyAttribute(chipClusterPtr, callback); - } - public void subscribeUncertaintyAttribute( - FloatAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeUncertaintyAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readMeasurementUnitAttribute( - IntegerAttributeCallback callback - ) { - readMeasurementUnitAttribute(chipClusterPtr, callback); - } - public void subscribeMeasurementUnitAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeMeasurementUnitAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readMeasurementMediumAttribute( - IntegerAttributeCallback callback - ) { - readMeasurementMediumAttribute(chipClusterPtr, callback); - } - public void subscribeMeasurementMediumAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeMeasurementMediumAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readLevelValueAttribute( - IntegerAttributeCallback callback - ) { - readLevelValueAttribute(chipClusterPtr, callback); - } - public void subscribeLevelValueAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeLevelValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - ) { - readGeneratedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - ) { - readAcceptedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readEventListAttribute( - EventListAttributeCallback callback - ) { - readEventListAttribute(chipClusterPtr, callback); - } - public void subscribeEventListAttribute( - EventListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAttributeListAttribute( - AttributeListAttributeCallback callback - ) { - readAttributeListAttribute(chipClusterPtr, callback); - } - public void subscribeAttributeListAttribute( - AttributeListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readFeatureMapAttribute( - LongAttributeCallback callback - ) { - readFeatureMapAttribute(chipClusterPtr, callback); - } - public void subscribeFeatureMapAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readClusterRevisionAttribute( - IntegerAttributeCallback callback - ) { - readClusterRevisionAttribute(chipClusterPtr, callback); - } - public void subscribeClusterRevisionAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - private native void readMeasuredValueAttribute(long chipClusterPtr, - MeasuredValueAttributeCallback callback - ); - private native void subscribeMeasuredValueAttribute(long chipClusterPtr, - MeasuredValueAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readMinMeasuredValueAttribute(long chipClusterPtr, - MinMeasuredValueAttributeCallback callback - ); - private native void subscribeMinMeasuredValueAttribute(long chipClusterPtr, - MinMeasuredValueAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readMaxMeasuredValueAttribute(long chipClusterPtr, - MaxMeasuredValueAttributeCallback callback - ); - private native void subscribeMaxMeasuredValueAttribute(long chipClusterPtr, - MaxMeasuredValueAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readPeakMeasuredValueAttribute(long chipClusterPtr, - PeakMeasuredValueAttributeCallback callback - ); - private native void subscribePeakMeasuredValueAttribute(long chipClusterPtr, - PeakMeasuredValueAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readPeakMeasuredValueWindowAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribePeakMeasuredValueWindowAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readAverageMeasuredValueAttribute(long chipClusterPtr, - AverageMeasuredValueAttributeCallback callback - ); - private native void subscribeAverageMeasuredValueAttribute(long chipClusterPtr, - AverageMeasuredValueAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAverageMeasuredValueWindowAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeAverageMeasuredValueWindowAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readUncertaintyAttribute(long chipClusterPtr, - FloatAttributeCallback callback - ); - private native void subscribeUncertaintyAttribute(long chipClusterPtr, - FloatAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readMeasurementUnitAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeMeasurementUnitAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readMeasurementMediumAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeMeasurementMediumAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readLevelValueAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeLevelValueAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - ); - private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - ); - private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - ); - private native void subscribeEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - ); - private native void subscribeAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - } - - public static class Pm25ConcentrationMeasurementCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 0x0000042AL; - - public Pm25ConcentrationMeasurementCluster(long devicePtr, int endpointId) { - super(devicePtr, endpointId); - } - - @Override - public native long initWithDevice(long devicePtr, int endpointId); - - public interface MeasuredValueAttributeCallback { - void onSuccess(@Nullable Float value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface MinMeasuredValueAttributeCallback { - void onSuccess(@Nullable Float value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface MaxMeasuredValueAttributeCallback { - void onSuccess(@Nullable Float value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface PeakMeasuredValueAttributeCallback { - void onSuccess(@Nullable Float value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AverageMeasuredValueAttributeCallback { - void onSuccess(@Nullable Float value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface GeneratedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AcceptedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface EventListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AttributeListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - - public void readMeasuredValueAttribute( - MeasuredValueAttributeCallback callback - ) { - readMeasuredValueAttribute(chipClusterPtr, callback); - } - public void subscribeMeasuredValueAttribute( - MeasuredValueAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeMeasuredValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readMinMeasuredValueAttribute( - MinMeasuredValueAttributeCallback callback - ) { - readMinMeasuredValueAttribute(chipClusterPtr, callback); - } - public void subscribeMinMeasuredValueAttribute( - MinMeasuredValueAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeMinMeasuredValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readMaxMeasuredValueAttribute( - MaxMeasuredValueAttributeCallback callback - ) { - readMaxMeasuredValueAttribute(chipClusterPtr, callback); - } - public void subscribeMaxMeasuredValueAttribute( - MaxMeasuredValueAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeMaxMeasuredValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readPeakMeasuredValueAttribute( - PeakMeasuredValueAttributeCallback callback - ) { - readPeakMeasuredValueAttribute(chipClusterPtr, callback); - } - public void subscribePeakMeasuredValueAttribute( - PeakMeasuredValueAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribePeakMeasuredValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readPeakMeasuredValueWindowAttribute( - LongAttributeCallback callback - ) { - readPeakMeasuredValueWindowAttribute(chipClusterPtr, callback); - } - public void subscribePeakMeasuredValueWindowAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribePeakMeasuredValueWindowAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAverageMeasuredValueAttribute( - AverageMeasuredValueAttributeCallback callback - ) { - readAverageMeasuredValueAttribute(chipClusterPtr, callback); - } - public void subscribeAverageMeasuredValueAttribute( - AverageMeasuredValueAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAverageMeasuredValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAverageMeasuredValueWindowAttribute( - LongAttributeCallback callback - ) { - readAverageMeasuredValueWindowAttribute(chipClusterPtr, callback); - } - public void subscribeAverageMeasuredValueWindowAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeAverageMeasuredValueWindowAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readUncertaintyAttribute( - FloatAttributeCallback callback - ) { - readUncertaintyAttribute(chipClusterPtr, callback); - } - public void subscribeUncertaintyAttribute( - FloatAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeUncertaintyAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readMeasurementUnitAttribute( - IntegerAttributeCallback callback - ) { - readMeasurementUnitAttribute(chipClusterPtr, callback); - } - public void subscribeMeasurementUnitAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeMeasurementUnitAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readMeasurementMediumAttribute( - IntegerAttributeCallback callback - ) { - readMeasurementMediumAttribute(chipClusterPtr, callback); - } - public void subscribeMeasurementMediumAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeMeasurementMediumAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readLevelValueAttribute( - IntegerAttributeCallback callback - ) { - readLevelValueAttribute(chipClusterPtr, callback); - } - public void subscribeLevelValueAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeLevelValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - ) { - readGeneratedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - ) { - readAcceptedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readEventListAttribute( - EventListAttributeCallback callback - ) { - readEventListAttribute(chipClusterPtr, callback); - } - public void subscribeEventListAttribute( - EventListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAttributeListAttribute( - AttributeListAttributeCallback callback - ) { - readAttributeListAttribute(chipClusterPtr, callback); - } - public void subscribeAttributeListAttribute( - AttributeListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readFeatureMapAttribute( - LongAttributeCallback callback - ) { - readFeatureMapAttribute(chipClusterPtr, callback); - } - public void subscribeFeatureMapAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readClusterRevisionAttribute( - IntegerAttributeCallback callback - ) { - readClusterRevisionAttribute(chipClusterPtr, callback); - } - public void subscribeClusterRevisionAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - private native void readMeasuredValueAttribute(long chipClusterPtr, - MeasuredValueAttributeCallback callback - ); - private native void subscribeMeasuredValueAttribute(long chipClusterPtr, - MeasuredValueAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readMinMeasuredValueAttribute(long chipClusterPtr, - MinMeasuredValueAttributeCallback callback - ); - private native void subscribeMinMeasuredValueAttribute(long chipClusterPtr, - MinMeasuredValueAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readMaxMeasuredValueAttribute(long chipClusterPtr, - MaxMeasuredValueAttributeCallback callback - ); - private native void subscribeMaxMeasuredValueAttribute(long chipClusterPtr, - MaxMeasuredValueAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readPeakMeasuredValueAttribute(long chipClusterPtr, - PeakMeasuredValueAttributeCallback callback - ); - private native void subscribePeakMeasuredValueAttribute(long chipClusterPtr, - PeakMeasuredValueAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readPeakMeasuredValueWindowAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribePeakMeasuredValueWindowAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readAverageMeasuredValueAttribute(long chipClusterPtr, - AverageMeasuredValueAttributeCallback callback - ); - private native void subscribeAverageMeasuredValueAttribute(long chipClusterPtr, - AverageMeasuredValueAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAverageMeasuredValueWindowAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeAverageMeasuredValueWindowAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readUncertaintyAttribute(long chipClusterPtr, - FloatAttributeCallback callback - ); - private native void subscribeUncertaintyAttribute(long chipClusterPtr, - FloatAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readMeasurementUnitAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeMeasurementUnitAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readMeasurementMediumAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeMeasurementMediumAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readLevelValueAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeLevelValueAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - ); - private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - ); - private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - ); - private native void subscribeEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - ); - private native void subscribeAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - } - - public static class FormaldehydeConcentrationMeasurementCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 0x0000042BL; - - public FormaldehydeConcentrationMeasurementCluster(long devicePtr, int endpointId) { - super(devicePtr, endpointId); - } - - @Override - public native long initWithDevice(long devicePtr, int endpointId); - - public interface MeasuredValueAttributeCallback { - void onSuccess(@Nullable Float value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface MinMeasuredValueAttributeCallback { - void onSuccess(@Nullable Float value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface MaxMeasuredValueAttributeCallback { - void onSuccess(@Nullable Float value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface PeakMeasuredValueAttributeCallback { - void onSuccess(@Nullable Float value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AverageMeasuredValueAttributeCallback { - void onSuccess(@Nullable Float value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface GeneratedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AcceptedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface EventListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AttributeListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - - public void readMeasuredValueAttribute( - MeasuredValueAttributeCallback callback - ) { - readMeasuredValueAttribute(chipClusterPtr, callback); - } - public void subscribeMeasuredValueAttribute( - MeasuredValueAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeMeasuredValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readMinMeasuredValueAttribute( - MinMeasuredValueAttributeCallback callback - ) { - readMinMeasuredValueAttribute(chipClusterPtr, callback); - } - public void subscribeMinMeasuredValueAttribute( - MinMeasuredValueAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeMinMeasuredValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readMaxMeasuredValueAttribute( - MaxMeasuredValueAttributeCallback callback - ) { - readMaxMeasuredValueAttribute(chipClusterPtr, callback); - } - public void subscribeMaxMeasuredValueAttribute( - MaxMeasuredValueAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeMaxMeasuredValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readPeakMeasuredValueAttribute( - PeakMeasuredValueAttributeCallback callback - ) { - readPeakMeasuredValueAttribute(chipClusterPtr, callback); - } - public void subscribePeakMeasuredValueAttribute( - PeakMeasuredValueAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribePeakMeasuredValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readPeakMeasuredValueWindowAttribute( - LongAttributeCallback callback - ) { - readPeakMeasuredValueWindowAttribute(chipClusterPtr, callback); - } - public void subscribePeakMeasuredValueWindowAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribePeakMeasuredValueWindowAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAverageMeasuredValueAttribute( - AverageMeasuredValueAttributeCallback callback - ) { - readAverageMeasuredValueAttribute(chipClusterPtr, callback); - } - public void subscribeAverageMeasuredValueAttribute( - AverageMeasuredValueAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAverageMeasuredValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAverageMeasuredValueWindowAttribute( - LongAttributeCallback callback - ) { - readAverageMeasuredValueWindowAttribute(chipClusterPtr, callback); - } - public void subscribeAverageMeasuredValueWindowAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeAverageMeasuredValueWindowAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readUncertaintyAttribute( - FloatAttributeCallback callback - ) { - readUncertaintyAttribute(chipClusterPtr, callback); - } - public void subscribeUncertaintyAttribute( - FloatAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeUncertaintyAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readMeasurementUnitAttribute( - IntegerAttributeCallback callback - ) { - readMeasurementUnitAttribute(chipClusterPtr, callback); - } - public void subscribeMeasurementUnitAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeMeasurementUnitAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readMeasurementMediumAttribute( - IntegerAttributeCallback callback - ) { - readMeasurementMediumAttribute(chipClusterPtr, callback); - } - public void subscribeMeasurementMediumAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeMeasurementMediumAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readLevelValueAttribute( - IntegerAttributeCallback callback - ) { - readLevelValueAttribute(chipClusterPtr, callback); - } - public void subscribeLevelValueAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeLevelValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - ) { - readGeneratedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - ) { - readAcceptedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readEventListAttribute( - EventListAttributeCallback callback - ) { - readEventListAttribute(chipClusterPtr, callback); - } - public void subscribeEventListAttribute( - EventListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAttributeListAttribute( - AttributeListAttributeCallback callback - ) { - readAttributeListAttribute(chipClusterPtr, callback); - } - public void subscribeAttributeListAttribute( - AttributeListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readFeatureMapAttribute( - LongAttributeCallback callback - ) { - readFeatureMapAttribute(chipClusterPtr, callback); - } - public void subscribeFeatureMapAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readClusterRevisionAttribute( - IntegerAttributeCallback callback - ) { - readClusterRevisionAttribute(chipClusterPtr, callback); - } - public void subscribeClusterRevisionAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - private native void readMeasuredValueAttribute(long chipClusterPtr, - MeasuredValueAttributeCallback callback - ); - private native void subscribeMeasuredValueAttribute(long chipClusterPtr, - MeasuredValueAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readMinMeasuredValueAttribute(long chipClusterPtr, - MinMeasuredValueAttributeCallback callback - ); - private native void subscribeMinMeasuredValueAttribute(long chipClusterPtr, - MinMeasuredValueAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readMaxMeasuredValueAttribute(long chipClusterPtr, - MaxMeasuredValueAttributeCallback callback - ); - private native void subscribeMaxMeasuredValueAttribute(long chipClusterPtr, - MaxMeasuredValueAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readPeakMeasuredValueAttribute(long chipClusterPtr, - PeakMeasuredValueAttributeCallback callback - ); - private native void subscribePeakMeasuredValueAttribute(long chipClusterPtr, - PeakMeasuredValueAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readPeakMeasuredValueWindowAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribePeakMeasuredValueWindowAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readAverageMeasuredValueAttribute(long chipClusterPtr, - AverageMeasuredValueAttributeCallback callback - ); - private native void subscribeAverageMeasuredValueAttribute(long chipClusterPtr, - AverageMeasuredValueAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAverageMeasuredValueWindowAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeAverageMeasuredValueWindowAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readUncertaintyAttribute(long chipClusterPtr, - FloatAttributeCallback callback - ); - private native void subscribeUncertaintyAttribute(long chipClusterPtr, - FloatAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readMeasurementUnitAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeMeasurementUnitAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readMeasurementMediumAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeMeasurementMediumAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readLevelValueAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeLevelValueAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - ); - private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - ); - private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - ); - private native void subscribeEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - ); - private native void subscribeAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - } - - public static class Pm1ConcentrationMeasurementCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 0x0000042CL; - - public Pm1ConcentrationMeasurementCluster(long devicePtr, int endpointId) { - super(devicePtr, endpointId); - } - - @Override - public native long initWithDevice(long devicePtr, int endpointId); - - public interface MeasuredValueAttributeCallback { - void onSuccess(@Nullable Float value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface MinMeasuredValueAttributeCallback { - void onSuccess(@Nullable Float value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface MaxMeasuredValueAttributeCallback { - void onSuccess(@Nullable Float value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface PeakMeasuredValueAttributeCallback { - void onSuccess(@Nullable Float value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AverageMeasuredValueAttributeCallback { - void onSuccess(@Nullable Float value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface GeneratedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AcceptedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface EventListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AttributeListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - - public void readMeasuredValueAttribute( - MeasuredValueAttributeCallback callback - ) { - readMeasuredValueAttribute(chipClusterPtr, callback); - } - public void subscribeMeasuredValueAttribute( - MeasuredValueAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeMeasuredValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readMinMeasuredValueAttribute( - MinMeasuredValueAttributeCallback callback - ) { - readMinMeasuredValueAttribute(chipClusterPtr, callback); - } - public void subscribeMinMeasuredValueAttribute( - MinMeasuredValueAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeMinMeasuredValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readMaxMeasuredValueAttribute( - MaxMeasuredValueAttributeCallback callback - ) { - readMaxMeasuredValueAttribute(chipClusterPtr, callback); - } - public void subscribeMaxMeasuredValueAttribute( - MaxMeasuredValueAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeMaxMeasuredValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readPeakMeasuredValueAttribute( - PeakMeasuredValueAttributeCallback callback - ) { - readPeakMeasuredValueAttribute(chipClusterPtr, callback); - } - public void subscribePeakMeasuredValueAttribute( - PeakMeasuredValueAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribePeakMeasuredValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readPeakMeasuredValueWindowAttribute( - LongAttributeCallback callback - ) { - readPeakMeasuredValueWindowAttribute(chipClusterPtr, callback); - } - public void subscribePeakMeasuredValueWindowAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribePeakMeasuredValueWindowAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAverageMeasuredValueAttribute( - AverageMeasuredValueAttributeCallback callback - ) { - readAverageMeasuredValueAttribute(chipClusterPtr, callback); - } - public void subscribeAverageMeasuredValueAttribute( - AverageMeasuredValueAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAverageMeasuredValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAverageMeasuredValueWindowAttribute( - LongAttributeCallback callback - ) { - readAverageMeasuredValueWindowAttribute(chipClusterPtr, callback); - } - public void subscribeAverageMeasuredValueWindowAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeAverageMeasuredValueWindowAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readUncertaintyAttribute( - FloatAttributeCallback callback - ) { - readUncertaintyAttribute(chipClusterPtr, callback); - } - public void subscribeUncertaintyAttribute( - FloatAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeUncertaintyAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readMeasurementUnitAttribute( - IntegerAttributeCallback callback - ) { - readMeasurementUnitAttribute(chipClusterPtr, callback); - } - public void subscribeMeasurementUnitAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeMeasurementUnitAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readMeasurementMediumAttribute( - IntegerAttributeCallback callback - ) { - readMeasurementMediumAttribute(chipClusterPtr, callback); - } - public void subscribeMeasurementMediumAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeMeasurementMediumAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readLevelValueAttribute( - IntegerAttributeCallback callback - ) { - readLevelValueAttribute(chipClusterPtr, callback); - } - public void subscribeLevelValueAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeLevelValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - ) { - readGeneratedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - ) { - readAcceptedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readEventListAttribute( - EventListAttributeCallback callback - ) { - readEventListAttribute(chipClusterPtr, callback); - } - public void subscribeEventListAttribute( - EventListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAttributeListAttribute( - AttributeListAttributeCallback callback - ) { - readAttributeListAttribute(chipClusterPtr, callback); - } - public void subscribeAttributeListAttribute( - AttributeListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readFeatureMapAttribute( - LongAttributeCallback callback - ) { - readFeatureMapAttribute(chipClusterPtr, callback); - } - public void subscribeFeatureMapAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readClusterRevisionAttribute( - IntegerAttributeCallback callback - ) { - readClusterRevisionAttribute(chipClusterPtr, callback); - } - public void subscribeClusterRevisionAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - private native void readMeasuredValueAttribute(long chipClusterPtr, - MeasuredValueAttributeCallback callback - ); - private native void subscribeMeasuredValueAttribute(long chipClusterPtr, - MeasuredValueAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readMinMeasuredValueAttribute(long chipClusterPtr, - MinMeasuredValueAttributeCallback callback - ); - private native void subscribeMinMeasuredValueAttribute(long chipClusterPtr, - MinMeasuredValueAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readMaxMeasuredValueAttribute(long chipClusterPtr, - MaxMeasuredValueAttributeCallback callback - ); - private native void subscribeMaxMeasuredValueAttribute(long chipClusterPtr, - MaxMeasuredValueAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readPeakMeasuredValueAttribute(long chipClusterPtr, - PeakMeasuredValueAttributeCallback callback - ); - private native void subscribePeakMeasuredValueAttribute(long chipClusterPtr, - PeakMeasuredValueAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readPeakMeasuredValueWindowAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribePeakMeasuredValueWindowAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readAverageMeasuredValueAttribute(long chipClusterPtr, - AverageMeasuredValueAttributeCallback callback - ); - private native void subscribeAverageMeasuredValueAttribute(long chipClusterPtr, - AverageMeasuredValueAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAverageMeasuredValueWindowAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeAverageMeasuredValueWindowAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readUncertaintyAttribute(long chipClusterPtr, - FloatAttributeCallback callback - ); - private native void subscribeUncertaintyAttribute(long chipClusterPtr, - FloatAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readMeasurementUnitAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeMeasurementUnitAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readMeasurementMediumAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeMeasurementMediumAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readLevelValueAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeLevelValueAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - ); - private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - ); - private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - ); - private native void subscribeEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - ); - private native void subscribeAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - } - - public static class Pm10ConcentrationMeasurementCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 0x0000042DL; - - public Pm10ConcentrationMeasurementCluster(long devicePtr, int endpointId) { - super(devicePtr, endpointId); - } - - @Override - public native long initWithDevice(long devicePtr, int endpointId); - - public interface MeasuredValueAttributeCallback { - void onSuccess(@Nullable Float value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface MinMeasuredValueAttributeCallback { - void onSuccess(@Nullable Float value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface MaxMeasuredValueAttributeCallback { - void onSuccess(@Nullable Float value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface PeakMeasuredValueAttributeCallback { - void onSuccess(@Nullable Float value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AverageMeasuredValueAttributeCallback { - void onSuccess(@Nullable Float value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface GeneratedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AcceptedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface EventListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AttributeListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - - public void readMeasuredValueAttribute( - MeasuredValueAttributeCallback callback - ) { - readMeasuredValueAttribute(chipClusterPtr, callback); - } - public void subscribeMeasuredValueAttribute( - MeasuredValueAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeMeasuredValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readMinMeasuredValueAttribute( - MinMeasuredValueAttributeCallback callback - ) { - readMinMeasuredValueAttribute(chipClusterPtr, callback); - } - public void subscribeMinMeasuredValueAttribute( - MinMeasuredValueAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeMinMeasuredValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readMaxMeasuredValueAttribute( - MaxMeasuredValueAttributeCallback callback - ) { - readMaxMeasuredValueAttribute(chipClusterPtr, callback); - } - public void subscribeMaxMeasuredValueAttribute( - MaxMeasuredValueAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeMaxMeasuredValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readPeakMeasuredValueAttribute( - PeakMeasuredValueAttributeCallback callback - ) { - readPeakMeasuredValueAttribute(chipClusterPtr, callback); - } - public void subscribePeakMeasuredValueAttribute( - PeakMeasuredValueAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribePeakMeasuredValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readPeakMeasuredValueWindowAttribute( - LongAttributeCallback callback - ) { - readPeakMeasuredValueWindowAttribute(chipClusterPtr, callback); - } - public void subscribePeakMeasuredValueWindowAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribePeakMeasuredValueWindowAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAverageMeasuredValueAttribute( - AverageMeasuredValueAttributeCallback callback - ) { - readAverageMeasuredValueAttribute(chipClusterPtr, callback); - } - public void subscribeAverageMeasuredValueAttribute( - AverageMeasuredValueAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAverageMeasuredValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAverageMeasuredValueWindowAttribute( - LongAttributeCallback callback - ) { - readAverageMeasuredValueWindowAttribute(chipClusterPtr, callback); - } - public void subscribeAverageMeasuredValueWindowAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeAverageMeasuredValueWindowAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readUncertaintyAttribute( - FloatAttributeCallback callback - ) { - readUncertaintyAttribute(chipClusterPtr, callback); - } - public void subscribeUncertaintyAttribute( - FloatAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeUncertaintyAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readMeasurementUnitAttribute( - IntegerAttributeCallback callback - ) { - readMeasurementUnitAttribute(chipClusterPtr, callback); - } - public void subscribeMeasurementUnitAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeMeasurementUnitAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readMeasurementMediumAttribute( - IntegerAttributeCallback callback - ) { - readMeasurementMediumAttribute(chipClusterPtr, callback); - } - public void subscribeMeasurementMediumAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeMeasurementMediumAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readLevelValueAttribute( - IntegerAttributeCallback callback - ) { - readLevelValueAttribute(chipClusterPtr, callback); - } - public void subscribeLevelValueAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeLevelValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - ) { - readGeneratedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - ) { - readAcceptedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readEventListAttribute( - EventListAttributeCallback callback - ) { - readEventListAttribute(chipClusterPtr, callback); - } - public void subscribeEventListAttribute( - EventListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAttributeListAttribute( - AttributeListAttributeCallback callback - ) { - readAttributeListAttribute(chipClusterPtr, callback); - } - public void subscribeAttributeListAttribute( - AttributeListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readFeatureMapAttribute( - LongAttributeCallback callback - ) { - readFeatureMapAttribute(chipClusterPtr, callback); - } - public void subscribeFeatureMapAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readClusterRevisionAttribute( - IntegerAttributeCallback callback - ) { - readClusterRevisionAttribute(chipClusterPtr, callback); - } - public void subscribeClusterRevisionAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - private native void readMeasuredValueAttribute(long chipClusterPtr, - MeasuredValueAttributeCallback callback - ); - private native void subscribeMeasuredValueAttribute(long chipClusterPtr, - MeasuredValueAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readMinMeasuredValueAttribute(long chipClusterPtr, - MinMeasuredValueAttributeCallback callback - ); - private native void subscribeMinMeasuredValueAttribute(long chipClusterPtr, - MinMeasuredValueAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readMaxMeasuredValueAttribute(long chipClusterPtr, - MaxMeasuredValueAttributeCallback callback - ); - private native void subscribeMaxMeasuredValueAttribute(long chipClusterPtr, - MaxMeasuredValueAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readPeakMeasuredValueAttribute(long chipClusterPtr, - PeakMeasuredValueAttributeCallback callback - ); - private native void subscribePeakMeasuredValueAttribute(long chipClusterPtr, - PeakMeasuredValueAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readPeakMeasuredValueWindowAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribePeakMeasuredValueWindowAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readAverageMeasuredValueAttribute(long chipClusterPtr, - AverageMeasuredValueAttributeCallback callback - ); - private native void subscribeAverageMeasuredValueAttribute(long chipClusterPtr, - AverageMeasuredValueAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAverageMeasuredValueWindowAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeAverageMeasuredValueWindowAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readUncertaintyAttribute(long chipClusterPtr, - FloatAttributeCallback callback - ); - private native void subscribeUncertaintyAttribute(long chipClusterPtr, - FloatAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readMeasurementUnitAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeMeasurementUnitAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readMeasurementMediumAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeMeasurementMediumAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readLevelValueAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeLevelValueAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - ); - private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - ); - private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - ); - private native void subscribeEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - ); - private native void subscribeAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - } - - public static class TotalVolatileOrganicCompoundsConcentrationMeasurementCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 0x0000042EL; - - public TotalVolatileOrganicCompoundsConcentrationMeasurementCluster(long devicePtr, int endpointId) { - super(devicePtr, endpointId); - } - - @Override - public native long initWithDevice(long devicePtr, int endpointId); - - public interface MeasuredValueAttributeCallback { - void onSuccess(@Nullable Float value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface MinMeasuredValueAttributeCallback { - void onSuccess(@Nullable Float value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface MaxMeasuredValueAttributeCallback { - void onSuccess(@Nullable Float value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface PeakMeasuredValueAttributeCallback { - void onSuccess(@Nullable Float value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AverageMeasuredValueAttributeCallback { - void onSuccess(@Nullable Float value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface GeneratedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AcceptedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface EventListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AttributeListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - - public void readMeasuredValueAttribute( - MeasuredValueAttributeCallback callback - ) { - readMeasuredValueAttribute(chipClusterPtr, callback); - } - public void subscribeMeasuredValueAttribute( - MeasuredValueAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeMeasuredValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readMinMeasuredValueAttribute( - MinMeasuredValueAttributeCallback callback - ) { - readMinMeasuredValueAttribute(chipClusterPtr, callback); - } - public void subscribeMinMeasuredValueAttribute( - MinMeasuredValueAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeMinMeasuredValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readMaxMeasuredValueAttribute( - MaxMeasuredValueAttributeCallback callback - ) { - readMaxMeasuredValueAttribute(chipClusterPtr, callback); - } - public void subscribeMaxMeasuredValueAttribute( - MaxMeasuredValueAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeMaxMeasuredValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readPeakMeasuredValueAttribute( - PeakMeasuredValueAttributeCallback callback - ) { - readPeakMeasuredValueAttribute(chipClusterPtr, callback); - } - public void subscribePeakMeasuredValueAttribute( - PeakMeasuredValueAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribePeakMeasuredValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readPeakMeasuredValueWindowAttribute( - LongAttributeCallback callback - ) { - readPeakMeasuredValueWindowAttribute(chipClusterPtr, callback); - } - public void subscribePeakMeasuredValueWindowAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribePeakMeasuredValueWindowAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAverageMeasuredValueAttribute( - AverageMeasuredValueAttributeCallback callback - ) { - readAverageMeasuredValueAttribute(chipClusterPtr, callback); - } - public void subscribeAverageMeasuredValueAttribute( - AverageMeasuredValueAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAverageMeasuredValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAverageMeasuredValueWindowAttribute( - LongAttributeCallback callback - ) { - readAverageMeasuredValueWindowAttribute(chipClusterPtr, callback); - } - public void subscribeAverageMeasuredValueWindowAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeAverageMeasuredValueWindowAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readUncertaintyAttribute( - FloatAttributeCallback callback - ) { - readUncertaintyAttribute(chipClusterPtr, callback); - } - public void subscribeUncertaintyAttribute( - FloatAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeUncertaintyAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readMeasurementUnitAttribute( - IntegerAttributeCallback callback - ) { - readMeasurementUnitAttribute(chipClusterPtr, callback); - } - public void subscribeMeasurementUnitAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeMeasurementUnitAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readMeasurementMediumAttribute( - IntegerAttributeCallback callback - ) { - readMeasurementMediumAttribute(chipClusterPtr, callback); - } - public void subscribeMeasurementMediumAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeMeasurementMediumAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readLevelValueAttribute( - IntegerAttributeCallback callback - ) { - readLevelValueAttribute(chipClusterPtr, callback); - } - public void subscribeLevelValueAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeLevelValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - ) { - readGeneratedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - ) { - readAcceptedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readEventListAttribute( - EventListAttributeCallback callback - ) { - readEventListAttribute(chipClusterPtr, callback); - } - public void subscribeEventListAttribute( - EventListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAttributeListAttribute( - AttributeListAttributeCallback callback - ) { - readAttributeListAttribute(chipClusterPtr, callback); - } - public void subscribeAttributeListAttribute( - AttributeListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readFeatureMapAttribute( - LongAttributeCallback callback - ) { - readFeatureMapAttribute(chipClusterPtr, callback); - } - public void subscribeFeatureMapAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readClusterRevisionAttribute( - IntegerAttributeCallback callback - ) { - readClusterRevisionAttribute(chipClusterPtr, callback); - } - public void subscribeClusterRevisionAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - private native void readMeasuredValueAttribute(long chipClusterPtr, - MeasuredValueAttributeCallback callback - ); - private native void subscribeMeasuredValueAttribute(long chipClusterPtr, - MeasuredValueAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readMinMeasuredValueAttribute(long chipClusterPtr, - MinMeasuredValueAttributeCallback callback - ); - private native void subscribeMinMeasuredValueAttribute(long chipClusterPtr, - MinMeasuredValueAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readMaxMeasuredValueAttribute(long chipClusterPtr, - MaxMeasuredValueAttributeCallback callback - ); - private native void subscribeMaxMeasuredValueAttribute(long chipClusterPtr, - MaxMeasuredValueAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readPeakMeasuredValueAttribute(long chipClusterPtr, - PeakMeasuredValueAttributeCallback callback - ); - private native void subscribePeakMeasuredValueAttribute(long chipClusterPtr, - PeakMeasuredValueAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readPeakMeasuredValueWindowAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribePeakMeasuredValueWindowAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readAverageMeasuredValueAttribute(long chipClusterPtr, - AverageMeasuredValueAttributeCallback callback - ); - private native void subscribeAverageMeasuredValueAttribute(long chipClusterPtr, - AverageMeasuredValueAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAverageMeasuredValueWindowAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeAverageMeasuredValueWindowAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readUncertaintyAttribute(long chipClusterPtr, - FloatAttributeCallback callback - ); - private native void subscribeUncertaintyAttribute(long chipClusterPtr, - FloatAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readMeasurementUnitAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeMeasurementUnitAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readMeasurementMediumAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeMeasurementMediumAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readLevelValueAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeLevelValueAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - ); - private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - ); - private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - ); - private native void subscribeEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - ); - private native void subscribeAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - } - - public static class RadonConcentrationMeasurementCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 0x0000042FL; - - public RadonConcentrationMeasurementCluster(long devicePtr, int endpointId) { - super(devicePtr, endpointId); - } - - @Override - public native long initWithDevice(long devicePtr, int endpointId); - - public interface MeasuredValueAttributeCallback { - void onSuccess(@Nullable Float value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface MinMeasuredValueAttributeCallback { - void onSuccess(@Nullable Float value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface MaxMeasuredValueAttributeCallback { - void onSuccess(@Nullable Float value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface PeakMeasuredValueAttributeCallback { - void onSuccess(@Nullable Float value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AverageMeasuredValueAttributeCallback { - void onSuccess(@Nullable Float value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface GeneratedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AcceptedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface EventListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AttributeListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - - public void readMeasuredValueAttribute( - MeasuredValueAttributeCallback callback - ) { - readMeasuredValueAttribute(chipClusterPtr, callback); - } - public void subscribeMeasuredValueAttribute( - MeasuredValueAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeMeasuredValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readMinMeasuredValueAttribute( - MinMeasuredValueAttributeCallback callback - ) { - readMinMeasuredValueAttribute(chipClusterPtr, callback); - } - public void subscribeMinMeasuredValueAttribute( - MinMeasuredValueAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeMinMeasuredValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readMaxMeasuredValueAttribute( - MaxMeasuredValueAttributeCallback callback - ) { - readMaxMeasuredValueAttribute(chipClusterPtr, callback); - } - public void subscribeMaxMeasuredValueAttribute( - MaxMeasuredValueAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeMaxMeasuredValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readPeakMeasuredValueAttribute( - PeakMeasuredValueAttributeCallback callback - ) { - readPeakMeasuredValueAttribute(chipClusterPtr, callback); - } - public void subscribePeakMeasuredValueAttribute( - PeakMeasuredValueAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribePeakMeasuredValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readPeakMeasuredValueWindowAttribute( - LongAttributeCallback callback - ) { - readPeakMeasuredValueWindowAttribute(chipClusterPtr, callback); - } - public void subscribePeakMeasuredValueWindowAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribePeakMeasuredValueWindowAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAverageMeasuredValueAttribute( - AverageMeasuredValueAttributeCallback callback - ) { - readAverageMeasuredValueAttribute(chipClusterPtr, callback); - } - public void subscribeAverageMeasuredValueAttribute( - AverageMeasuredValueAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAverageMeasuredValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAverageMeasuredValueWindowAttribute( - LongAttributeCallback callback - ) { - readAverageMeasuredValueWindowAttribute(chipClusterPtr, callback); - } - public void subscribeAverageMeasuredValueWindowAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeAverageMeasuredValueWindowAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readUncertaintyAttribute( - FloatAttributeCallback callback - ) { - readUncertaintyAttribute(chipClusterPtr, callback); - } - public void subscribeUncertaintyAttribute( - FloatAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeUncertaintyAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readMeasurementUnitAttribute( - IntegerAttributeCallback callback - ) { - readMeasurementUnitAttribute(chipClusterPtr, callback); - } - public void subscribeMeasurementUnitAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeMeasurementUnitAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readMeasurementMediumAttribute( - IntegerAttributeCallback callback - ) { - readMeasurementMediumAttribute(chipClusterPtr, callback); - } - public void subscribeMeasurementMediumAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeMeasurementMediumAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readLevelValueAttribute( - IntegerAttributeCallback callback - ) { - readLevelValueAttribute(chipClusterPtr, callback); - } - public void subscribeLevelValueAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeLevelValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - ) { - readGeneratedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - ) { - readAcceptedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readEventListAttribute( - EventListAttributeCallback callback - ) { - readEventListAttribute(chipClusterPtr, callback); - } - public void subscribeEventListAttribute( - EventListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAttributeListAttribute( - AttributeListAttributeCallback callback - ) { - readAttributeListAttribute(chipClusterPtr, callback); - } - public void subscribeAttributeListAttribute( - AttributeListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readFeatureMapAttribute( - LongAttributeCallback callback - ) { - readFeatureMapAttribute(chipClusterPtr, callback); - } - public void subscribeFeatureMapAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readClusterRevisionAttribute( - IntegerAttributeCallback callback - ) { - readClusterRevisionAttribute(chipClusterPtr, callback); - } - public void subscribeClusterRevisionAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - private native void readMeasuredValueAttribute(long chipClusterPtr, - MeasuredValueAttributeCallback callback - ); - private native void subscribeMeasuredValueAttribute(long chipClusterPtr, - MeasuredValueAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readMinMeasuredValueAttribute(long chipClusterPtr, - MinMeasuredValueAttributeCallback callback - ); - private native void subscribeMinMeasuredValueAttribute(long chipClusterPtr, - MinMeasuredValueAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readMaxMeasuredValueAttribute(long chipClusterPtr, - MaxMeasuredValueAttributeCallback callback - ); - private native void subscribeMaxMeasuredValueAttribute(long chipClusterPtr, - MaxMeasuredValueAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readPeakMeasuredValueAttribute(long chipClusterPtr, - PeakMeasuredValueAttributeCallback callback - ); - private native void subscribePeakMeasuredValueAttribute(long chipClusterPtr, - PeakMeasuredValueAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readPeakMeasuredValueWindowAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribePeakMeasuredValueWindowAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readAverageMeasuredValueAttribute(long chipClusterPtr, - AverageMeasuredValueAttributeCallback callback - ); - private native void subscribeAverageMeasuredValueAttribute(long chipClusterPtr, - AverageMeasuredValueAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAverageMeasuredValueWindowAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeAverageMeasuredValueWindowAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readUncertaintyAttribute(long chipClusterPtr, - FloatAttributeCallback callback - ); - private native void subscribeUncertaintyAttribute(long chipClusterPtr, - FloatAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readMeasurementUnitAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeMeasurementUnitAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readMeasurementMediumAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeMeasurementMediumAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readLevelValueAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeLevelValueAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - ); - private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - ); - private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - ); - private native void subscribeEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - ); - private native void subscribeAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - } - - public static class WakeOnLanCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 0x00000503L; - - public WakeOnLanCluster(long devicePtr, int endpointId) { - super(devicePtr, endpointId); - } - - @Override - public native long initWithDevice(long devicePtr, int endpointId); - - public interface GeneratedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AcceptedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface EventListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AttributeListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - - public void readMACAddressAttribute( - CharStringAttributeCallback callback - ) { - readMACAddressAttribute(chipClusterPtr, callback); - } - public void subscribeMACAddressAttribute( - CharStringAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeMACAddressAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - ) { - readGeneratedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - ) { - readAcceptedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readEventListAttribute( - EventListAttributeCallback callback - ) { - readEventListAttribute(chipClusterPtr, callback); - } - public void subscribeEventListAttribute( - EventListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAttributeListAttribute( - AttributeListAttributeCallback callback - ) { - readAttributeListAttribute(chipClusterPtr, callback); - } - public void subscribeAttributeListAttribute( - AttributeListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readFeatureMapAttribute( - LongAttributeCallback callback - ) { - readFeatureMapAttribute(chipClusterPtr, callback); - } - public void subscribeFeatureMapAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readClusterRevisionAttribute( - IntegerAttributeCallback callback - ) { - readClusterRevisionAttribute(chipClusterPtr, callback); - } - public void subscribeClusterRevisionAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - private native void readMACAddressAttribute(long chipClusterPtr, - CharStringAttributeCallback callback - ); - private native void subscribeMACAddressAttribute(long chipClusterPtr, - CharStringAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - ); - private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - ); - private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - ); - private native void subscribeEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - ); - private native void subscribeAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - } - - public static class ChannelCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 0x00000504L; - - public ChannelCluster(long devicePtr, int endpointId) { - super(devicePtr, endpointId); - } - - @Override - public native long initWithDevice(long devicePtr, int endpointId); - - public void changeChannel(ChangeChannelResponseCallback callback - , String match) { - changeChannel(chipClusterPtr, callback, match, null); - } - - public void changeChannel(ChangeChannelResponseCallback callback - , String match - , int timedInvokeTimeoutMs) { - changeChannel(chipClusterPtr, callback, match, timedInvokeTimeoutMs); - } - - public void changeChannelByNumber(DefaultClusterCallback callback - , Integer majorNumber, Integer minorNumber) { - changeChannelByNumber(chipClusterPtr, callback, majorNumber, minorNumber, null); - } - - public void changeChannelByNumber(DefaultClusterCallback callback - , Integer majorNumber, Integer minorNumber - , int timedInvokeTimeoutMs) { - changeChannelByNumber(chipClusterPtr, callback, majorNumber, minorNumber, timedInvokeTimeoutMs); - } - - public void skipChannel(DefaultClusterCallback callback - , Integer count) { - skipChannel(chipClusterPtr, callback, count, null); - } - - public void skipChannel(DefaultClusterCallback callback - , Integer count - , int timedInvokeTimeoutMs) { - skipChannel(chipClusterPtr, callback, count, timedInvokeTimeoutMs); - } - private native void changeChannel(long chipClusterPtr, ChangeChannelResponseCallback Callback - , String match - , @Nullable Integer timedInvokeTimeoutMs); - private native void changeChannelByNumber(long chipClusterPtr, DefaultClusterCallback Callback - , Integer majorNumber, Integer minorNumber - , @Nullable Integer timedInvokeTimeoutMs); - private native void skipChannel(long chipClusterPtr, DefaultClusterCallback Callback - , Integer count - , @Nullable Integer timedInvokeTimeoutMs); - public interface ChangeChannelResponseCallback { - void onSuccess(Integer status, Optional data); - - void onError(Exception error); - } - - - public interface ChannelListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface GeneratedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AcceptedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface EventListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AttributeListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - - public void readChannelListAttribute( - ChannelListAttributeCallback callback - ) { - readChannelListAttribute(chipClusterPtr, callback); - } - public void subscribeChannelListAttribute( - ChannelListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeChannelListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - ) { - readGeneratedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - ) { - readAcceptedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readEventListAttribute( - EventListAttributeCallback callback - ) { - readEventListAttribute(chipClusterPtr, callback); - } - public void subscribeEventListAttribute( - EventListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAttributeListAttribute( - AttributeListAttributeCallback callback - ) { - readAttributeListAttribute(chipClusterPtr, callback); - } - public void subscribeAttributeListAttribute( - AttributeListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readFeatureMapAttribute( - LongAttributeCallback callback - ) { - readFeatureMapAttribute(chipClusterPtr, callback); - } - public void subscribeFeatureMapAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readClusterRevisionAttribute( - IntegerAttributeCallback callback - ) { - readClusterRevisionAttribute(chipClusterPtr, callback); - } - public void subscribeClusterRevisionAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - private native void readChannelListAttribute(long chipClusterPtr, - ChannelListAttributeCallback callback - ); - private native void subscribeChannelListAttribute(long chipClusterPtr, - ChannelListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - ); - private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - ); - private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - ); - private native void subscribeEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - ); - private native void subscribeAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - } - - public static class TargetNavigatorCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 0x00000505L; - - public TargetNavigatorCluster(long devicePtr, int endpointId) { - super(devicePtr, endpointId); - } - - @Override - public native long initWithDevice(long devicePtr, int endpointId); - - public void navigateTarget(NavigateTargetResponseCallback callback - , Integer target, Optional data) { - navigateTarget(chipClusterPtr, callback, target, data, null); - } - - public void navigateTarget(NavigateTargetResponseCallback callback - , Integer target, Optional data - , int timedInvokeTimeoutMs) { - navigateTarget(chipClusterPtr, callback, target, data, timedInvokeTimeoutMs); - } - private native void navigateTarget(long chipClusterPtr, NavigateTargetResponseCallback Callback - , Integer target, Optional data - , @Nullable Integer timedInvokeTimeoutMs); - public interface NavigateTargetResponseCallback { - void onSuccess(Integer status, Optional data); - - void onError(Exception error); - } - - - public interface TargetListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface GeneratedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AcceptedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface EventListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AttributeListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - - public void readTargetListAttribute( - TargetListAttributeCallback callback - ) { - readTargetListAttribute(chipClusterPtr, callback); - } - public void subscribeTargetListAttribute( - TargetListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeTargetListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readCurrentTargetAttribute( - IntegerAttributeCallback callback - ) { - readCurrentTargetAttribute(chipClusterPtr, callback); - } - public void subscribeCurrentTargetAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeCurrentTargetAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - ) { - readGeneratedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - ) { - readAcceptedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readEventListAttribute( - EventListAttributeCallback callback - ) { - readEventListAttribute(chipClusterPtr, callback); - } - public void subscribeEventListAttribute( - EventListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAttributeListAttribute( - AttributeListAttributeCallback callback - ) { - readAttributeListAttribute(chipClusterPtr, callback); - } - public void subscribeAttributeListAttribute( - AttributeListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readFeatureMapAttribute( - LongAttributeCallback callback - ) { - readFeatureMapAttribute(chipClusterPtr, callback); - } - public void subscribeFeatureMapAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readClusterRevisionAttribute( - IntegerAttributeCallback callback - ) { - readClusterRevisionAttribute(chipClusterPtr, callback); - } - public void subscribeClusterRevisionAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - private native void readTargetListAttribute(long chipClusterPtr, - TargetListAttributeCallback callback - ); - private native void subscribeTargetListAttribute(long chipClusterPtr, - TargetListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readCurrentTargetAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeCurrentTargetAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - ); - private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - ); - private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - ); - private native void subscribeEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - ); - private native void subscribeAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - } - - public static class MediaPlaybackCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 0x00000506L; - - public MediaPlaybackCluster(long devicePtr, int endpointId) { - super(devicePtr, endpointId); - } - - @Override - public native long initWithDevice(long devicePtr, int endpointId); - - public void play(PlaybackResponseCallback callback - ) { - play(chipClusterPtr, callback, null); - } - - public void play(PlaybackResponseCallback callback - - , int timedInvokeTimeoutMs) { - play(chipClusterPtr, callback, timedInvokeTimeoutMs); - } - - public void pause(PlaybackResponseCallback callback - ) { - pause(chipClusterPtr, callback, null); - } - - public void pause(PlaybackResponseCallback callback - - , int timedInvokeTimeoutMs) { - pause(chipClusterPtr, callback, timedInvokeTimeoutMs); - } - - public void stop(PlaybackResponseCallback callback - ) { - stop(chipClusterPtr, callback, null); - } - - public void stop(PlaybackResponseCallback callback - - , int timedInvokeTimeoutMs) { - stop(chipClusterPtr, callback, timedInvokeTimeoutMs); - } - - public void startOver(PlaybackResponseCallback callback - ) { - startOver(chipClusterPtr, callback, null); - } - - public void startOver(PlaybackResponseCallback callback - - , int timedInvokeTimeoutMs) { - startOver(chipClusterPtr, callback, timedInvokeTimeoutMs); - } - - public void previous(PlaybackResponseCallback callback - ) { - previous(chipClusterPtr, callback, null); - } - - public void previous(PlaybackResponseCallback callback - - , int timedInvokeTimeoutMs) { - previous(chipClusterPtr, callback, timedInvokeTimeoutMs); - } - - public void next(PlaybackResponseCallback callback - ) { - next(chipClusterPtr, callback, null); - } - - public void next(PlaybackResponseCallback callback - - , int timedInvokeTimeoutMs) { - next(chipClusterPtr, callback, timedInvokeTimeoutMs); - } - - public void rewind(PlaybackResponseCallback callback - ) { - rewind(chipClusterPtr, callback, null); - } - - public void rewind(PlaybackResponseCallback callback - - , int timedInvokeTimeoutMs) { - rewind(chipClusterPtr, callback, timedInvokeTimeoutMs); - } - - public void fastForward(PlaybackResponseCallback callback - ) { - fastForward(chipClusterPtr, callback, null); - } - - public void fastForward(PlaybackResponseCallback callback - - , int timedInvokeTimeoutMs) { - fastForward(chipClusterPtr, callback, timedInvokeTimeoutMs); - } - - public void skipForward(PlaybackResponseCallback callback - , Long deltaPositionMilliseconds) { - skipForward(chipClusterPtr, callback, deltaPositionMilliseconds, null); - } - - public void skipForward(PlaybackResponseCallback callback - , Long deltaPositionMilliseconds - , int timedInvokeTimeoutMs) { - skipForward(chipClusterPtr, callback, deltaPositionMilliseconds, timedInvokeTimeoutMs); - } - - public void skipBackward(PlaybackResponseCallback callback - , Long deltaPositionMilliseconds) { - skipBackward(chipClusterPtr, callback, deltaPositionMilliseconds, null); - } - - public void skipBackward(PlaybackResponseCallback callback - , Long deltaPositionMilliseconds - , int timedInvokeTimeoutMs) { - skipBackward(chipClusterPtr, callback, deltaPositionMilliseconds, timedInvokeTimeoutMs); - } - - public void seek(PlaybackResponseCallback callback - , Long position) { - seek(chipClusterPtr, callback, position, null); - } - - public void seek(PlaybackResponseCallback callback - , Long position - , int timedInvokeTimeoutMs) { - seek(chipClusterPtr, callback, position, timedInvokeTimeoutMs); - } - private native void play(long chipClusterPtr, PlaybackResponseCallback Callback - - , @Nullable Integer timedInvokeTimeoutMs); - private native void pause(long chipClusterPtr, PlaybackResponseCallback Callback - - , @Nullable Integer timedInvokeTimeoutMs); - private native void stop(long chipClusterPtr, PlaybackResponseCallback Callback - - , @Nullable Integer timedInvokeTimeoutMs); - private native void startOver(long chipClusterPtr, PlaybackResponseCallback Callback - - , @Nullable Integer timedInvokeTimeoutMs); - private native void previous(long chipClusterPtr, PlaybackResponseCallback Callback - - , @Nullable Integer timedInvokeTimeoutMs); - private native void next(long chipClusterPtr, PlaybackResponseCallback Callback - - , @Nullable Integer timedInvokeTimeoutMs); - private native void rewind(long chipClusterPtr, PlaybackResponseCallback Callback - - , @Nullable Integer timedInvokeTimeoutMs); - private native void fastForward(long chipClusterPtr, PlaybackResponseCallback Callback - - , @Nullable Integer timedInvokeTimeoutMs); - private native void skipForward(long chipClusterPtr, PlaybackResponseCallback Callback - , Long deltaPositionMilliseconds - , @Nullable Integer timedInvokeTimeoutMs); - private native void skipBackward(long chipClusterPtr, PlaybackResponseCallback Callback - , Long deltaPositionMilliseconds - , @Nullable Integer timedInvokeTimeoutMs); - private native void seek(long chipClusterPtr, PlaybackResponseCallback Callback - , Long position - , @Nullable Integer timedInvokeTimeoutMs); - public interface PlaybackResponseCallback { - void onSuccess(Integer status, Optional data); - - void onError(Exception error); - } - - - public interface StartTimeAttributeCallback { - void onSuccess(@Nullable Long value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface DurationAttributeCallback { - void onSuccess(@Nullable Long value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface SeekRangeEndAttributeCallback { - void onSuccess(@Nullable Long value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface SeekRangeStartAttributeCallback { - void onSuccess(@Nullable Long value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface GeneratedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AcceptedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface EventListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AttributeListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - - public void readCurrentStateAttribute( - IntegerAttributeCallback callback - ) { - readCurrentStateAttribute(chipClusterPtr, callback); - } - public void subscribeCurrentStateAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeCurrentStateAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readStartTimeAttribute( - StartTimeAttributeCallback callback - ) { - readStartTimeAttribute(chipClusterPtr, callback); - } - public void subscribeStartTimeAttribute( - StartTimeAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeStartTimeAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readDurationAttribute( - DurationAttributeCallback callback - ) { - readDurationAttribute(chipClusterPtr, callback); - } - public void subscribeDurationAttribute( - DurationAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeDurationAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readPlaybackSpeedAttribute( - FloatAttributeCallback callback - ) { - readPlaybackSpeedAttribute(chipClusterPtr, callback); - } - public void subscribePlaybackSpeedAttribute( - FloatAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribePlaybackSpeedAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readSeekRangeEndAttribute( - SeekRangeEndAttributeCallback callback - ) { - readSeekRangeEndAttribute(chipClusterPtr, callback); - } - public void subscribeSeekRangeEndAttribute( - SeekRangeEndAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeSeekRangeEndAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readSeekRangeStartAttribute( - SeekRangeStartAttributeCallback callback - ) { - readSeekRangeStartAttribute(chipClusterPtr, callback); - } - public void subscribeSeekRangeStartAttribute( - SeekRangeStartAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeSeekRangeStartAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - ) { - readGeneratedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - ) { - readAcceptedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readEventListAttribute( - EventListAttributeCallback callback - ) { - readEventListAttribute(chipClusterPtr, callback); - } - public void subscribeEventListAttribute( - EventListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAttributeListAttribute( - AttributeListAttributeCallback callback - ) { - readAttributeListAttribute(chipClusterPtr, callback); - } - public void subscribeAttributeListAttribute( - AttributeListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readFeatureMapAttribute( - LongAttributeCallback callback - ) { - readFeatureMapAttribute(chipClusterPtr, callback); - } - public void subscribeFeatureMapAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readClusterRevisionAttribute( - IntegerAttributeCallback callback - ) { - readClusterRevisionAttribute(chipClusterPtr, callback); - } - public void subscribeClusterRevisionAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - private native void readCurrentStateAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeCurrentStateAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readStartTimeAttribute(long chipClusterPtr, - StartTimeAttributeCallback callback - ); - private native void subscribeStartTimeAttribute(long chipClusterPtr, - StartTimeAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readDurationAttribute(long chipClusterPtr, - DurationAttributeCallback callback - ); - private native void subscribeDurationAttribute(long chipClusterPtr, - DurationAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readPlaybackSpeedAttribute(long chipClusterPtr, - FloatAttributeCallback callback - ); - private native void subscribePlaybackSpeedAttribute(long chipClusterPtr, - FloatAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readSeekRangeEndAttribute(long chipClusterPtr, - SeekRangeEndAttributeCallback callback - ); - private native void subscribeSeekRangeEndAttribute(long chipClusterPtr, - SeekRangeEndAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readSeekRangeStartAttribute(long chipClusterPtr, - SeekRangeStartAttributeCallback callback - ); - private native void subscribeSeekRangeStartAttribute(long chipClusterPtr, - SeekRangeStartAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - ); - private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - ); - private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - ); - private native void subscribeEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - ); - private native void subscribeAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - } - - public static class MediaInputCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 0x00000507L; - - public MediaInputCluster(long devicePtr, int endpointId) { - super(devicePtr, endpointId); - } - - @Override - public native long initWithDevice(long devicePtr, int endpointId); - - public void selectInput(DefaultClusterCallback callback - , Integer index) { - selectInput(chipClusterPtr, callback, index, null); - } - - public void selectInput(DefaultClusterCallback callback - , Integer index - , int timedInvokeTimeoutMs) { - selectInput(chipClusterPtr, callback, index, timedInvokeTimeoutMs); - } - - public void showInputStatus(DefaultClusterCallback callback - ) { - showInputStatus(chipClusterPtr, callback, null); - } - - public void showInputStatus(DefaultClusterCallback callback - - , int timedInvokeTimeoutMs) { - showInputStatus(chipClusterPtr, callback, timedInvokeTimeoutMs); - } - - public void hideInputStatus(DefaultClusterCallback callback - ) { - hideInputStatus(chipClusterPtr, callback, null); - } - - public void hideInputStatus(DefaultClusterCallback callback - - , int timedInvokeTimeoutMs) { - hideInputStatus(chipClusterPtr, callback, timedInvokeTimeoutMs); - } - - public void renameInput(DefaultClusterCallback callback - , Integer index, String name) { - renameInput(chipClusterPtr, callback, index, name, null); - } - - public void renameInput(DefaultClusterCallback callback - , Integer index, String name - , int timedInvokeTimeoutMs) { - renameInput(chipClusterPtr, callback, index, name, timedInvokeTimeoutMs); - } - private native void selectInput(long chipClusterPtr, DefaultClusterCallback Callback - , Integer index - , @Nullable Integer timedInvokeTimeoutMs); - private native void showInputStatus(long chipClusterPtr, DefaultClusterCallback Callback - - , @Nullable Integer timedInvokeTimeoutMs); - private native void hideInputStatus(long chipClusterPtr, DefaultClusterCallback Callback - - , @Nullable Integer timedInvokeTimeoutMs); - private native void renameInput(long chipClusterPtr, DefaultClusterCallback Callback - , Integer index, String name - , @Nullable Integer timedInvokeTimeoutMs); - - public interface InputListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface GeneratedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AcceptedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface EventListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AttributeListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - - public void readInputListAttribute( - InputListAttributeCallback callback - ) { - readInputListAttribute(chipClusterPtr, callback); - } - public void subscribeInputListAttribute( - InputListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeInputListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readCurrentInputAttribute( - IntegerAttributeCallback callback - ) { - readCurrentInputAttribute(chipClusterPtr, callback); - } - public void subscribeCurrentInputAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeCurrentInputAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - ) { - readGeneratedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - ) { - readAcceptedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readEventListAttribute( - EventListAttributeCallback callback - ) { - readEventListAttribute(chipClusterPtr, callback); - } - public void subscribeEventListAttribute( - EventListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAttributeListAttribute( - AttributeListAttributeCallback callback - ) { - readAttributeListAttribute(chipClusterPtr, callback); - } - public void subscribeAttributeListAttribute( - AttributeListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readFeatureMapAttribute( - LongAttributeCallback callback - ) { - readFeatureMapAttribute(chipClusterPtr, callback); - } - public void subscribeFeatureMapAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readClusterRevisionAttribute( - IntegerAttributeCallback callback - ) { - readClusterRevisionAttribute(chipClusterPtr, callback); - } - public void subscribeClusterRevisionAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - private native void readInputListAttribute(long chipClusterPtr, - InputListAttributeCallback callback - ); - private native void subscribeInputListAttribute(long chipClusterPtr, - InputListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readCurrentInputAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeCurrentInputAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - ); - private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - ); - private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - ); - private native void subscribeEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - ); - private native void subscribeAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - } - - public static class LowPowerCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 0x00000508L; - - public LowPowerCluster(long devicePtr, int endpointId) { - super(devicePtr, endpointId); - } - - @Override - public native long initWithDevice(long devicePtr, int endpointId); - - public void sleep(DefaultClusterCallback callback - ) { - sleep(chipClusterPtr, callback, null); - } - - public void sleep(DefaultClusterCallback callback - - , int timedInvokeTimeoutMs) { - sleep(chipClusterPtr, callback, timedInvokeTimeoutMs); - } - private native void sleep(long chipClusterPtr, DefaultClusterCallback Callback - - , @Nullable Integer timedInvokeTimeoutMs); - - public interface GeneratedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AcceptedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface EventListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AttributeListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - - public void readGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - ) { - readGeneratedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - ) { - readAcceptedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readEventListAttribute( - EventListAttributeCallback callback - ) { - readEventListAttribute(chipClusterPtr, callback); - } - public void subscribeEventListAttribute( - EventListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAttributeListAttribute( - AttributeListAttributeCallback callback - ) { - readAttributeListAttribute(chipClusterPtr, callback); - } - public void subscribeAttributeListAttribute( - AttributeListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readFeatureMapAttribute( - LongAttributeCallback callback - ) { - readFeatureMapAttribute(chipClusterPtr, callback); - } - public void subscribeFeatureMapAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readClusterRevisionAttribute( - IntegerAttributeCallback callback - ) { - readClusterRevisionAttribute(chipClusterPtr, callback); - } - public void subscribeClusterRevisionAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - private native void readGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - ); - private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - ); - private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - ); - private native void subscribeEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - ); - private native void subscribeAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - } - - public static class KeypadInputCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 0x00000509L; - - public KeypadInputCluster(long devicePtr, int endpointId) { - super(devicePtr, endpointId); - } - - @Override - public native long initWithDevice(long devicePtr, int endpointId); - - public void sendKey(SendKeyResponseCallback callback - , Integer keyCode) { - sendKey(chipClusterPtr, callback, keyCode, null); - } - - public void sendKey(SendKeyResponseCallback callback - , Integer keyCode - , int timedInvokeTimeoutMs) { - sendKey(chipClusterPtr, callback, keyCode, timedInvokeTimeoutMs); - } - private native void sendKey(long chipClusterPtr, SendKeyResponseCallback Callback - , Integer keyCode - , @Nullable Integer timedInvokeTimeoutMs); - public interface SendKeyResponseCallback { - void onSuccess(Integer status); - - void onError(Exception error); - } - - - public interface GeneratedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AcceptedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface EventListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AttributeListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - - public void readGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - ) { - readGeneratedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - ) { - readAcceptedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readEventListAttribute( - EventListAttributeCallback callback - ) { - readEventListAttribute(chipClusterPtr, callback); - } - public void subscribeEventListAttribute( - EventListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAttributeListAttribute( - AttributeListAttributeCallback callback - ) { - readAttributeListAttribute(chipClusterPtr, callback); - } - public void subscribeAttributeListAttribute( - AttributeListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readFeatureMapAttribute( - LongAttributeCallback callback - ) { - readFeatureMapAttribute(chipClusterPtr, callback); - } - public void subscribeFeatureMapAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readClusterRevisionAttribute( - IntegerAttributeCallback callback - ) { - readClusterRevisionAttribute(chipClusterPtr, callback); - } - public void subscribeClusterRevisionAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - private native void readGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - ); - private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - ); - private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - ); - private native void subscribeEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - ); - private native void subscribeAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - } - - public static class ContentLauncherCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 0x0000050AL; - - public ContentLauncherCluster(long devicePtr, int endpointId) { - super(devicePtr, endpointId); - } - - @Override - public native long initWithDevice(long devicePtr, int endpointId); - - public void launchContent(LauncherResponseCallback callback - , ChipStructs.ContentLauncherClusterContentSearchStruct search, Boolean autoPlay, Optional data) { - launchContent(chipClusterPtr, callback, search, autoPlay, data, null); - } - - public void launchContent(LauncherResponseCallback callback - , ChipStructs.ContentLauncherClusterContentSearchStruct search, Boolean autoPlay, Optional data - , int timedInvokeTimeoutMs) { - launchContent(chipClusterPtr, callback, search, autoPlay, data, timedInvokeTimeoutMs); - } - - public void launchURL(LauncherResponseCallback callback - , String contentURL, Optional displayString, Optional brandingInformation) { - launchURL(chipClusterPtr, callback, contentURL, displayString, brandingInformation, null); - } - - public void launchURL(LauncherResponseCallback callback - , String contentURL, Optional displayString, Optional brandingInformation - , int timedInvokeTimeoutMs) { - launchURL(chipClusterPtr, callback, contentURL, displayString, brandingInformation, timedInvokeTimeoutMs); - } - private native void launchContent(long chipClusterPtr, LauncherResponseCallback Callback - , ChipStructs.ContentLauncherClusterContentSearchStruct search, Boolean autoPlay, Optional data - , @Nullable Integer timedInvokeTimeoutMs); - private native void launchURL(long chipClusterPtr, LauncherResponseCallback Callback - , String contentURL, Optional displayString, Optional brandingInformation - , @Nullable Integer timedInvokeTimeoutMs); - public interface LauncherResponseCallback { - void onSuccess(Integer status, Optional data); - - void onError(Exception error); - } - - - public interface AcceptHeaderAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface GeneratedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AcceptedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface EventListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AttributeListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - - public void readAcceptHeaderAttribute( - AcceptHeaderAttributeCallback callback - ) { - readAcceptHeaderAttribute(chipClusterPtr, callback); - } - public void subscribeAcceptHeaderAttribute( - AcceptHeaderAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAcceptHeaderAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readSupportedStreamingProtocolsAttribute( - LongAttributeCallback callback - ) { - readSupportedStreamingProtocolsAttribute(chipClusterPtr, callback); - } - public void writeSupportedStreamingProtocolsAttribute(DefaultClusterCallback callback, Long value) { - writeSupportedStreamingProtocolsAttribute(chipClusterPtr, callback, value, null); - } - - public void writeSupportedStreamingProtocolsAttribute(DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { - writeSupportedStreamingProtocolsAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeSupportedStreamingProtocolsAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeSupportedStreamingProtocolsAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - ) { - readGeneratedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - ) { - readAcceptedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readEventListAttribute( - EventListAttributeCallback callback - ) { - readEventListAttribute(chipClusterPtr, callback); - } - public void subscribeEventListAttribute( - EventListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAttributeListAttribute( - AttributeListAttributeCallback callback - ) { - readAttributeListAttribute(chipClusterPtr, callback); - } - public void subscribeAttributeListAttribute( - AttributeListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readFeatureMapAttribute( - LongAttributeCallback callback - ) { - readFeatureMapAttribute(chipClusterPtr, callback); - } - public void subscribeFeatureMapAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readClusterRevisionAttribute( - IntegerAttributeCallback callback - ) { - readClusterRevisionAttribute(chipClusterPtr, callback); - } - public void subscribeClusterRevisionAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - private native void readAcceptHeaderAttribute(long chipClusterPtr, - AcceptHeaderAttributeCallback callback - ); - private native void subscribeAcceptHeaderAttribute(long chipClusterPtr, - AcceptHeaderAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readSupportedStreamingProtocolsAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - - private native void writeSupportedStreamingProtocolsAttribute(long chipClusterPtr, DefaultClusterCallback callback, Long value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeSupportedStreamingProtocolsAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - ); - private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - ); - private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - ); - private native void subscribeEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - ); - private native void subscribeAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - } - - public static class AudioOutputCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 0x0000050BL; - - public AudioOutputCluster(long devicePtr, int endpointId) { - super(devicePtr, endpointId); - } - - @Override - public native long initWithDevice(long devicePtr, int endpointId); - - public void selectOutput(DefaultClusterCallback callback - , Integer index) { - selectOutput(chipClusterPtr, callback, index, null); - } - - public void selectOutput(DefaultClusterCallback callback - , Integer index - , int timedInvokeTimeoutMs) { - selectOutput(chipClusterPtr, callback, index, timedInvokeTimeoutMs); - } - - public void renameOutput(DefaultClusterCallback callback - , Integer index, String name) { - renameOutput(chipClusterPtr, callback, index, name, null); - } - - public void renameOutput(DefaultClusterCallback callback - , Integer index, String name - , int timedInvokeTimeoutMs) { - renameOutput(chipClusterPtr, callback, index, name, timedInvokeTimeoutMs); - } - private native void selectOutput(long chipClusterPtr, DefaultClusterCallback Callback - , Integer index - , @Nullable Integer timedInvokeTimeoutMs); - private native void renameOutput(long chipClusterPtr, DefaultClusterCallback Callback - , Integer index, String name - , @Nullable Integer timedInvokeTimeoutMs); - - public interface OutputListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface GeneratedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AcceptedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface EventListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AttributeListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - - public void readOutputListAttribute( - OutputListAttributeCallback callback - ) { - readOutputListAttribute(chipClusterPtr, callback); - } - public void subscribeOutputListAttribute( - OutputListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeOutputListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readCurrentOutputAttribute( - IntegerAttributeCallback callback - ) { - readCurrentOutputAttribute(chipClusterPtr, callback); - } - public void subscribeCurrentOutputAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeCurrentOutputAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - ) { - readGeneratedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - ) { - readAcceptedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readEventListAttribute( - EventListAttributeCallback callback - ) { - readEventListAttribute(chipClusterPtr, callback); - } - public void subscribeEventListAttribute( - EventListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAttributeListAttribute( - AttributeListAttributeCallback callback - ) { - readAttributeListAttribute(chipClusterPtr, callback); - } - public void subscribeAttributeListAttribute( - AttributeListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readFeatureMapAttribute( - LongAttributeCallback callback - ) { - readFeatureMapAttribute(chipClusterPtr, callback); - } - public void subscribeFeatureMapAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readClusterRevisionAttribute( - IntegerAttributeCallback callback - ) { - readClusterRevisionAttribute(chipClusterPtr, callback); - } - public void subscribeClusterRevisionAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - private native void readOutputListAttribute(long chipClusterPtr, - OutputListAttributeCallback callback - ); - private native void subscribeOutputListAttribute(long chipClusterPtr, - OutputListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readCurrentOutputAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeCurrentOutputAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - ); - private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - ); - private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - ); - private native void subscribeEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - ); - private native void subscribeAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - } - - public static class ApplicationLauncherCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 0x0000050CL; - - public ApplicationLauncherCluster(long devicePtr, int endpointId) { - super(devicePtr, endpointId); - } - - @Override - public native long initWithDevice(long devicePtr, int endpointId); - - public void launchApp(LauncherResponseCallback callback - , Optional application, Optional data) { - launchApp(chipClusterPtr, callback, application, data, null); - } - - public void launchApp(LauncherResponseCallback callback - , Optional application, Optional data - , int timedInvokeTimeoutMs) { - launchApp(chipClusterPtr, callback, application, data, timedInvokeTimeoutMs); - } - - public void stopApp(LauncherResponseCallback callback - , Optional application) { - stopApp(chipClusterPtr, callback, application, null); - } - - public void stopApp(LauncherResponseCallback callback - , Optional application - , int timedInvokeTimeoutMs) { - stopApp(chipClusterPtr, callback, application, timedInvokeTimeoutMs); - } - - public void hideApp(LauncherResponseCallback callback - , Optional application) { - hideApp(chipClusterPtr, callback, application, null); - } - - public void hideApp(LauncherResponseCallback callback - , Optional application - , int timedInvokeTimeoutMs) { - hideApp(chipClusterPtr, callback, application, timedInvokeTimeoutMs); - } - private native void launchApp(long chipClusterPtr, LauncherResponseCallback Callback - , Optional application, Optional data - , @Nullable Integer timedInvokeTimeoutMs); - private native void stopApp(long chipClusterPtr, LauncherResponseCallback Callback - , Optional application - , @Nullable Integer timedInvokeTimeoutMs); - private native void hideApp(long chipClusterPtr, LauncherResponseCallback Callback - , Optional application - , @Nullable Integer timedInvokeTimeoutMs); - public interface LauncherResponseCallback { - void onSuccess(Integer status, Optional data); - - void onError(Exception error); - } - - - public interface CatalogListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface GeneratedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AcceptedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface EventListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AttributeListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - - public void readCatalogListAttribute( - CatalogListAttributeCallback callback - ) { - readCatalogListAttribute(chipClusterPtr, callback); - } - public void subscribeCatalogListAttribute( - CatalogListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeCatalogListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - ) { - readGeneratedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - ) { - readAcceptedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readEventListAttribute( - EventListAttributeCallback callback - ) { - readEventListAttribute(chipClusterPtr, callback); - } - public void subscribeEventListAttribute( - EventListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAttributeListAttribute( - AttributeListAttributeCallback callback - ) { - readAttributeListAttribute(chipClusterPtr, callback); - } - public void subscribeAttributeListAttribute( - AttributeListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readFeatureMapAttribute( - LongAttributeCallback callback - ) { - readFeatureMapAttribute(chipClusterPtr, callback); - } - public void subscribeFeatureMapAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readClusterRevisionAttribute( - IntegerAttributeCallback callback - ) { - readClusterRevisionAttribute(chipClusterPtr, callback); - } - public void subscribeClusterRevisionAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - private native void readCatalogListAttribute(long chipClusterPtr, - CatalogListAttributeCallback callback - ); - private native void subscribeCatalogListAttribute(long chipClusterPtr, - CatalogListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - ); - private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - ); - private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - ); - private native void subscribeEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - ); - private native void subscribeAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - } - - public static class ApplicationBasicCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 0x0000050DL; - - public ApplicationBasicCluster(long devicePtr, int endpointId) { - super(devicePtr, endpointId); - } - - @Override - public native long initWithDevice(long devicePtr, int endpointId); - - public interface AllowedVendorListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface GeneratedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AcceptedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface EventListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AttributeListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - - public void readVendorNameAttribute( - CharStringAttributeCallback callback - ) { - readVendorNameAttribute(chipClusterPtr, callback); - } - public void subscribeVendorNameAttribute( - CharStringAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeVendorNameAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readVendorIDAttribute( - IntegerAttributeCallback callback - ) { - readVendorIDAttribute(chipClusterPtr, callback); - } - public void subscribeVendorIDAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeVendorIDAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readApplicationNameAttribute( - CharStringAttributeCallback callback - ) { - readApplicationNameAttribute(chipClusterPtr, callback); - } - public void subscribeApplicationNameAttribute( - CharStringAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeApplicationNameAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readProductIDAttribute( - IntegerAttributeCallback callback - ) { - readProductIDAttribute(chipClusterPtr, callback); - } - public void subscribeProductIDAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeProductIDAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readStatusAttribute( - IntegerAttributeCallback callback - ) { - readStatusAttribute(chipClusterPtr, callback); - } - public void subscribeStatusAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeStatusAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readApplicationVersionAttribute( - CharStringAttributeCallback callback - ) { - readApplicationVersionAttribute(chipClusterPtr, callback); - } - public void subscribeApplicationVersionAttribute( - CharStringAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeApplicationVersionAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAllowedVendorListAttribute( - AllowedVendorListAttributeCallback callback - ) { - readAllowedVendorListAttribute(chipClusterPtr, callback); - } - public void subscribeAllowedVendorListAttribute( - AllowedVendorListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAllowedVendorListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - ) { - readGeneratedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - ) { - readAcceptedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readEventListAttribute( - EventListAttributeCallback callback - ) { - readEventListAttribute(chipClusterPtr, callback); - } - public void subscribeEventListAttribute( - EventListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAttributeListAttribute( - AttributeListAttributeCallback callback - ) { - readAttributeListAttribute(chipClusterPtr, callback); - } - public void subscribeAttributeListAttribute( - AttributeListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readFeatureMapAttribute( - LongAttributeCallback callback - ) { - readFeatureMapAttribute(chipClusterPtr, callback); - } - public void subscribeFeatureMapAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readClusterRevisionAttribute( - IntegerAttributeCallback callback - ) { - readClusterRevisionAttribute(chipClusterPtr, callback); - } - public void subscribeClusterRevisionAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - private native void readVendorNameAttribute(long chipClusterPtr, - CharStringAttributeCallback callback - ); - private native void subscribeVendorNameAttribute(long chipClusterPtr, - CharStringAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readVendorIDAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeVendorIDAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readApplicationNameAttribute(long chipClusterPtr, - CharStringAttributeCallback callback - ); - private native void subscribeApplicationNameAttribute(long chipClusterPtr, - CharStringAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readProductIDAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeProductIDAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readStatusAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeStatusAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readApplicationVersionAttribute(long chipClusterPtr, - CharStringAttributeCallback callback - ); - private native void subscribeApplicationVersionAttribute(long chipClusterPtr, - CharStringAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readAllowedVendorListAttribute(long chipClusterPtr, - AllowedVendorListAttributeCallback callback - ); - private native void subscribeAllowedVendorListAttribute(long chipClusterPtr, - AllowedVendorListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - ); - private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - ); - private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - ); - private native void subscribeEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - ); - private native void subscribeAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - } - - public static class AccountLoginCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 0x0000050EL; - - public AccountLoginCluster(long devicePtr, int endpointId) { - super(devicePtr, endpointId); - } - - @Override - public native long initWithDevice(long devicePtr, int endpointId); - - - public void getSetupPIN(GetSetupPINResponseCallback callback - , String tempAccountIdentifier - , int timedInvokeTimeoutMs) { - getSetupPIN(chipClusterPtr, callback, tempAccountIdentifier, timedInvokeTimeoutMs); - } - - - public void login(DefaultClusterCallback callback - , String tempAccountIdentifier, String setupPIN - , int timedInvokeTimeoutMs) { - login(chipClusterPtr, callback, tempAccountIdentifier, setupPIN, timedInvokeTimeoutMs); - } - - - public void logout(DefaultClusterCallback callback - - , int timedInvokeTimeoutMs) { - logout(chipClusterPtr, callback, timedInvokeTimeoutMs); - } - private native void getSetupPIN(long chipClusterPtr, GetSetupPINResponseCallback Callback - , String tempAccountIdentifier - , @Nullable Integer timedInvokeTimeoutMs); - private native void login(long chipClusterPtr, DefaultClusterCallback Callback - , String tempAccountIdentifier, String setupPIN - , @Nullable Integer timedInvokeTimeoutMs); - private native void logout(long chipClusterPtr, DefaultClusterCallback Callback - - , @Nullable Integer timedInvokeTimeoutMs); - public interface GetSetupPINResponseCallback { - void onSuccess(String setupPIN); - - void onError(Exception error); - } - - - public interface GeneratedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AcceptedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface EventListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AttributeListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - - public void readGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - ) { - readGeneratedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - ) { - readAcceptedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readEventListAttribute( - EventListAttributeCallback callback - ) { - readEventListAttribute(chipClusterPtr, callback); - } - public void subscribeEventListAttribute( - EventListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAttributeListAttribute( - AttributeListAttributeCallback callback - ) { - readAttributeListAttribute(chipClusterPtr, callback); - } - public void subscribeAttributeListAttribute( - AttributeListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readFeatureMapAttribute( - LongAttributeCallback callback - ) { - readFeatureMapAttribute(chipClusterPtr, callback); - } - public void subscribeFeatureMapAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readClusterRevisionAttribute( - IntegerAttributeCallback callback - ) { - readClusterRevisionAttribute(chipClusterPtr, callback); - } - public void subscribeClusterRevisionAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - private native void readGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - ); - private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - ); - private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - ); - private native void subscribeEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - ); - private native void subscribeAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - } - - public static class ElectricalMeasurementCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 0x00000B04L; - - public ElectricalMeasurementCluster(long devicePtr, int endpointId) { - super(devicePtr, endpointId); - } - - @Override - public native long initWithDevice(long devicePtr, int endpointId); - - public void getProfileInfoCommand(DefaultClusterCallback callback - ) { - getProfileInfoCommand(chipClusterPtr, callback, null); - } - - public void getProfileInfoCommand(DefaultClusterCallback callback - - , int timedInvokeTimeoutMs) { - getProfileInfoCommand(chipClusterPtr, callback, timedInvokeTimeoutMs); - } - - public void getMeasurementProfileCommand(DefaultClusterCallback callback - , Integer attributeId, Long startTime, Integer numberOfIntervals) { - getMeasurementProfileCommand(chipClusterPtr, callback, attributeId, startTime, numberOfIntervals, null); - } - - public void getMeasurementProfileCommand(DefaultClusterCallback callback - , Integer attributeId, Long startTime, Integer numberOfIntervals - , int timedInvokeTimeoutMs) { - getMeasurementProfileCommand(chipClusterPtr, callback, attributeId, startTime, numberOfIntervals, timedInvokeTimeoutMs); - } - private native void getProfileInfoCommand(long chipClusterPtr, DefaultClusterCallback Callback - - , @Nullable Integer timedInvokeTimeoutMs); - private native void getMeasurementProfileCommand(long chipClusterPtr, DefaultClusterCallback Callback - , Integer attributeId, Long startTime, Integer numberOfIntervals - , @Nullable Integer timedInvokeTimeoutMs); - public interface GetProfileInfoResponseCommandCallback { - void onSuccess(Integer profileCount, Integer profileIntervalPeriod, Integer maxNumberOfIntervals, ArrayList listOfAttributes); - - void onError(Exception error); - } - - public interface GetMeasurementProfileResponseCommandCallback { - void onSuccess(Long startTime, Integer status, Integer profileIntervalPeriod, Integer numberOfIntervalsDelivered, Integer attributeId, ArrayList intervals); - - void onError(Exception error); - } - - - public interface GeneratedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AcceptedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface EventListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AttributeListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - - public void readMeasurementTypeAttribute( - LongAttributeCallback callback - ) { - readMeasurementTypeAttribute(chipClusterPtr, callback); - } - public void subscribeMeasurementTypeAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeMeasurementTypeAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readDcVoltageAttribute( - IntegerAttributeCallback callback - ) { - readDcVoltageAttribute(chipClusterPtr, callback); - } - public void subscribeDcVoltageAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeDcVoltageAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readDcVoltageMinAttribute( - IntegerAttributeCallback callback - ) { - readDcVoltageMinAttribute(chipClusterPtr, callback); - } - public void subscribeDcVoltageMinAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeDcVoltageMinAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readDcVoltageMaxAttribute( - IntegerAttributeCallback callback - ) { - readDcVoltageMaxAttribute(chipClusterPtr, callback); - } - public void subscribeDcVoltageMaxAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeDcVoltageMaxAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readDcCurrentAttribute( - IntegerAttributeCallback callback - ) { - readDcCurrentAttribute(chipClusterPtr, callback); - } - public void subscribeDcCurrentAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeDcCurrentAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readDcCurrentMinAttribute( - IntegerAttributeCallback callback - ) { - readDcCurrentMinAttribute(chipClusterPtr, callback); - } - public void subscribeDcCurrentMinAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeDcCurrentMinAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readDcCurrentMaxAttribute( - IntegerAttributeCallback callback - ) { - readDcCurrentMaxAttribute(chipClusterPtr, callback); - } - public void subscribeDcCurrentMaxAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeDcCurrentMaxAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readDcPowerAttribute( - IntegerAttributeCallback callback - ) { - readDcPowerAttribute(chipClusterPtr, callback); - } - public void subscribeDcPowerAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeDcPowerAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readDcPowerMinAttribute( - IntegerAttributeCallback callback - ) { - readDcPowerMinAttribute(chipClusterPtr, callback); - } - public void subscribeDcPowerMinAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeDcPowerMinAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readDcPowerMaxAttribute( - IntegerAttributeCallback callback - ) { - readDcPowerMaxAttribute(chipClusterPtr, callback); - } - public void subscribeDcPowerMaxAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeDcPowerMaxAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readDcVoltageMultiplierAttribute( - IntegerAttributeCallback callback - ) { - readDcVoltageMultiplierAttribute(chipClusterPtr, callback); - } - public void subscribeDcVoltageMultiplierAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeDcVoltageMultiplierAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readDcVoltageDivisorAttribute( - IntegerAttributeCallback callback - ) { - readDcVoltageDivisorAttribute(chipClusterPtr, callback); - } - public void subscribeDcVoltageDivisorAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeDcVoltageDivisorAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readDcCurrentMultiplierAttribute( - IntegerAttributeCallback callback - ) { - readDcCurrentMultiplierAttribute(chipClusterPtr, callback); - } - public void subscribeDcCurrentMultiplierAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeDcCurrentMultiplierAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readDcCurrentDivisorAttribute( - IntegerAttributeCallback callback - ) { - readDcCurrentDivisorAttribute(chipClusterPtr, callback); - } - public void subscribeDcCurrentDivisorAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeDcCurrentDivisorAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readDcPowerMultiplierAttribute( - IntegerAttributeCallback callback - ) { - readDcPowerMultiplierAttribute(chipClusterPtr, callback); - } - public void subscribeDcPowerMultiplierAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeDcPowerMultiplierAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readDcPowerDivisorAttribute( - IntegerAttributeCallback callback - ) { - readDcPowerDivisorAttribute(chipClusterPtr, callback); - } - public void subscribeDcPowerDivisorAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeDcPowerDivisorAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAcFrequencyAttribute( - IntegerAttributeCallback callback - ) { - readAcFrequencyAttribute(chipClusterPtr, callback); - } - public void subscribeAcFrequencyAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeAcFrequencyAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAcFrequencyMinAttribute( - IntegerAttributeCallback callback - ) { - readAcFrequencyMinAttribute(chipClusterPtr, callback); - } - public void subscribeAcFrequencyMinAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeAcFrequencyMinAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAcFrequencyMaxAttribute( - IntegerAttributeCallback callback - ) { - readAcFrequencyMaxAttribute(chipClusterPtr, callback); - } - public void subscribeAcFrequencyMaxAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeAcFrequencyMaxAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readNeutralCurrentAttribute( - IntegerAttributeCallback callback - ) { - readNeutralCurrentAttribute(chipClusterPtr, callback); - } - public void subscribeNeutralCurrentAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeNeutralCurrentAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readTotalActivePowerAttribute( - LongAttributeCallback callback - ) { - readTotalActivePowerAttribute(chipClusterPtr, callback); - } - public void subscribeTotalActivePowerAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeTotalActivePowerAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readTotalReactivePowerAttribute( - LongAttributeCallback callback - ) { - readTotalReactivePowerAttribute(chipClusterPtr, callback); - } - public void subscribeTotalReactivePowerAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeTotalReactivePowerAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readTotalApparentPowerAttribute( - LongAttributeCallback callback - ) { - readTotalApparentPowerAttribute(chipClusterPtr, callback); - } - public void subscribeTotalApparentPowerAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeTotalApparentPowerAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readMeasured1stHarmonicCurrentAttribute( - IntegerAttributeCallback callback - ) { - readMeasured1stHarmonicCurrentAttribute(chipClusterPtr, callback); - } - public void subscribeMeasured1stHarmonicCurrentAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeMeasured1stHarmonicCurrentAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readMeasured3rdHarmonicCurrentAttribute( - IntegerAttributeCallback callback - ) { - readMeasured3rdHarmonicCurrentAttribute(chipClusterPtr, callback); - } - public void subscribeMeasured3rdHarmonicCurrentAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeMeasured3rdHarmonicCurrentAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readMeasured5thHarmonicCurrentAttribute( - IntegerAttributeCallback callback - ) { - readMeasured5thHarmonicCurrentAttribute(chipClusterPtr, callback); - } - public void subscribeMeasured5thHarmonicCurrentAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeMeasured5thHarmonicCurrentAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readMeasured7thHarmonicCurrentAttribute( - IntegerAttributeCallback callback - ) { - readMeasured7thHarmonicCurrentAttribute(chipClusterPtr, callback); - } - public void subscribeMeasured7thHarmonicCurrentAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeMeasured7thHarmonicCurrentAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readMeasured9thHarmonicCurrentAttribute( - IntegerAttributeCallback callback - ) { - readMeasured9thHarmonicCurrentAttribute(chipClusterPtr, callback); - } - public void subscribeMeasured9thHarmonicCurrentAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeMeasured9thHarmonicCurrentAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readMeasured11thHarmonicCurrentAttribute( - IntegerAttributeCallback callback - ) { - readMeasured11thHarmonicCurrentAttribute(chipClusterPtr, callback); - } - public void subscribeMeasured11thHarmonicCurrentAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeMeasured11thHarmonicCurrentAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readMeasuredPhase1stHarmonicCurrentAttribute( - IntegerAttributeCallback callback - ) { - readMeasuredPhase1stHarmonicCurrentAttribute(chipClusterPtr, callback); - } - public void subscribeMeasuredPhase1stHarmonicCurrentAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeMeasuredPhase1stHarmonicCurrentAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readMeasuredPhase3rdHarmonicCurrentAttribute( - IntegerAttributeCallback callback - ) { - readMeasuredPhase3rdHarmonicCurrentAttribute(chipClusterPtr, callback); - } - public void subscribeMeasuredPhase3rdHarmonicCurrentAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeMeasuredPhase3rdHarmonicCurrentAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readMeasuredPhase5thHarmonicCurrentAttribute( - IntegerAttributeCallback callback - ) { - readMeasuredPhase5thHarmonicCurrentAttribute(chipClusterPtr, callback); - } - public void subscribeMeasuredPhase5thHarmonicCurrentAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeMeasuredPhase5thHarmonicCurrentAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readMeasuredPhase7thHarmonicCurrentAttribute( - IntegerAttributeCallback callback - ) { - readMeasuredPhase7thHarmonicCurrentAttribute(chipClusterPtr, callback); - } - public void subscribeMeasuredPhase7thHarmonicCurrentAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeMeasuredPhase7thHarmonicCurrentAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readMeasuredPhase9thHarmonicCurrentAttribute( - IntegerAttributeCallback callback - ) { - readMeasuredPhase9thHarmonicCurrentAttribute(chipClusterPtr, callback); - } - public void subscribeMeasuredPhase9thHarmonicCurrentAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeMeasuredPhase9thHarmonicCurrentAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readMeasuredPhase11thHarmonicCurrentAttribute( - IntegerAttributeCallback callback - ) { - readMeasuredPhase11thHarmonicCurrentAttribute(chipClusterPtr, callback); - } - public void subscribeMeasuredPhase11thHarmonicCurrentAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeMeasuredPhase11thHarmonicCurrentAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAcFrequencyMultiplierAttribute( - IntegerAttributeCallback callback - ) { - readAcFrequencyMultiplierAttribute(chipClusterPtr, callback); - } - public void subscribeAcFrequencyMultiplierAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeAcFrequencyMultiplierAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAcFrequencyDivisorAttribute( - IntegerAttributeCallback callback - ) { - readAcFrequencyDivisorAttribute(chipClusterPtr, callback); - } - public void subscribeAcFrequencyDivisorAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeAcFrequencyDivisorAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readPowerMultiplierAttribute( - LongAttributeCallback callback - ) { - readPowerMultiplierAttribute(chipClusterPtr, callback); - } - public void subscribePowerMultiplierAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribePowerMultiplierAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readPowerDivisorAttribute( - LongAttributeCallback callback - ) { - readPowerDivisorAttribute(chipClusterPtr, callback); - } - public void subscribePowerDivisorAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribePowerDivisorAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readHarmonicCurrentMultiplierAttribute( - IntegerAttributeCallback callback - ) { - readHarmonicCurrentMultiplierAttribute(chipClusterPtr, callback); - } - public void subscribeHarmonicCurrentMultiplierAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeHarmonicCurrentMultiplierAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readPhaseHarmonicCurrentMultiplierAttribute( - IntegerAttributeCallback callback - ) { - readPhaseHarmonicCurrentMultiplierAttribute(chipClusterPtr, callback); - } - public void subscribePhaseHarmonicCurrentMultiplierAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribePhaseHarmonicCurrentMultiplierAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readInstantaneousVoltageAttribute( - IntegerAttributeCallback callback - ) { - readInstantaneousVoltageAttribute(chipClusterPtr, callback); - } - public void subscribeInstantaneousVoltageAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeInstantaneousVoltageAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readInstantaneousLineCurrentAttribute( - IntegerAttributeCallback callback - ) { - readInstantaneousLineCurrentAttribute(chipClusterPtr, callback); - } - public void subscribeInstantaneousLineCurrentAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeInstantaneousLineCurrentAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readInstantaneousActiveCurrentAttribute( - IntegerAttributeCallback callback - ) { - readInstantaneousActiveCurrentAttribute(chipClusterPtr, callback); - } - public void subscribeInstantaneousActiveCurrentAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeInstantaneousActiveCurrentAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readInstantaneousReactiveCurrentAttribute( - IntegerAttributeCallback callback - ) { - readInstantaneousReactiveCurrentAttribute(chipClusterPtr, callback); - } - public void subscribeInstantaneousReactiveCurrentAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeInstantaneousReactiveCurrentAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readInstantaneousPowerAttribute( - IntegerAttributeCallback callback - ) { - readInstantaneousPowerAttribute(chipClusterPtr, callback); - } - public void subscribeInstantaneousPowerAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeInstantaneousPowerAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readRmsVoltageAttribute( - IntegerAttributeCallback callback - ) { - readRmsVoltageAttribute(chipClusterPtr, callback); - } - public void subscribeRmsVoltageAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeRmsVoltageAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readRmsVoltageMinAttribute( - IntegerAttributeCallback callback - ) { - readRmsVoltageMinAttribute(chipClusterPtr, callback); - } - public void subscribeRmsVoltageMinAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeRmsVoltageMinAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readRmsVoltageMaxAttribute( - IntegerAttributeCallback callback - ) { - readRmsVoltageMaxAttribute(chipClusterPtr, callback); - } - public void subscribeRmsVoltageMaxAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeRmsVoltageMaxAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readRmsCurrentAttribute( - IntegerAttributeCallback callback - ) { - readRmsCurrentAttribute(chipClusterPtr, callback); - } - public void subscribeRmsCurrentAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeRmsCurrentAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readRmsCurrentMinAttribute( - IntegerAttributeCallback callback - ) { - readRmsCurrentMinAttribute(chipClusterPtr, callback); - } - public void subscribeRmsCurrentMinAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeRmsCurrentMinAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readRmsCurrentMaxAttribute( - IntegerAttributeCallback callback - ) { - readRmsCurrentMaxAttribute(chipClusterPtr, callback); - } - public void subscribeRmsCurrentMaxAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeRmsCurrentMaxAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readActivePowerAttribute( - IntegerAttributeCallback callback - ) { - readActivePowerAttribute(chipClusterPtr, callback); - } - public void subscribeActivePowerAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeActivePowerAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readActivePowerMinAttribute( - IntegerAttributeCallback callback - ) { - readActivePowerMinAttribute(chipClusterPtr, callback); - } - public void subscribeActivePowerMinAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeActivePowerMinAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readActivePowerMaxAttribute( - IntegerAttributeCallback callback - ) { - readActivePowerMaxAttribute(chipClusterPtr, callback); - } - public void subscribeActivePowerMaxAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeActivePowerMaxAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readReactivePowerAttribute( - IntegerAttributeCallback callback - ) { - readReactivePowerAttribute(chipClusterPtr, callback); - } - public void subscribeReactivePowerAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeReactivePowerAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readApparentPowerAttribute( - IntegerAttributeCallback callback - ) { - readApparentPowerAttribute(chipClusterPtr, callback); - } - public void subscribeApparentPowerAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeApparentPowerAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readPowerFactorAttribute( - IntegerAttributeCallback callback - ) { - readPowerFactorAttribute(chipClusterPtr, callback); - } - public void subscribePowerFactorAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribePowerFactorAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAverageRmsVoltageMeasurementPeriodAttribute( - IntegerAttributeCallback callback - ) { - readAverageRmsVoltageMeasurementPeriodAttribute(chipClusterPtr, callback); - } - public void writeAverageRmsVoltageMeasurementPeriodAttribute(DefaultClusterCallback callback, Integer value) { - writeAverageRmsVoltageMeasurementPeriodAttribute(chipClusterPtr, callback, value, null); - } - - public void writeAverageRmsVoltageMeasurementPeriodAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeAverageRmsVoltageMeasurementPeriodAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeAverageRmsVoltageMeasurementPeriodAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeAverageRmsVoltageMeasurementPeriodAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAverageRmsUnderVoltageCounterAttribute( - IntegerAttributeCallback callback - ) { - readAverageRmsUnderVoltageCounterAttribute(chipClusterPtr, callback); - } - public void writeAverageRmsUnderVoltageCounterAttribute(DefaultClusterCallback callback, Integer value) { - writeAverageRmsUnderVoltageCounterAttribute(chipClusterPtr, callback, value, null); - } - - public void writeAverageRmsUnderVoltageCounterAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeAverageRmsUnderVoltageCounterAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeAverageRmsUnderVoltageCounterAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeAverageRmsUnderVoltageCounterAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readRmsExtremeOverVoltagePeriodAttribute( - IntegerAttributeCallback callback - ) { - readRmsExtremeOverVoltagePeriodAttribute(chipClusterPtr, callback); - } - public void writeRmsExtremeOverVoltagePeriodAttribute(DefaultClusterCallback callback, Integer value) { - writeRmsExtremeOverVoltagePeriodAttribute(chipClusterPtr, callback, value, null); - } - - public void writeRmsExtremeOverVoltagePeriodAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeRmsExtremeOverVoltagePeriodAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeRmsExtremeOverVoltagePeriodAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeRmsExtremeOverVoltagePeriodAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readRmsExtremeUnderVoltagePeriodAttribute( - IntegerAttributeCallback callback - ) { - readRmsExtremeUnderVoltagePeriodAttribute(chipClusterPtr, callback); - } - public void writeRmsExtremeUnderVoltagePeriodAttribute(DefaultClusterCallback callback, Integer value) { - writeRmsExtremeUnderVoltagePeriodAttribute(chipClusterPtr, callback, value, null); - } - - public void writeRmsExtremeUnderVoltagePeriodAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeRmsExtremeUnderVoltagePeriodAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeRmsExtremeUnderVoltagePeriodAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeRmsExtremeUnderVoltagePeriodAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readRmsVoltageSagPeriodAttribute( - IntegerAttributeCallback callback - ) { - readRmsVoltageSagPeriodAttribute(chipClusterPtr, callback); - } - public void writeRmsVoltageSagPeriodAttribute(DefaultClusterCallback callback, Integer value) { - writeRmsVoltageSagPeriodAttribute(chipClusterPtr, callback, value, null); - } - - public void writeRmsVoltageSagPeriodAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeRmsVoltageSagPeriodAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeRmsVoltageSagPeriodAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeRmsVoltageSagPeriodAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readRmsVoltageSwellPeriodAttribute( - IntegerAttributeCallback callback - ) { - readRmsVoltageSwellPeriodAttribute(chipClusterPtr, callback); - } - public void writeRmsVoltageSwellPeriodAttribute(DefaultClusterCallback callback, Integer value) { - writeRmsVoltageSwellPeriodAttribute(chipClusterPtr, callback, value, null); - } - - public void writeRmsVoltageSwellPeriodAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeRmsVoltageSwellPeriodAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeRmsVoltageSwellPeriodAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeRmsVoltageSwellPeriodAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAcVoltageMultiplierAttribute( - IntegerAttributeCallback callback - ) { - readAcVoltageMultiplierAttribute(chipClusterPtr, callback); - } - public void subscribeAcVoltageMultiplierAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeAcVoltageMultiplierAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAcVoltageDivisorAttribute( - IntegerAttributeCallback callback - ) { - readAcVoltageDivisorAttribute(chipClusterPtr, callback); - } - public void subscribeAcVoltageDivisorAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeAcVoltageDivisorAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAcCurrentMultiplierAttribute( - IntegerAttributeCallback callback - ) { - readAcCurrentMultiplierAttribute(chipClusterPtr, callback); - } - public void subscribeAcCurrentMultiplierAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeAcCurrentMultiplierAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAcCurrentDivisorAttribute( - IntegerAttributeCallback callback - ) { - readAcCurrentDivisorAttribute(chipClusterPtr, callback); - } - public void subscribeAcCurrentDivisorAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeAcCurrentDivisorAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAcPowerMultiplierAttribute( - IntegerAttributeCallback callback - ) { - readAcPowerMultiplierAttribute(chipClusterPtr, callback); - } - public void subscribeAcPowerMultiplierAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeAcPowerMultiplierAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAcPowerDivisorAttribute( - IntegerAttributeCallback callback - ) { - readAcPowerDivisorAttribute(chipClusterPtr, callback); - } - public void subscribeAcPowerDivisorAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeAcPowerDivisorAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readOverloadAlarmsMaskAttribute( - IntegerAttributeCallback callback - ) { - readOverloadAlarmsMaskAttribute(chipClusterPtr, callback); - } - public void writeOverloadAlarmsMaskAttribute(DefaultClusterCallback callback, Integer value) { - writeOverloadAlarmsMaskAttribute(chipClusterPtr, callback, value, null); - } - - public void writeOverloadAlarmsMaskAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeOverloadAlarmsMaskAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeOverloadAlarmsMaskAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeOverloadAlarmsMaskAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readVoltageOverloadAttribute( - IntegerAttributeCallback callback - ) { - readVoltageOverloadAttribute(chipClusterPtr, callback); - } - public void subscribeVoltageOverloadAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeVoltageOverloadAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readCurrentOverloadAttribute( - IntegerAttributeCallback callback - ) { - readCurrentOverloadAttribute(chipClusterPtr, callback); - } - public void subscribeCurrentOverloadAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeCurrentOverloadAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAcOverloadAlarmsMaskAttribute( - IntegerAttributeCallback callback - ) { - readAcOverloadAlarmsMaskAttribute(chipClusterPtr, callback); - } - public void writeAcOverloadAlarmsMaskAttribute(DefaultClusterCallback callback, Integer value) { - writeAcOverloadAlarmsMaskAttribute(chipClusterPtr, callback, value, null); - } - - public void writeAcOverloadAlarmsMaskAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeAcOverloadAlarmsMaskAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeAcOverloadAlarmsMaskAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeAcOverloadAlarmsMaskAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAcVoltageOverloadAttribute( - IntegerAttributeCallback callback - ) { - readAcVoltageOverloadAttribute(chipClusterPtr, callback); - } - public void subscribeAcVoltageOverloadAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeAcVoltageOverloadAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAcCurrentOverloadAttribute( - IntegerAttributeCallback callback - ) { - readAcCurrentOverloadAttribute(chipClusterPtr, callback); - } - public void subscribeAcCurrentOverloadAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeAcCurrentOverloadAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAcActivePowerOverloadAttribute( - IntegerAttributeCallback callback - ) { - readAcActivePowerOverloadAttribute(chipClusterPtr, callback); - } - public void subscribeAcActivePowerOverloadAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeAcActivePowerOverloadAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAcReactivePowerOverloadAttribute( - IntegerAttributeCallback callback - ) { - readAcReactivePowerOverloadAttribute(chipClusterPtr, callback); - } - public void subscribeAcReactivePowerOverloadAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeAcReactivePowerOverloadAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAverageRmsOverVoltageAttribute( - IntegerAttributeCallback callback - ) { - readAverageRmsOverVoltageAttribute(chipClusterPtr, callback); - } - public void subscribeAverageRmsOverVoltageAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeAverageRmsOverVoltageAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAverageRmsUnderVoltageAttribute( - IntegerAttributeCallback callback - ) { - readAverageRmsUnderVoltageAttribute(chipClusterPtr, callback); - } - public void subscribeAverageRmsUnderVoltageAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeAverageRmsUnderVoltageAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readRmsExtremeOverVoltageAttribute( - IntegerAttributeCallback callback - ) { - readRmsExtremeOverVoltageAttribute(chipClusterPtr, callback); - } - public void subscribeRmsExtremeOverVoltageAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeRmsExtremeOverVoltageAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readRmsExtremeUnderVoltageAttribute( - IntegerAttributeCallback callback - ) { - readRmsExtremeUnderVoltageAttribute(chipClusterPtr, callback); - } - public void subscribeRmsExtremeUnderVoltageAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeRmsExtremeUnderVoltageAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readRmsVoltageSagAttribute( - IntegerAttributeCallback callback - ) { - readRmsVoltageSagAttribute(chipClusterPtr, callback); - } - public void subscribeRmsVoltageSagAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeRmsVoltageSagAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readRmsVoltageSwellAttribute( - IntegerAttributeCallback callback - ) { - readRmsVoltageSwellAttribute(chipClusterPtr, callback); - } - public void subscribeRmsVoltageSwellAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeRmsVoltageSwellAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readLineCurrentPhaseBAttribute( - IntegerAttributeCallback callback - ) { - readLineCurrentPhaseBAttribute(chipClusterPtr, callback); - } - public void subscribeLineCurrentPhaseBAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeLineCurrentPhaseBAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readActiveCurrentPhaseBAttribute( - IntegerAttributeCallback callback - ) { - readActiveCurrentPhaseBAttribute(chipClusterPtr, callback); - } - public void subscribeActiveCurrentPhaseBAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeActiveCurrentPhaseBAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readReactiveCurrentPhaseBAttribute( - IntegerAttributeCallback callback - ) { - readReactiveCurrentPhaseBAttribute(chipClusterPtr, callback); - } - public void subscribeReactiveCurrentPhaseBAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeReactiveCurrentPhaseBAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readRmsVoltagePhaseBAttribute( - IntegerAttributeCallback callback - ) { - readRmsVoltagePhaseBAttribute(chipClusterPtr, callback); - } - public void subscribeRmsVoltagePhaseBAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeRmsVoltagePhaseBAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readRmsVoltageMinPhaseBAttribute( - IntegerAttributeCallback callback - ) { - readRmsVoltageMinPhaseBAttribute(chipClusterPtr, callback); - } - public void subscribeRmsVoltageMinPhaseBAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeRmsVoltageMinPhaseBAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readRmsVoltageMaxPhaseBAttribute( - IntegerAttributeCallback callback - ) { - readRmsVoltageMaxPhaseBAttribute(chipClusterPtr, callback); - } - public void subscribeRmsVoltageMaxPhaseBAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeRmsVoltageMaxPhaseBAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readRmsCurrentPhaseBAttribute( - IntegerAttributeCallback callback - ) { - readRmsCurrentPhaseBAttribute(chipClusterPtr, callback); - } - public void subscribeRmsCurrentPhaseBAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeRmsCurrentPhaseBAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readRmsCurrentMinPhaseBAttribute( - IntegerAttributeCallback callback - ) { - readRmsCurrentMinPhaseBAttribute(chipClusterPtr, callback); - } - public void subscribeRmsCurrentMinPhaseBAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeRmsCurrentMinPhaseBAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readRmsCurrentMaxPhaseBAttribute( - IntegerAttributeCallback callback - ) { - readRmsCurrentMaxPhaseBAttribute(chipClusterPtr, callback); - } - public void subscribeRmsCurrentMaxPhaseBAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeRmsCurrentMaxPhaseBAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readActivePowerPhaseBAttribute( - IntegerAttributeCallback callback - ) { - readActivePowerPhaseBAttribute(chipClusterPtr, callback); - } - public void subscribeActivePowerPhaseBAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeActivePowerPhaseBAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readActivePowerMinPhaseBAttribute( - IntegerAttributeCallback callback - ) { - readActivePowerMinPhaseBAttribute(chipClusterPtr, callback); - } - public void subscribeActivePowerMinPhaseBAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeActivePowerMinPhaseBAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readActivePowerMaxPhaseBAttribute( - IntegerAttributeCallback callback - ) { - readActivePowerMaxPhaseBAttribute(chipClusterPtr, callback); - } - public void subscribeActivePowerMaxPhaseBAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeActivePowerMaxPhaseBAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readReactivePowerPhaseBAttribute( - IntegerAttributeCallback callback - ) { - readReactivePowerPhaseBAttribute(chipClusterPtr, callback); - } - public void subscribeReactivePowerPhaseBAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeReactivePowerPhaseBAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readApparentPowerPhaseBAttribute( - IntegerAttributeCallback callback - ) { - readApparentPowerPhaseBAttribute(chipClusterPtr, callback); - } - public void subscribeApparentPowerPhaseBAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeApparentPowerPhaseBAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readPowerFactorPhaseBAttribute( - IntegerAttributeCallback callback - ) { - readPowerFactorPhaseBAttribute(chipClusterPtr, callback); - } - public void subscribePowerFactorPhaseBAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribePowerFactorPhaseBAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAverageRmsVoltageMeasurementPeriodPhaseBAttribute( - IntegerAttributeCallback callback - ) { - readAverageRmsVoltageMeasurementPeriodPhaseBAttribute(chipClusterPtr, callback); - } - public void subscribeAverageRmsVoltageMeasurementPeriodPhaseBAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeAverageRmsVoltageMeasurementPeriodPhaseBAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAverageRmsOverVoltageCounterPhaseBAttribute( - IntegerAttributeCallback callback - ) { - readAverageRmsOverVoltageCounterPhaseBAttribute(chipClusterPtr, callback); - } - public void subscribeAverageRmsOverVoltageCounterPhaseBAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeAverageRmsOverVoltageCounterPhaseBAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAverageRmsUnderVoltageCounterPhaseBAttribute( - IntegerAttributeCallback callback - ) { - readAverageRmsUnderVoltageCounterPhaseBAttribute(chipClusterPtr, callback); - } - public void subscribeAverageRmsUnderVoltageCounterPhaseBAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeAverageRmsUnderVoltageCounterPhaseBAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readRmsExtremeOverVoltagePeriodPhaseBAttribute( - IntegerAttributeCallback callback - ) { - readRmsExtremeOverVoltagePeriodPhaseBAttribute(chipClusterPtr, callback); - } - public void subscribeRmsExtremeOverVoltagePeriodPhaseBAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeRmsExtremeOverVoltagePeriodPhaseBAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readRmsExtremeUnderVoltagePeriodPhaseBAttribute( - IntegerAttributeCallback callback - ) { - readRmsExtremeUnderVoltagePeriodPhaseBAttribute(chipClusterPtr, callback); - } - public void subscribeRmsExtremeUnderVoltagePeriodPhaseBAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeRmsExtremeUnderVoltagePeriodPhaseBAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readRmsVoltageSagPeriodPhaseBAttribute( - IntegerAttributeCallback callback - ) { - readRmsVoltageSagPeriodPhaseBAttribute(chipClusterPtr, callback); - } - public void subscribeRmsVoltageSagPeriodPhaseBAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeRmsVoltageSagPeriodPhaseBAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readRmsVoltageSwellPeriodPhaseBAttribute( - IntegerAttributeCallback callback - ) { - readRmsVoltageSwellPeriodPhaseBAttribute(chipClusterPtr, callback); - } - public void subscribeRmsVoltageSwellPeriodPhaseBAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeRmsVoltageSwellPeriodPhaseBAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readLineCurrentPhaseCAttribute( - IntegerAttributeCallback callback - ) { - readLineCurrentPhaseCAttribute(chipClusterPtr, callback); - } - public void subscribeLineCurrentPhaseCAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeLineCurrentPhaseCAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readActiveCurrentPhaseCAttribute( - IntegerAttributeCallback callback - ) { - readActiveCurrentPhaseCAttribute(chipClusterPtr, callback); - } - public void subscribeActiveCurrentPhaseCAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeActiveCurrentPhaseCAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readReactiveCurrentPhaseCAttribute( - IntegerAttributeCallback callback - ) { - readReactiveCurrentPhaseCAttribute(chipClusterPtr, callback); - } - public void subscribeReactiveCurrentPhaseCAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeReactiveCurrentPhaseCAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readRmsVoltagePhaseCAttribute( - IntegerAttributeCallback callback - ) { - readRmsVoltagePhaseCAttribute(chipClusterPtr, callback); - } - public void subscribeRmsVoltagePhaseCAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeRmsVoltagePhaseCAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readRmsVoltageMinPhaseCAttribute( - IntegerAttributeCallback callback - ) { - readRmsVoltageMinPhaseCAttribute(chipClusterPtr, callback); - } - public void subscribeRmsVoltageMinPhaseCAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeRmsVoltageMinPhaseCAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readRmsVoltageMaxPhaseCAttribute( - IntegerAttributeCallback callback - ) { - readRmsVoltageMaxPhaseCAttribute(chipClusterPtr, callback); - } - public void subscribeRmsVoltageMaxPhaseCAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeRmsVoltageMaxPhaseCAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readRmsCurrentPhaseCAttribute( - IntegerAttributeCallback callback - ) { - readRmsCurrentPhaseCAttribute(chipClusterPtr, callback); - } - public void subscribeRmsCurrentPhaseCAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeRmsCurrentPhaseCAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readRmsCurrentMinPhaseCAttribute( - IntegerAttributeCallback callback - ) { - readRmsCurrentMinPhaseCAttribute(chipClusterPtr, callback); - } - public void subscribeRmsCurrentMinPhaseCAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeRmsCurrentMinPhaseCAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readRmsCurrentMaxPhaseCAttribute( - IntegerAttributeCallback callback - ) { - readRmsCurrentMaxPhaseCAttribute(chipClusterPtr, callback); - } - public void subscribeRmsCurrentMaxPhaseCAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeRmsCurrentMaxPhaseCAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readActivePowerPhaseCAttribute( - IntegerAttributeCallback callback - ) { - readActivePowerPhaseCAttribute(chipClusterPtr, callback); - } - public void subscribeActivePowerPhaseCAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeActivePowerPhaseCAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readActivePowerMinPhaseCAttribute( - IntegerAttributeCallback callback - ) { - readActivePowerMinPhaseCAttribute(chipClusterPtr, callback); - } - public void subscribeActivePowerMinPhaseCAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeActivePowerMinPhaseCAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readActivePowerMaxPhaseCAttribute( - IntegerAttributeCallback callback - ) { - readActivePowerMaxPhaseCAttribute(chipClusterPtr, callback); - } - public void subscribeActivePowerMaxPhaseCAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeActivePowerMaxPhaseCAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readReactivePowerPhaseCAttribute( - IntegerAttributeCallback callback - ) { - readReactivePowerPhaseCAttribute(chipClusterPtr, callback); - } - public void subscribeReactivePowerPhaseCAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeReactivePowerPhaseCAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readApparentPowerPhaseCAttribute( - IntegerAttributeCallback callback - ) { - readApparentPowerPhaseCAttribute(chipClusterPtr, callback); - } - public void subscribeApparentPowerPhaseCAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeApparentPowerPhaseCAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readPowerFactorPhaseCAttribute( - IntegerAttributeCallback callback - ) { - readPowerFactorPhaseCAttribute(chipClusterPtr, callback); - } - public void subscribePowerFactorPhaseCAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribePowerFactorPhaseCAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAverageRmsVoltageMeasurementPeriodPhaseCAttribute( - IntegerAttributeCallback callback - ) { - readAverageRmsVoltageMeasurementPeriodPhaseCAttribute(chipClusterPtr, callback); - } - public void subscribeAverageRmsVoltageMeasurementPeriodPhaseCAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeAverageRmsVoltageMeasurementPeriodPhaseCAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAverageRmsOverVoltageCounterPhaseCAttribute( - IntegerAttributeCallback callback - ) { - readAverageRmsOverVoltageCounterPhaseCAttribute(chipClusterPtr, callback); - } - public void subscribeAverageRmsOverVoltageCounterPhaseCAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeAverageRmsOverVoltageCounterPhaseCAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAverageRmsUnderVoltageCounterPhaseCAttribute( - IntegerAttributeCallback callback - ) { - readAverageRmsUnderVoltageCounterPhaseCAttribute(chipClusterPtr, callback); - } - public void subscribeAverageRmsUnderVoltageCounterPhaseCAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeAverageRmsUnderVoltageCounterPhaseCAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readRmsExtremeOverVoltagePeriodPhaseCAttribute( - IntegerAttributeCallback callback - ) { - readRmsExtremeOverVoltagePeriodPhaseCAttribute(chipClusterPtr, callback); - } - public void subscribeRmsExtremeOverVoltagePeriodPhaseCAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeRmsExtremeOverVoltagePeriodPhaseCAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readRmsExtremeUnderVoltagePeriodPhaseCAttribute( - IntegerAttributeCallback callback - ) { - readRmsExtremeUnderVoltagePeriodPhaseCAttribute(chipClusterPtr, callback); - } - public void subscribeRmsExtremeUnderVoltagePeriodPhaseCAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeRmsExtremeUnderVoltagePeriodPhaseCAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readRmsVoltageSagPeriodPhaseCAttribute( - IntegerAttributeCallback callback - ) { - readRmsVoltageSagPeriodPhaseCAttribute(chipClusterPtr, callback); - } - public void subscribeRmsVoltageSagPeriodPhaseCAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeRmsVoltageSagPeriodPhaseCAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readRmsVoltageSwellPeriodPhaseCAttribute( - IntegerAttributeCallback callback - ) { - readRmsVoltageSwellPeriodPhaseCAttribute(chipClusterPtr, callback); - } - public void subscribeRmsVoltageSwellPeriodPhaseCAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeRmsVoltageSwellPeriodPhaseCAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - ) { - readGeneratedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - ) { - readAcceptedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readEventListAttribute( - EventListAttributeCallback callback - ) { - readEventListAttribute(chipClusterPtr, callback); - } - public void subscribeEventListAttribute( - EventListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAttributeListAttribute( - AttributeListAttributeCallback callback - ) { - readAttributeListAttribute(chipClusterPtr, callback); - } - public void subscribeAttributeListAttribute( - AttributeListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readFeatureMapAttribute( - LongAttributeCallback callback - ) { - readFeatureMapAttribute(chipClusterPtr, callback); - } - public void subscribeFeatureMapAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readClusterRevisionAttribute( - IntegerAttributeCallback callback - ) { - readClusterRevisionAttribute(chipClusterPtr, callback); - } - public void subscribeClusterRevisionAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - private native void readMeasurementTypeAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeMeasurementTypeAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readDcVoltageAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeDcVoltageAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readDcVoltageMinAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeDcVoltageMinAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readDcVoltageMaxAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeDcVoltageMaxAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readDcCurrentAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeDcCurrentAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readDcCurrentMinAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeDcCurrentMinAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readDcCurrentMaxAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeDcCurrentMaxAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readDcPowerAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeDcPowerAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readDcPowerMinAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeDcPowerMinAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readDcPowerMaxAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeDcPowerMaxAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readDcVoltageMultiplierAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeDcVoltageMultiplierAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readDcVoltageDivisorAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeDcVoltageDivisorAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readDcCurrentMultiplierAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeDcCurrentMultiplierAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readDcCurrentDivisorAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeDcCurrentDivisorAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readDcPowerMultiplierAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeDcPowerMultiplierAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readDcPowerDivisorAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeDcPowerDivisorAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readAcFrequencyAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeAcFrequencyAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readAcFrequencyMinAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeAcFrequencyMinAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readAcFrequencyMaxAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeAcFrequencyMaxAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readNeutralCurrentAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeNeutralCurrentAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readTotalActivePowerAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeTotalActivePowerAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readTotalReactivePowerAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeTotalReactivePowerAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readTotalApparentPowerAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeTotalApparentPowerAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readMeasured1stHarmonicCurrentAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeMeasured1stHarmonicCurrentAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readMeasured3rdHarmonicCurrentAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeMeasured3rdHarmonicCurrentAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readMeasured5thHarmonicCurrentAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeMeasured5thHarmonicCurrentAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readMeasured7thHarmonicCurrentAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeMeasured7thHarmonicCurrentAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readMeasured9thHarmonicCurrentAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeMeasured9thHarmonicCurrentAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readMeasured11thHarmonicCurrentAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeMeasured11thHarmonicCurrentAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readMeasuredPhase1stHarmonicCurrentAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeMeasuredPhase1stHarmonicCurrentAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readMeasuredPhase3rdHarmonicCurrentAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeMeasuredPhase3rdHarmonicCurrentAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readMeasuredPhase5thHarmonicCurrentAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeMeasuredPhase5thHarmonicCurrentAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readMeasuredPhase7thHarmonicCurrentAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeMeasuredPhase7thHarmonicCurrentAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readMeasuredPhase9thHarmonicCurrentAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeMeasuredPhase9thHarmonicCurrentAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readMeasuredPhase11thHarmonicCurrentAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeMeasuredPhase11thHarmonicCurrentAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readAcFrequencyMultiplierAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeAcFrequencyMultiplierAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readAcFrequencyDivisorAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeAcFrequencyDivisorAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readPowerMultiplierAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribePowerMultiplierAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readPowerDivisorAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribePowerDivisorAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readHarmonicCurrentMultiplierAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeHarmonicCurrentMultiplierAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readPhaseHarmonicCurrentMultiplierAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribePhaseHarmonicCurrentMultiplierAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readInstantaneousVoltageAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeInstantaneousVoltageAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readInstantaneousLineCurrentAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeInstantaneousLineCurrentAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readInstantaneousActiveCurrentAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeInstantaneousActiveCurrentAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readInstantaneousReactiveCurrentAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeInstantaneousReactiveCurrentAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readInstantaneousPowerAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeInstantaneousPowerAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readRmsVoltageAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeRmsVoltageAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readRmsVoltageMinAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeRmsVoltageMinAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readRmsVoltageMaxAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeRmsVoltageMaxAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readRmsCurrentAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeRmsCurrentAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readRmsCurrentMinAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeRmsCurrentMinAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readRmsCurrentMaxAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeRmsCurrentMaxAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readActivePowerAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeActivePowerAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readActivePowerMinAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeActivePowerMinAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readActivePowerMaxAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeActivePowerMaxAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readReactivePowerAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeReactivePowerAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readApparentPowerAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeApparentPowerAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readPowerFactorAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribePowerFactorAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readAverageRmsVoltageMeasurementPeriodAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - - private native void writeAverageRmsVoltageMeasurementPeriodAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeAverageRmsVoltageMeasurementPeriodAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readAverageRmsUnderVoltageCounterAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - - private native void writeAverageRmsUnderVoltageCounterAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeAverageRmsUnderVoltageCounterAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readRmsExtremeOverVoltagePeriodAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - - private native void writeRmsExtremeOverVoltagePeriodAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeRmsExtremeOverVoltagePeriodAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readRmsExtremeUnderVoltagePeriodAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - - private native void writeRmsExtremeUnderVoltagePeriodAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeRmsExtremeUnderVoltagePeriodAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readRmsVoltageSagPeriodAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - - private native void writeRmsVoltageSagPeriodAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeRmsVoltageSagPeriodAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readRmsVoltageSwellPeriodAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - - private native void writeRmsVoltageSwellPeriodAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeRmsVoltageSwellPeriodAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readAcVoltageMultiplierAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeAcVoltageMultiplierAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readAcVoltageDivisorAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeAcVoltageDivisorAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readAcCurrentMultiplierAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeAcCurrentMultiplierAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readAcCurrentDivisorAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeAcCurrentDivisorAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readAcPowerMultiplierAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeAcPowerMultiplierAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readAcPowerDivisorAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeAcPowerDivisorAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readOverloadAlarmsMaskAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - - private native void writeOverloadAlarmsMaskAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeOverloadAlarmsMaskAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readVoltageOverloadAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeVoltageOverloadAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readCurrentOverloadAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeCurrentOverloadAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readAcOverloadAlarmsMaskAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - - private native void writeAcOverloadAlarmsMaskAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeAcOverloadAlarmsMaskAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readAcVoltageOverloadAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeAcVoltageOverloadAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readAcCurrentOverloadAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeAcCurrentOverloadAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readAcActivePowerOverloadAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeAcActivePowerOverloadAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readAcReactivePowerOverloadAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeAcReactivePowerOverloadAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readAverageRmsOverVoltageAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeAverageRmsOverVoltageAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readAverageRmsUnderVoltageAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeAverageRmsUnderVoltageAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readRmsExtremeOverVoltageAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeRmsExtremeOverVoltageAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readRmsExtremeUnderVoltageAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeRmsExtremeUnderVoltageAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readRmsVoltageSagAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeRmsVoltageSagAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readRmsVoltageSwellAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeRmsVoltageSwellAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readLineCurrentPhaseBAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeLineCurrentPhaseBAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readActiveCurrentPhaseBAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeActiveCurrentPhaseBAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readReactiveCurrentPhaseBAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeReactiveCurrentPhaseBAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readRmsVoltagePhaseBAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeRmsVoltagePhaseBAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readRmsVoltageMinPhaseBAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeRmsVoltageMinPhaseBAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readRmsVoltageMaxPhaseBAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeRmsVoltageMaxPhaseBAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readRmsCurrentPhaseBAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeRmsCurrentPhaseBAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readRmsCurrentMinPhaseBAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeRmsCurrentMinPhaseBAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readRmsCurrentMaxPhaseBAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeRmsCurrentMaxPhaseBAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readActivePowerPhaseBAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeActivePowerPhaseBAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readActivePowerMinPhaseBAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeActivePowerMinPhaseBAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readActivePowerMaxPhaseBAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeActivePowerMaxPhaseBAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readReactivePowerPhaseBAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeReactivePowerPhaseBAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readApparentPowerPhaseBAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeApparentPowerPhaseBAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readPowerFactorPhaseBAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribePowerFactorPhaseBAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readAverageRmsVoltageMeasurementPeriodPhaseBAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeAverageRmsVoltageMeasurementPeriodPhaseBAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readAverageRmsOverVoltageCounterPhaseBAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeAverageRmsOverVoltageCounterPhaseBAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readAverageRmsUnderVoltageCounterPhaseBAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeAverageRmsUnderVoltageCounterPhaseBAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readRmsExtremeOverVoltagePeriodPhaseBAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeRmsExtremeOverVoltagePeriodPhaseBAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readRmsExtremeUnderVoltagePeriodPhaseBAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeRmsExtremeUnderVoltagePeriodPhaseBAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readRmsVoltageSagPeriodPhaseBAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeRmsVoltageSagPeriodPhaseBAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readRmsVoltageSwellPeriodPhaseBAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeRmsVoltageSwellPeriodPhaseBAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readLineCurrentPhaseCAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeLineCurrentPhaseCAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readActiveCurrentPhaseCAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeActiveCurrentPhaseCAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readReactiveCurrentPhaseCAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeReactiveCurrentPhaseCAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readRmsVoltagePhaseCAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeRmsVoltagePhaseCAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readRmsVoltageMinPhaseCAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeRmsVoltageMinPhaseCAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readRmsVoltageMaxPhaseCAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeRmsVoltageMaxPhaseCAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readRmsCurrentPhaseCAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeRmsCurrentPhaseCAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readRmsCurrentMinPhaseCAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeRmsCurrentMinPhaseCAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readRmsCurrentMaxPhaseCAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeRmsCurrentMaxPhaseCAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readActivePowerPhaseCAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeActivePowerPhaseCAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readActivePowerMinPhaseCAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeActivePowerMinPhaseCAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readActivePowerMaxPhaseCAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeActivePowerMaxPhaseCAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readReactivePowerPhaseCAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeReactivePowerPhaseCAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readApparentPowerPhaseCAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeApparentPowerPhaseCAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readPowerFactorPhaseCAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribePowerFactorPhaseCAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readAverageRmsVoltageMeasurementPeriodPhaseCAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeAverageRmsVoltageMeasurementPeriodPhaseCAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readAverageRmsOverVoltageCounterPhaseCAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeAverageRmsOverVoltageCounterPhaseCAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readAverageRmsUnderVoltageCounterPhaseCAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeAverageRmsUnderVoltageCounterPhaseCAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readRmsExtremeOverVoltagePeriodPhaseCAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeRmsExtremeOverVoltagePeriodPhaseCAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readRmsExtremeUnderVoltagePeriodPhaseCAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeRmsExtremeUnderVoltagePeriodPhaseCAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readRmsVoltageSagPeriodPhaseCAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeRmsVoltageSagPeriodPhaseCAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readRmsVoltageSwellPeriodPhaseCAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeRmsVoltageSwellPeriodPhaseCAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - ); - private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - ); - private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - ); - private native void subscribeEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - ); - private native void subscribeAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - } - - public static class UnitTestingCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 0xFFF1FC05L; - - public UnitTestingCluster(long devicePtr, int endpointId) { - super(devicePtr, endpointId); - } - - @Override - public native long initWithDevice(long devicePtr, int endpointId); - - public void test(DefaultClusterCallback callback - ) { - test(chipClusterPtr, callback, null); - } - - public void test(DefaultClusterCallback callback - - , int timedInvokeTimeoutMs) { - test(chipClusterPtr, callback, timedInvokeTimeoutMs); - } - - public void testNotHandled(DefaultClusterCallback callback - ) { - testNotHandled(chipClusterPtr, callback, null); - } - - public void testNotHandled(DefaultClusterCallback callback - - , int timedInvokeTimeoutMs) { - testNotHandled(chipClusterPtr, callback, timedInvokeTimeoutMs); - } - - public void testSpecific(TestSpecificResponseCallback callback - ) { - testSpecific(chipClusterPtr, callback, null); - } - - public void testSpecific(TestSpecificResponseCallback callback - - , int timedInvokeTimeoutMs) { - testSpecific(chipClusterPtr, callback, timedInvokeTimeoutMs); - } - - public void testUnknownCommand(DefaultClusterCallback callback - ) { - testUnknownCommand(chipClusterPtr, callback, null); - } - - public void testUnknownCommand(DefaultClusterCallback callback - - , int timedInvokeTimeoutMs) { - testUnknownCommand(chipClusterPtr, callback, timedInvokeTimeoutMs); - } - - public void testAddArguments(TestAddArgumentsResponseCallback callback - , Integer arg1, Integer arg2) { - testAddArguments(chipClusterPtr, callback, arg1, arg2, null); - } - - public void testAddArguments(TestAddArgumentsResponseCallback callback - , Integer arg1, Integer arg2 - , int timedInvokeTimeoutMs) { - testAddArguments(chipClusterPtr, callback, arg1, arg2, timedInvokeTimeoutMs); - } - - public void testSimpleArgumentRequest(TestSimpleArgumentResponseCallback callback - , Boolean arg1) { - testSimpleArgumentRequest(chipClusterPtr, callback, arg1, null); - } - - public void testSimpleArgumentRequest(TestSimpleArgumentResponseCallback callback - , Boolean arg1 - , int timedInvokeTimeoutMs) { - testSimpleArgumentRequest(chipClusterPtr, callback, arg1, timedInvokeTimeoutMs); - } - - public void testStructArrayArgumentRequest(TestStructArrayArgumentResponseCallback callback - , ArrayList arg1, ArrayList arg2, ArrayList arg3, ArrayList arg4, Integer arg5, Boolean arg6) { - testStructArrayArgumentRequest(chipClusterPtr, callback, arg1, arg2, arg3, arg4, arg5, arg6, null); - } - - public void testStructArrayArgumentRequest(TestStructArrayArgumentResponseCallback callback - , ArrayList arg1, ArrayList arg2, ArrayList arg3, ArrayList arg4, Integer arg5, Boolean arg6 - , int timedInvokeTimeoutMs) { - testStructArrayArgumentRequest(chipClusterPtr, callback, arg1, arg2, arg3, arg4, arg5, arg6, timedInvokeTimeoutMs); - } - - public void testStructArgumentRequest(BooleanResponseCallback callback - , ChipStructs.UnitTestingClusterSimpleStruct arg1) { - testStructArgumentRequest(chipClusterPtr, callback, arg1, null); - } - - public void testStructArgumentRequest(BooleanResponseCallback callback - , ChipStructs.UnitTestingClusterSimpleStruct arg1 - , int timedInvokeTimeoutMs) { - testStructArgumentRequest(chipClusterPtr, callback, arg1, timedInvokeTimeoutMs); - } - - public void testNestedStructArgumentRequest(BooleanResponseCallback callback - , ChipStructs.UnitTestingClusterNestedStruct arg1) { - testNestedStructArgumentRequest(chipClusterPtr, callback, arg1, null); - } - - public void testNestedStructArgumentRequest(BooleanResponseCallback callback - , ChipStructs.UnitTestingClusterNestedStruct arg1 - , int timedInvokeTimeoutMs) { - testNestedStructArgumentRequest(chipClusterPtr, callback, arg1, timedInvokeTimeoutMs); - } - - public void testListStructArgumentRequest(BooleanResponseCallback callback - , ArrayList arg1) { - testListStructArgumentRequest(chipClusterPtr, callback, arg1, null); - } - - public void testListStructArgumentRequest(BooleanResponseCallback callback - , ArrayList arg1 - , int timedInvokeTimeoutMs) { - testListStructArgumentRequest(chipClusterPtr, callback, arg1, timedInvokeTimeoutMs); - } - - public void testListInt8UArgumentRequest(BooleanResponseCallback callback - , ArrayList arg1) { - testListInt8UArgumentRequest(chipClusterPtr, callback, arg1, null); - } - - public void testListInt8UArgumentRequest(BooleanResponseCallback callback - , ArrayList arg1 - , int timedInvokeTimeoutMs) { - testListInt8UArgumentRequest(chipClusterPtr, callback, arg1, timedInvokeTimeoutMs); - } - - public void testNestedStructListArgumentRequest(BooleanResponseCallback callback - , ChipStructs.UnitTestingClusterNestedStructList arg1) { - testNestedStructListArgumentRequest(chipClusterPtr, callback, arg1, null); - } - - public void testNestedStructListArgumentRequest(BooleanResponseCallback callback - , ChipStructs.UnitTestingClusterNestedStructList arg1 - , int timedInvokeTimeoutMs) { - testNestedStructListArgumentRequest(chipClusterPtr, callback, arg1, timedInvokeTimeoutMs); - } - - public void testListNestedStructListArgumentRequest(BooleanResponseCallback callback - , ArrayList arg1) { - testListNestedStructListArgumentRequest(chipClusterPtr, callback, arg1, null); - } - - public void testListNestedStructListArgumentRequest(BooleanResponseCallback callback - , ArrayList arg1 - , int timedInvokeTimeoutMs) { - testListNestedStructListArgumentRequest(chipClusterPtr, callback, arg1, timedInvokeTimeoutMs); - } - - public void testListInt8UReverseRequest(TestListInt8UReverseResponseCallback callback - , ArrayList arg1) { - testListInt8UReverseRequest(chipClusterPtr, callback, arg1, null); - } - - public void testListInt8UReverseRequest(TestListInt8UReverseResponseCallback callback - , ArrayList arg1 - , int timedInvokeTimeoutMs) { - testListInt8UReverseRequest(chipClusterPtr, callback, arg1, timedInvokeTimeoutMs); - } - - public void testEnumsRequest(TestEnumsResponseCallback callback - , Integer arg1, Integer arg2) { - testEnumsRequest(chipClusterPtr, callback, arg1, arg2, null); - } - - public void testEnumsRequest(TestEnumsResponseCallback callback - , Integer arg1, Integer arg2 - , int timedInvokeTimeoutMs) { - testEnumsRequest(chipClusterPtr, callback, arg1, arg2, timedInvokeTimeoutMs); - } - - public void testNullableOptionalRequest(TestNullableOptionalResponseCallback callback - , @Nullable Optional arg1) { - testNullableOptionalRequest(chipClusterPtr, callback, arg1, null); - } - - public void testNullableOptionalRequest(TestNullableOptionalResponseCallback callback - , @Nullable Optional arg1 - , int timedInvokeTimeoutMs) { - testNullableOptionalRequest(chipClusterPtr, callback, arg1, timedInvokeTimeoutMs); - } - - public void testComplexNullableOptionalRequest(TestComplexNullableOptionalResponseCallback callback - , @Nullable Integer nullableInt, Optional optionalInt, @Nullable Optional nullableOptionalInt, @Nullable String nullableString, Optional optionalString, @Nullable Optional nullableOptionalString, @Nullable ChipStructs.UnitTestingClusterSimpleStruct nullableStruct, Optional optionalStruct, @Nullable Optional nullableOptionalStruct, @Nullable ArrayList nullableList, Optional> optionalList, @Nullable Optional> nullableOptionalList) { - testComplexNullableOptionalRequest(chipClusterPtr, callback, nullableInt, optionalInt, nullableOptionalInt, nullableString, optionalString, nullableOptionalString, nullableStruct, optionalStruct, nullableOptionalStruct, nullableList, optionalList, nullableOptionalList, null); - } - - public void testComplexNullableOptionalRequest(TestComplexNullableOptionalResponseCallback callback - , @Nullable Integer nullableInt, Optional optionalInt, @Nullable Optional nullableOptionalInt, @Nullable String nullableString, Optional optionalString, @Nullable Optional nullableOptionalString, @Nullable ChipStructs.UnitTestingClusterSimpleStruct nullableStruct, Optional optionalStruct, @Nullable Optional nullableOptionalStruct, @Nullable ArrayList nullableList, Optional> optionalList, @Nullable Optional> nullableOptionalList - , int timedInvokeTimeoutMs) { - testComplexNullableOptionalRequest(chipClusterPtr, callback, nullableInt, optionalInt, nullableOptionalInt, nullableString, optionalString, nullableOptionalString, nullableStruct, optionalStruct, nullableOptionalStruct, nullableList, optionalList, nullableOptionalList, timedInvokeTimeoutMs); - } - - public void simpleStructEchoRequest(SimpleStructResponseCallback callback - , ChipStructs.UnitTestingClusterSimpleStruct arg1) { - simpleStructEchoRequest(chipClusterPtr, callback, arg1, null); - } - - public void simpleStructEchoRequest(SimpleStructResponseCallback callback - , ChipStructs.UnitTestingClusterSimpleStruct arg1 - , int timedInvokeTimeoutMs) { - simpleStructEchoRequest(chipClusterPtr, callback, arg1, timedInvokeTimeoutMs); - } - - - public void timedInvokeRequest(DefaultClusterCallback callback - - , int timedInvokeTimeoutMs) { - timedInvokeRequest(chipClusterPtr, callback, timedInvokeTimeoutMs); - } - - public void testSimpleOptionalArgumentRequest(DefaultClusterCallback callback - , Optional arg1) { - testSimpleOptionalArgumentRequest(chipClusterPtr, callback, arg1, null); - } - - public void testSimpleOptionalArgumentRequest(DefaultClusterCallback callback - , Optional arg1 - , int timedInvokeTimeoutMs) { - testSimpleOptionalArgumentRequest(chipClusterPtr, callback, arg1, timedInvokeTimeoutMs); - } - - public void testEmitTestEventRequest(TestEmitTestEventResponseCallback callback - , Integer arg1, Integer arg2, Boolean arg3) { - testEmitTestEventRequest(chipClusterPtr, callback, arg1, arg2, arg3, null); - } - - public void testEmitTestEventRequest(TestEmitTestEventResponseCallback callback - , Integer arg1, Integer arg2, Boolean arg3 - , int timedInvokeTimeoutMs) { - testEmitTestEventRequest(chipClusterPtr, callback, arg1, arg2, arg3, timedInvokeTimeoutMs); - } - - public void testEmitTestFabricScopedEventRequest(TestEmitTestFabricScopedEventResponseCallback callback - , Integer arg1) { - testEmitTestFabricScopedEventRequest(chipClusterPtr, callback, arg1, null); - } - - public void testEmitTestFabricScopedEventRequest(TestEmitTestFabricScopedEventResponseCallback callback - , Integer arg1 - , int timedInvokeTimeoutMs) { - testEmitTestFabricScopedEventRequest(chipClusterPtr, callback, arg1, timedInvokeTimeoutMs); - } - private native void test(long chipClusterPtr, DefaultClusterCallback Callback - - , @Nullable Integer timedInvokeTimeoutMs); - private native void testNotHandled(long chipClusterPtr, DefaultClusterCallback Callback - - , @Nullable Integer timedInvokeTimeoutMs); - private native void testSpecific(long chipClusterPtr, TestSpecificResponseCallback Callback - - , @Nullable Integer timedInvokeTimeoutMs); - private native void testUnknownCommand(long chipClusterPtr, DefaultClusterCallback Callback - - , @Nullable Integer timedInvokeTimeoutMs); - private native void testAddArguments(long chipClusterPtr, TestAddArgumentsResponseCallback Callback - , Integer arg1, Integer arg2 - , @Nullable Integer timedInvokeTimeoutMs); - private native void testSimpleArgumentRequest(long chipClusterPtr, TestSimpleArgumentResponseCallback Callback - , Boolean arg1 - , @Nullable Integer timedInvokeTimeoutMs); - private native void testStructArrayArgumentRequest(long chipClusterPtr, TestStructArrayArgumentResponseCallback Callback - , ArrayList arg1, ArrayList arg2, ArrayList arg3, ArrayList arg4, Integer arg5, Boolean arg6 - , @Nullable Integer timedInvokeTimeoutMs); - private native void testStructArgumentRequest(long chipClusterPtr, BooleanResponseCallback Callback - , ChipStructs.UnitTestingClusterSimpleStruct arg1 - , @Nullable Integer timedInvokeTimeoutMs); - private native void testNestedStructArgumentRequest(long chipClusterPtr, BooleanResponseCallback Callback - , ChipStructs.UnitTestingClusterNestedStruct arg1 - , @Nullable Integer timedInvokeTimeoutMs); - private native void testListStructArgumentRequest(long chipClusterPtr, BooleanResponseCallback Callback - , ArrayList arg1 - , @Nullable Integer timedInvokeTimeoutMs); - private native void testListInt8UArgumentRequest(long chipClusterPtr, BooleanResponseCallback Callback - , ArrayList arg1 - , @Nullable Integer timedInvokeTimeoutMs); - private native void testNestedStructListArgumentRequest(long chipClusterPtr, BooleanResponseCallback Callback - , ChipStructs.UnitTestingClusterNestedStructList arg1 - , @Nullable Integer timedInvokeTimeoutMs); - private native void testListNestedStructListArgumentRequest(long chipClusterPtr, BooleanResponseCallback Callback - , ArrayList arg1 - , @Nullable Integer timedInvokeTimeoutMs); - private native void testListInt8UReverseRequest(long chipClusterPtr, TestListInt8UReverseResponseCallback Callback - , ArrayList arg1 - , @Nullable Integer timedInvokeTimeoutMs); - private native void testEnumsRequest(long chipClusterPtr, TestEnumsResponseCallback Callback - , Integer arg1, Integer arg2 - , @Nullable Integer timedInvokeTimeoutMs); - private native void testNullableOptionalRequest(long chipClusterPtr, TestNullableOptionalResponseCallback Callback - , @Nullable Optional arg1 - , @Nullable Integer timedInvokeTimeoutMs); - private native void testComplexNullableOptionalRequest(long chipClusterPtr, TestComplexNullableOptionalResponseCallback Callback - , @Nullable Integer nullableInt, Optional optionalInt, @Nullable Optional nullableOptionalInt, @Nullable String nullableString, Optional optionalString, @Nullable Optional nullableOptionalString, @Nullable ChipStructs.UnitTestingClusterSimpleStruct nullableStruct, Optional optionalStruct, @Nullable Optional nullableOptionalStruct, @Nullable ArrayList nullableList, Optional> optionalList, @Nullable Optional> nullableOptionalList - , @Nullable Integer timedInvokeTimeoutMs); - private native void simpleStructEchoRequest(long chipClusterPtr, SimpleStructResponseCallback Callback - , ChipStructs.UnitTestingClusterSimpleStruct arg1 - , @Nullable Integer timedInvokeTimeoutMs); - private native void timedInvokeRequest(long chipClusterPtr, DefaultClusterCallback Callback - - , @Nullable Integer timedInvokeTimeoutMs); - private native void testSimpleOptionalArgumentRequest(long chipClusterPtr, DefaultClusterCallback Callback - , Optional arg1 - , @Nullable Integer timedInvokeTimeoutMs); - private native void testEmitTestEventRequest(long chipClusterPtr, TestEmitTestEventResponseCallback Callback - , Integer arg1, Integer arg2, Boolean arg3 - , @Nullable Integer timedInvokeTimeoutMs); - private native void testEmitTestFabricScopedEventRequest(long chipClusterPtr, TestEmitTestFabricScopedEventResponseCallback Callback - , Integer arg1 - , @Nullable Integer timedInvokeTimeoutMs); - public interface TestSpecificResponseCallback { - void onSuccess(Integer returnValue); - - void onError(Exception error); - } - - public interface TestAddArgumentsResponseCallback { - void onSuccess(Integer returnValue); - - void onError(Exception error); - } - - public interface TestSimpleArgumentResponseCallback { - void onSuccess(Boolean returnValue); - - void onError(Exception error); - } - - public interface TestStructArrayArgumentResponseCallback { - void onSuccess(ArrayList arg1, ArrayList arg2, ArrayList arg3, ArrayList arg4, Integer arg5, Boolean arg6); - - void onError(Exception error); - } - - public interface TestListInt8UReverseResponseCallback { - void onSuccess(ArrayList arg1); - - void onError(Exception error); - } - - public interface TestEnumsResponseCallback { - void onSuccess(Integer arg1, Integer arg2); - - void onError(Exception error); - } - - public interface TestNullableOptionalResponseCallback { - void onSuccess(Boolean wasPresent, Optional wasNull, Optional value, @Nullable Optional originalValue); - - void onError(Exception error); - } - - public interface TestComplexNullableOptionalResponseCallback { - void onSuccess(Boolean nullableIntWasNull, Optional nullableIntValue, Boolean optionalIntWasPresent, Optional optionalIntValue, Boolean nullableOptionalIntWasPresent, Optional nullableOptionalIntWasNull, Optional nullableOptionalIntValue, Boolean nullableStringWasNull, Optional nullableStringValue, Boolean optionalStringWasPresent, Optional optionalStringValue, Boolean nullableOptionalStringWasPresent, Optional nullableOptionalStringWasNull, Optional nullableOptionalStringValue, Boolean nullableStructWasNull, Optional nullableStructValue, Boolean optionalStructWasPresent, Optional optionalStructValue, Boolean nullableOptionalStructWasPresent, Optional nullableOptionalStructWasNull, Optional nullableOptionalStructValue, Boolean nullableListWasNull, Optional> nullableListValue, Boolean optionalListWasPresent, Optional> optionalListValue, Boolean nullableOptionalListWasPresent, Optional nullableOptionalListWasNull, Optional> nullableOptionalListValue); - - void onError(Exception error); - } - - public interface BooleanResponseCallback { - void onSuccess(Boolean value); - - void onError(Exception error); - } - - public interface SimpleStructResponseCallback { - void onSuccess(ChipStructs.UnitTestingClusterSimpleStruct arg1); - - void onError(Exception error); - } - - public interface TestEmitTestEventResponseCallback { - void onSuccess(Long value); - - void onError(Exception error); - } - - public interface TestEmitTestFabricScopedEventResponseCallback { - void onSuccess(Long value); - - void onError(Exception error); - } - - - public interface ListInt8uAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface ListOctetStringAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface ListStructOctetStringAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface ListNullablesAndOptionalsStructAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface ListLongOctetStringAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface ListFabricScopedAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface NullableBooleanAttributeCallback { - void onSuccess(@Nullable Boolean value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface NullableBitmap8AttributeCallback { - void onSuccess(@Nullable Integer value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface NullableBitmap16AttributeCallback { - void onSuccess(@Nullable Integer value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface NullableBitmap32AttributeCallback { - void onSuccess(@Nullable Long value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface NullableBitmap64AttributeCallback { - void onSuccess(@Nullable Long value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface NullableInt8uAttributeCallback { - void onSuccess(@Nullable Integer value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface NullableInt16uAttributeCallback { - void onSuccess(@Nullable Integer value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface NullableInt24uAttributeCallback { - void onSuccess(@Nullable Long value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface NullableInt32uAttributeCallback { - void onSuccess(@Nullable Long value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface NullableInt40uAttributeCallback { - void onSuccess(@Nullable Long value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface NullableInt48uAttributeCallback { - void onSuccess(@Nullable Long value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface NullableInt56uAttributeCallback { - void onSuccess(@Nullable Long value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface NullableInt64uAttributeCallback { - void onSuccess(@Nullable Long value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface NullableInt8sAttributeCallback { - void onSuccess(@Nullable Integer value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface NullableInt16sAttributeCallback { - void onSuccess(@Nullable Integer value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface NullableInt24sAttributeCallback { - void onSuccess(@Nullable Long value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface NullableInt32sAttributeCallback { - void onSuccess(@Nullable Long value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface NullableInt40sAttributeCallback { - void onSuccess(@Nullable Long value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface NullableInt48sAttributeCallback { - void onSuccess(@Nullable Long value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface NullableInt56sAttributeCallback { - void onSuccess(@Nullable Long value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface NullableInt64sAttributeCallback { - void onSuccess(@Nullable Long value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface NullableEnum8AttributeCallback { - void onSuccess(@Nullable Integer value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface NullableEnum16AttributeCallback { - void onSuccess(@Nullable Integer value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface NullableFloatSingleAttributeCallback { - void onSuccess(@Nullable Float value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface NullableFloatDoubleAttributeCallback { - void onSuccess(@Nullable Double value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface NullableOctetStringAttributeCallback { - void onSuccess(@Nullable byte[] value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface NullableCharStringAttributeCallback { - void onSuccess(@Nullable String value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface NullableEnumAttrAttributeCallback { - void onSuccess(@Nullable Integer value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface NullableRangeRestrictedInt8uAttributeCallback { - void onSuccess(@Nullable Integer value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface NullableRangeRestrictedInt8sAttributeCallback { - void onSuccess(@Nullable Integer value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface NullableRangeRestrictedInt16uAttributeCallback { - void onSuccess(@Nullable Integer value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface NullableRangeRestrictedInt16sAttributeCallback { - void onSuccess(@Nullable Integer value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface GeneratedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AcceptedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface EventListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AttributeListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - - public void readBooleanAttribute( - BooleanAttributeCallback callback - ) { - readBooleanAttribute(chipClusterPtr, callback); - } - public void writeBooleanAttribute(DefaultClusterCallback callback, Boolean value) { - writeBooleanAttribute(chipClusterPtr, callback, value, null); - } - - public void writeBooleanAttribute(DefaultClusterCallback callback, Boolean value, int timedWriteTimeoutMs) { - writeBooleanAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeBooleanAttribute( - BooleanAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeBooleanAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readBitmap8Attribute( - IntegerAttributeCallback callback - ) { - readBitmap8Attribute(chipClusterPtr, callback); - } - public void writeBitmap8Attribute(DefaultClusterCallback callback, Integer value) { - writeBitmap8Attribute(chipClusterPtr, callback, value, null); - } - - public void writeBitmap8Attribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeBitmap8Attribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeBitmap8Attribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeBitmap8Attribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readBitmap16Attribute( - IntegerAttributeCallback callback - ) { - readBitmap16Attribute(chipClusterPtr, callback); - } - public void writeBitmap16Attribute(DefaultClusterCallback callback, Integer value) { - writeBitmap16Attribute(chipClusterPtr, callback, value, null); - } - - public void writeBitmap16Attribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeBitmap16Attribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeBitmap16Attribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeBitmap16Attribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readBitmap32Attribute( - LongAttributeCallback callback - ) { - readBitmap32Attribute(chipClusterPtr, callback); - } - public void writeBitmap32Attribute(DefaultClusterCallback callback, Long value) { - writeBitmap32Attribute(chipClusterPtr, callback, value, null); - } - - public void writeBitmap32Attribute(DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { - writeBitmap32Attribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeBitmap32Attribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeBitmap32Attribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readBitmap64Attribute( - LongAttributeCallback callback - ) { - readBitmap64Attribute(chipClusterPtr, callback); - } - public void writeBitmap64Attribute(DefaultClusterCallback callback, Long value) { - writeBitmap64Attribute(chipClusterPtr, callback, value, null); - } - - public void writeBitmap64Attribute(DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { - writeBitmap64Attribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeBitmap64Attribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeBitmap64Attribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readInt8uAttribute( - IntegerAttributeCallback callback - ) { - readInt8uAttribute(chipClusterPtr, callback); - } - public void writeInt8uAttribute(DefaultClusterCallback callback, Integer value) { - writeInt8uAttribute(chipClusterPtr, callback, value, null); - } - - public void writeInt8uAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeInt8uAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeInt8uAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeInt8uAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readInt16uAttribute( - IntegerAttributeCallback callback - ) { - readInt16uAttribute(chipClusterPtr, callback); - } - public void writeInt16uAttribute(DefaultClusterCallback callback, Integer value) { - writeInt16uAttribute(chipClusterPtr, callback, value, null); - } - - public void writeInt16uAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeInt16uAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeInt16uAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeInt16uAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readInt24uAttribute( - LongAttributeCallback callback - ) { - readInt24uAttribute(chipClusterPtr, callback); - } - public void writeInt24uAttribute(DefaultClusterCallback callback, Long value) { - writeInt24uAttribute(chipClusterPtr, callback, value, null); - } - - public void writeInt24uAttribute(DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { - writeInt24uAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeInt24uAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeInt24uAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readInt32uAttribute( - LongAttributeCallback callback - ) { - readInt32uAttribute(chipClusterPtr, callback); - } - public void writeInt32uAttribute(DefaultClusterCallback callback, Long value) { - writeInt32uAttribute(chipClusterPtr, callback, value, null); - } - - public void writeInt32uAttribute(DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { - writeInt32uAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeInt32uAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeInt32uAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readInt40uAttribute( - LongAttributeCallback callback - ) { - readInt40uAttribute(chipClusterPtr, callback); - } - public void writeInt40uAttribute(DefaultClusterCallback callback, Long value) { - writeInt40uAttribute(chipClusterPtr, callback, value, null); - } - - public void writeInt40uAttribute(DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { - writeInt40uAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeInt40uAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeInt40uAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readInt48uAttribute( - LongAttributeCallback callback - ) { - readInt48uAttribute(chipClusterPtr, callback); - } - public void writeInt48uAttribute(DefaultClusterCallback callback, Long value) { - writeInt48uAttribute(chipClusterPtr, callback, value, null); - } - - public void writeInt48uAttribute(DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { - writeInt48uAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeInt48uAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeInt48uAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readInt56uAttribute( - LongAttributeCallback callback - ) { - readInt56uAttribute(chipClusterPtr, callback); - } - public void writeInt56uAttribute(DefaultClusterCallback callback, Long value) { - writeInt56uAttribute(chipClusterPtr, callback, value, null); - } - - public void writeInt56uAttribute(DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { - writeInt56uAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeInt56uAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeInt56uAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readInt64uAttribute( - LongAttributeCallback callback - ) { - readInt64uAttribute(chipClusterPtr, callback); - } - public void writeInt64uAttribute(DefaultClusterCallback callback, Long value) { - writeInt64uAttribute(chipClusterPtr, callback, value, null); - } - - public void writeInt64uAttribute(DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { - writeInt64uAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeInt64uAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeInt64uAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readInt8sAttribute( - IntegerAttributeCallback callback - ) { - readInt8sAttribute(chipClusterPtr, callback); - } - public void writeInt8sAttribute(DefaultClusterCallback callback, Integer value) { - writeInt8sAttribute(chipClusterPtr, callback, value, null); - } - - public void writeInt8sAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeInt8sAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeInt8sAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeInt8sAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readInt16sAttribute( - IntegerAttributeCallback callback - ) { - readInt16sAttribute(chipClusterPtr, callback); - } - public void writeInt16sAttribute(DefaultClusterCallback callback, Integer value) { - writeInt16sAttribute(chipClusterPtr, callback, value, null); - } - - public void writeInt16sAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeInt16sAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeInt16sAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeInt16sAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readInt24sAttribute( - LongAttributeCallback callback - ) { - readInt24sAttribute(chipClusterPtr, callback); - } - public void writeInt24sAttribute(DefaultClusterCallback callback, Long value) { - writeInt24sAttribute(chipClusterPtr, callback, value, null); - } - - public void writeInt24sAttribute(DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { - writeInt24sAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeInt24sAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeInt24sAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readInt32sAttribute( - LongAttributeCallback callback - ) { - readInt32sAttribute(chipClusterPtr, callback); - } - public void writeInt32sAttribute(DefaultClusterCallback callback, Long value) { - writeInt32sAttribute(chipClusterPtr, callback, value, null); - } - - public void writeInt32sAttribute(DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { - writeInt32sAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeInt32sAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeInt32sAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readInt40sAttribute( - LongAttributeCallback callback - ) { - readInt40sAttribute(chipClusterPtr, callback); - } - public void writeInt40sAttribute(DefaultClusterCallback callback, Long value) { - writeInt40sAttribute(chipClusterPtr, callback, value, null); - } - - public void writeInt40sAttribute(DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { - writeInt40sAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeInt40sAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeInt40sAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readInt48sAttribute( - LongAttributeCallback callback - ) { - readInt48sAttribute(chipClusterPtr, callback); - } - public void writeInt48sAttribute(DefaultClusterCallback callback, Long value) { - writeInt48sAttribute(chipClusterPtr, callback, value, null); - } - - public void writeInt48sAttribute(DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { - writeInt48sAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeInt48sAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeInt48sAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readInt56sAttribute( - LongAttributeCallback callback - ) { - readInt56sAttribute(chipClusterPtr, callback); - } - public void writeInt56sAttribute(DefaultClusterCallback callback, Long value) { - writeInt56sAttribute(chipClusterPtr, callback, value, null); - } - - public void writeInt56sAttribute(DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { - writeInt56sAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeInt56sAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeInt56sAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readInt64sAttribute( - LongAttributeCallback callback - ) { - readInt64sAttribute(chipClusterPtr, callback); - } - public void writeInt64sAttribute(DefaultClusterCallback callback, Long value) { - writeInt64sAttribute(chipClusterPtr, callback, value, null); - } - - public void writeInt64sAttribute(DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { - writeInt64sAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeInt64sAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeInt64sAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readEnum8Attribute( - IntegerAttributeCallback callback - ) { - readEnum8Attribute(chipClusterPtr, callback); - } - public void writeEnum8Attribute(DefaultClusterCallback callback, Integer value) { - writeEnum8Attribute(chipClusterPtr, callback, value, null); - } - - public void writeEnum8Attribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeEnum8Attribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeEnum8Attribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeEnum8Attribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readEnum16Attribute( - IntegerAttributeCallback callback - ) { - readEnum16Attribute(chipClusterPtr, callback); - } - public void writeEnum16Attribute(DefaultClusterCallback callback, Integer value) { - writeEnum16Attribute(chipClusterPtr, callback, value, null); - } - - public void writeEnum16Attribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeEnum16Attribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeEnum16Attribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeEnum16Attribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readFloatSingleAttribute( - FloatAttributeCallback callback - ) { - readFloatSingleAttribute(chipClusterPtr, callback); - } - public void writeFloatSingleAttribute(DefaultClusterCallback callback, Float value) { - writeFloatSingleAttribute(chipClusterPtr, callback, value, null); - } - - public void writeFloatSingleAttribute(DefaultClusterCallback callback, Float value, int timedWriteTimeoutMs) { - writeFloatSingleAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeFloatSingleAttribute( - FloatAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeFloatSingleAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readFloatDoubleAttribute( - DoubleAttributeCallback callback - ) { - readFloatDoubleAttribute(chipClusterPtr, callback); - } - public void writeFloatDoubleAttribute(DefaultClusterCallback callback, Double value) { - writeFloatDoubleAttribute(chipClusterPtr, callback, value, null); - } - - public void writeFloatDoubleAttribute(DefaultClusterCallback callback, Double value, int timedWriteTimeoutMs) { - writeFloatDoubleAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeFloatDoubleAttribute( - DoubleAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeFloatDoubleAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readOctetStringAttribute( - OctetStringAttributeCallback callback - ) { - readOctetStringAttribute(chipClusterPtr, callback); - } - public void writeOctetStringAttribute(DefaultClusterCallback callback, byte[] value) { - writeOctetStringAttribute(chipClusterPtr, callback, value, null); - } - - public void writeOctetStringAttribute(DefaultClusterCallback callback, byte[] value, int timedWriteTimeoutMs) { - writeOctetStringAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeOctetStringAttribute( - OctetStringAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeOctetStringAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readListInt8uAttribute( - ListInt8uAttributeCallback callback - ) { - readListInt8uAttribute(chipClusterPtr, callback); - } - public void writeListInt8uAttribute(DefaultClusterCallback callback, ArrayList value) { - writeListInt8uAttribute(chipClusterPtr, callback, value, null); - } - - public void writeListInt8uAttribute(DefaultClusterCallback callback, ArrayList value, int timedWriteTimeoutMs) { - writeListInt8uAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeListInt8uAttribute( - ListInt8uAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeListInt8uAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readListOctetStringAttribute( - ListOctetStringAttributeCallback callback - ) { - readListOctetStringAttribute(chipClusterPtr, callback); - } - public void writeListOctetStringAttribute(DefaultClusterCallback callback, ArrayList value) { - writeListOctetStringAttribute(chipClusterPtr, callback, value, null); - } - - public void writeListOctetStringAttribute(DefaultClusterCallback callback, ArrayList value, int timedWriteTimeoutMs) { - writeListOctetStringAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeListOctetStringAttribute( - ListOctetStringAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeListOctetStringAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readListStructOctetStringAttribute( - ListStructOctetStringAttributeCallback callback - ) { - readListStructOctetStringAttribute(chipClusterPtr, callback); - } - public void writeListStructOctetStringAttribute(DefaultClusterCallback callback, ArrayList value) { - writeListStructOctetStringAttribute(chipClusterPtr, callback, value, null); - } - - public void writeListStructOctetStringAttribute(DefaultClusterCallback callback, ArrayList value, int timedWriteTimeoutMs) { - writeListStructOctetStringAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeListStructOctetStringAttribute( - ListStructOctetStringAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeListStructOctetStringAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readLongOctetStringAttribute( - OctetStringAttributeCallback callback - ) { - readLongOctetStringAttribute(chipClusterPtr, callback); - } - public void writeLongOctetStringAttribute(DefaultClusterCallback callback, byte[] value) { - writeLongOctetStringAttribute(chipClusterPtr, callback, value, null); - } - - public void writeLongOctetStringAttribute(DefaultClusterCallback callback, byte[] value, int timedWriteTimeoutMs) { - writeLongOctetStringAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeLongOctetStringAttribute( - OctetStringAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeLongOctetStringAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readCharStringAttribute( - CharStringAttributeCallback callback - ) { - readCharStringAttribute(chipClusterPtr, callback); - } - public void writeCharStringAttribute(DefaultClusterCallback callback, String value) { - writeCharStringAttribute(chipClusterPtr, callback, value, null); - } - - public void writeCharStringAttribute(DefaultClusterCallback callback, String value, int timedWriteTimeoutMs) { - writeCharStringAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeCharStringAttribute( - CharStringAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeCharStringAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readLongCharStringAttribute( - CharStringAttributeCallback callback - ) { - readLongCharStringAttribute(chipClusterPtr, callback); - } - public void writeLongCharStringAttribute(DefaultClusterCallback callback, String value) { - writeLongCharStringAttribute(chipClusterPtr, callback, value, null); - } - - public void writeLongCharStringAttribute(DefaultClusterCallback callback, String value, int timedWriteTimeoutMs) { - writeLongCharStringAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeLongCharStringAttribute( - CharStringAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeLongCharStringAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readEpochUsAttribute( - LongAttributeCallback callback - ) { - readEpochUsAttribute(chipClusterPtr, callback); - } - public void writeEpochUsAttribute(DefaultClusterCallback callback, Long value) { - writeEpochUsAttribute(chipClusterPtr, callback, value, null); - } - - public void writeEpochUsAttribute(DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { - writeEpochUsAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeEpochUsAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeEpochUsAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readEpochSAttribute( - LongAttributeCallback callback - ) { - readEpochSAttribute(chipClusterPtr, callback); - } - public void writeEpochSAttribute(DefaultClusterCallback callback, Long value) { - writeEpochSAttribute(chipClusterPtr, callback, value, null); - } - - public void writeEpochSAttribute(DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { - writeEpochSAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeEpochSAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeEpochSAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readVendorIdAttribute( - IntegerAttributeCallback callback - ) { - readVendorIdAttribute(chipClusterPtr, callback); - } - public void writeVendorIdAttribute(DefaultClusterCallback callback, Integer value) { - writeVendorIdAttribute(chipClusterPtr, callback, value, null); - } - - public void writeVendorIdAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeVendorIdAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeVendorIdAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeVendorIdAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readListNullablesAndOptionalsStructAttribute( - ListNullablesAndOptionalsStructAttributeCallback callback - ) { - readListNullablesAndOptionalsStructAttribute(chipClusterPtr, callback); - } - public void writeListNullablesAndOptionalsStructAttribute(DefaultClusterCallback callback, ArrayList value) { - writeListNullablesAndOptionalsStructAttribute(chipClusterPtr, callback, value, null); - } - - public void writeListNullablesAndOptionalsStructAttribute(DefaultClusterCallback callback, ArrayList value, int timedWriteTimeoutMs) { - writeListNullablesAndOptionalsStructAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeListNullablesAndOptionalsStructAttribute( - ListNullablesAndOptionalsStructAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeListNullablesAndOptionalsStructAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readEnumAttrAttribute( - IntegerAttributeCallback callback - ) { - readEnumAttrAttribute(chipClusterPtr, callback); - } - public void writeEnumAttrAttribute(DefaultClusterCallback callback, Integer value) { - writeEnumAttrAttribute(chipClusterPtr, callback, value, null); - } - - public void writeEnumAttrAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeEnumAttrAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeEnumAttrAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeEnumAttrAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readRangeRestrictedInt8uAttribute( - IntegerAttributeCallback callback - ) { - readRangeRestrictedInt8uAttribute(chipClusterPtr, callback); - } - public void writeRangeRestrictedInt8uAttribute(DefaultClusterCallback callback, Integer value) { - writeRangeRestrictedInt8uAttribute(chipClusterPtr, callback, value, null); - } - - public void writeRangeRestrictedInt8uAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeRangeRestrictedInt8uAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeRangeRestrictedInt8uAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeRangeRestrictedInt8uAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readRangeRestrictedInt8sAttribute( - IntegerAttributeCallback callback - ) { - readRangeRestrictedInt8sAttribute(chipClusterPtr, callback); - } - public void writeRangeRestrictedInt8sAttribute(DefaultClusterCallback callback, Integer value) { - writeRangeRestrictedInt8sAttribute(chipClusterPtr, callback, value, null); - } - - public void writeRangeRestrictedInt8sAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeRangeRestrictedInt8sAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeRangeRestrictedInt8sAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeRangeRestrictedInt8sAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readRangeRestrictedInt16uAttribute( - IntegerAttributeCallback callback - ) { - readRangeRestrictedInt16uAttribute(chipClusterPtr, callback); - } - public void writeRangeRestrictedInt16uAttribute(DefaultClusterCallback callback, Integer value) { - writeRangeRestrictedInt16uAttribute(chipClusterPtr, callback, value, null); - } - - public void writeRangeRestrictedInt16uAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeRangeRestrictedInt16uAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeRangeRestrictedInt16uAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeRangeRestrictedInt16uAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readRangeRestrictedInt16sAttribute( - IntegerAttributeCallback callback - ) { - readRangeRestrictedInt16sAttribute(chipClusterPtr, callback); - } - public void writeRangeRestrictedInt16sAttribute(DefaultClusterCallback callback, Integer value) { - writeRangeRestrictedInt16sAttribute(chipClusterPtr, callback, value, null); - } - - public void writeRangeRestrictedInt16sAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeRangeRestrictedInt16sAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeRangeRestrictedInt16sAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeRangeRestrictedInt16sAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readListLongOctetStringAttribute( - ListLongOctetStringAttributeCallback callback - ) { - readListLongOctetStringAttribute(chipClusterPtr, callback); - } - public void writeListLongOctetStringAttribute(DefaultClusterCallback callback, ArrayList value) { - writeListLongOctetStringAttribute(chipClusterPtr, callback, value, null); - } - - public void writeListLongOctetStringAttribute(DefaultClusterCallback callback, ArrayList value, int timedWriteTimeoutMs) { - writeListLongOctetStringAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeListLongOctetStringAttribute( - ListLongOctetStringAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeListLongOctetStringAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readListFabricScopedAttribute( - ListFabricScopedAttributeCallback callback - ) { - readListFabricScopedAttribute(chipClusterPtr, callback, true); - } - public void readListFabricScopedAttributeWithFabricFilter( - ListFabricScopedAttributeCallback callback - , - boolean isFabricFiltered - ) { - readListFabricScopedAttribute(chipClusterPtr, callback, isFabricFiltered); - } - public void writeListFabricScopedAttribute(DefaultClusterCallback callback, ArrayList value) { - writeListFabricScopedAttribute(chipClusterPtr, callback, value, null); - } - - public void writeListFabricScopedAttribute(DefaultClusterCallback callback, ArrayList value, int timedWriteTimeoutMs) { - writeListFabricScopedAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeListFabricScopedAttribute( - ListFabricScopedAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeListFabricScopedAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readTimedWriteBooleanAttribute( - BooleanAttributeCallback callback - ) { - readTimedWriteBooleanAttribute(chipClusterPtr, callback); - } - - public void writeTimedWriteBooleanAttribute(DefaultClusterCallback callback, Boolean value, int timedWriteTimeoutMs) { - writeTimedWriteBooleanAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeTimedWriteBooleanAttribute( - BooleanAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeTimedWriteBooleanAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readGeneralErrorBooleanAttribute( - BooleanAttributeCallback callback - ) { - readGeneralErrorBooleanAttribute(chipClusterPtr, callback); - } - public void writeGeneralErrorBooleanAttribute(DefaultClusterCallback callback, Boolean value) { - writeGeneralErrorBooleanAttribute(chipClusterPtr, callback, value, null); - } - - public void writeGeneralErrorBooleanAttribute(DefaultClusterCallback callback, Boolean value, int timedWriteTimeoutMs) { - writeGeneralErrorBooleanAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeGeneralErrorBooleanAttribute( - BooleanAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeGeneralErrorBooleanAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readClusterErrorBooleanAttribute( - BooleanAttributeCallback callback - ) { - readClusterErrorBooleanAttribute(chipClusterPtr, callback); - } - public void writeClusterErrorBooleanAttribute(DefaultClusterCallback callback, Boolean value) { - writeClusterErrorBooleanAttribute(chipClusterPtr, callback, value, null); - } - - public void writeClusterErrorBooleanAttribute(DefaultClusterCallback callback, Boolean value, int timedWriteTimeoutMs) { - writeClusterErrorBooleanAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeClusterErrorBooleanAttribute( - BooleanAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeClusterErrorBooleanAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readUnsupportedAttribute( - BooleanAttributeCallback callback - ) { - readUnsupportedAttribute(chipClusterPtr, callback); - } - public void writeUnsupportedAttribute(DefaultClusterCallback callback, Boolean value) { - writeUnsupportedAttribute(chipClusterPtr, callback, value, null); - } - - public void writeUnsupportedAttribute(DefaultClusterCallback callback, Boolean value, int timedWriteTimeoutMs) { - writeUnsupportedAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeUnsupportedAttribute( - BooleanAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeUnsupportedAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readNullableBooleanAttribute( - NullableBooleanAttributeCallback callback - ) { - readNullableBooleanAttribute(chipClusterPtr, callback); - } - public void writeNullableBooleanAttribute(DefaultClusterCallback callback, Boolean value) { - writeNullableBooleanAttribute(chipClusterPtr, callback, value, null); - } - - public void writeNullableBooleanAttribute(DefaultClusterCallback callback, Boolean value, int timedWriteTimeoutMs) { - writeNullableBooleanAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeNullableBooleanAttribute( - NullableBooleanAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeNullableBooleanAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readNullableBitmap8Attribute( - NullableBitmap8AttributeCallback callback - ) { - readNullableBitmap8Attribute(chipClusterPtr, callback); - } - public void writeNullableBitmap8Attribute(DefaultClusterCallback callback, Integer value) { - writeNullableBitmap8Attribute(chipClusterPtr, callback, value, null); - } - - public void writeNullableBitmap8Attribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeNullableBitmap8Attribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeNullableBitmap8Attribute( - NullableBitmap8AttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeNullableBitmap8Attribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readNullableBitmap16Attribute( - NullableBitmap16AttributeCallback callback - ) { - readNullableBitmap16Attribute(chipClusterPtr, callback); - } - public void writeNullableBitmap16Attribute(DefaultClusterCallback callback, Integer value) { - writeNullableBitmap16Attribute(chipClusterPtr, callback, value, null); - } - - public void writeNullableBitmap16Attribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeNullableBitmap16Attribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeNullableBitmap16Attribute( - NullableBitmap16AttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeNullableBitmap16Attribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readNullableBitmap32Attribute( - NullableBitmap32AttributeCallback callback - ) { - readNullableBitmap32Attribute(chipClusterPtr, callback); - } - public void writeNullableBitmap32Attribute(DefaultClusterCallback callback, Long value) { - writeNullableBitmap32Attribute(chipClusterPtr, callback, value, null); - } - - public void writeNullableBitmap32Attribute(DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { - writeNullableBitmap32Attribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeNullableBitmap32Attribute( - NullableBitmap32AttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeNullableBitmap32Attribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readNullableBitmap64Attribute( - NullableBitmap64AttributeCallback callback - ) { - readNullableBitmap64Attribute(chipClusterPtr, callback); - } - public void writeNullableBitmap64Attribute(DefaultClusterCallback callback, Long value) { - writeNullableBitmap64Attribute(chipClusterPtr, callback, value, null); - } - - public void writeNullableBitmap64Attribute(DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { - writeNullableBitmap64Attribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeNullableBitmap64Attribute( - NullableBitmap64AttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeNullableBitmap64Attribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readNullableInt8uAttribute( - NullableInt8uAttributeCallback callback - ) { - readNullableInt8uAttribute(chipClusterPtr, callback); - } - public void writeNullableInt8uAttribute(DefaultClusterCallback callback, Integer value) { - writeNullableInt8uAttribute(chipClusterPtr, callback, value, null); - } - - public void writeNullableInt8uAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeNullableInt8uAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeNullableInt8uAttribute( - NullableInt8uAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeNullableInt8uAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readNullableInt16uAttribute( - NullableInt16uAttributeCallback callback - ) { - readNullableInt16uAttribute(chipClusterPtr, callback); - } - public void writeNullableInt16uAttribute(DefaultClusterCallback callback, Integer value) { - writeNullableInt16uAttribute(chipClusterPtr, callback, value, null); - } - - public void writeNullableInt16uAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeNullableInt16uAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeNullableInt16uAttribute( - NullableInt16uAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeNullableInt16uAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readNullableInt24uAttribute( - NullableInt24uAttributeCallback callback - ) { - readNullableInt24uAttribute(chipClusterPtr, callback); - } - public void writeNullableInt24uAttribute(DefaultClusterCallback callback, Long value) { - writeNullableInt24uAttribute(chipClusterPtr, callback, value, null); - } - - public void writeNullableInt24uAttribute(DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { - writeNullableInt24uAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeNullableInt24uAttribute( - NullableInt24uAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeNullableInt24uAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readNullableInt32uAttribute( - NullableInt32uAttributeCallback callback - ) { - readNullableInt32uAttribute(chipClusterPtr, callback); - } - public void writeNullableInt32uAttribute(DefaultClusterCallback callback, Long value) { - writeNullableInt32uAttribute(chipClusterPtr, callback, value, null); - } - - public void writeNullableInt32uAttribute(DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { - writeNullableInt32uAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeNullableInt32uAttribute( - NullableInt32uAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeNullableInt32uAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readNullableInt40uAttribute( - NullableInt40uAttributeCallback callback - ) { - readNullableInt40uAttribute(chipClusterPtr, callback); - } - public void writeNullableInt40uAttribute(DefaultClusterCallback callback, Long value) { - writeNullableInt40uAttribute(chipClusterPtr, callback, value, null); - } - - public void writeNullableInt40uAttribute(DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { - writeNullableInt40uAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeNullableInt40uAttribute( - NullableInt40uAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeNullableInt40uAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readNullableInt48uAttribute( - NullableInt48uAttributeCallback callback - ) { - readNullableInt48uAttribute(chipClusterPtr, callback); - } - public void writeNullableInt48uAttribute(DefaultClusterCallback callback, Long value) { - writeNullableInt48uAttribute(chipClusterPtr, callback, value, null); - } - - public void writeNullableInt48uAttribute(DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { - writeNullableInt48uAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeNullableInt48uAttribute( - NullableInt48uAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeNullableInt48uAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readNullableInt56uAttribute( - NullableInt56uAttributeCallback callback - ) { - readNullableInt56uAttribute(chipClusterPtr, callback); - } - public void writeNullableInt56uAttribute(DefaultClusterCallback callback, Long value) { - writeNullableInt56uAttribute(chipClusterPtr, callback, value, null); - } - - public void writeNullableInt56uAttribute(DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { - writeNullableInt56uAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeNullableInt56uAttribute( - NullableInt56uAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeNullableInt56uAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readNullableInt64uAttribute( - NullableInt64uAttributeCallback callback - ) { - readNullableInt64uAttribute(chipClusterPtr, callback); - } - public void writeNullableInt64uAttribute(DefaultClusterCallback callback, Long value) { - writeNullableInt64uAttribute(chipClusterPtr, callback, value, null); - } - - public void writeNullableInt64uAttribute(DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { - writeNullableInt64uAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeNullableInt64uAttribute( - NullableInt64uAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeNullableInt64uAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readNullableInt8sAttribute( - NullableInt8sAttributeCallback callback - ) { - readNullableInt8sAttribute(chipClusterPtr, callback); - } - public void writeNullableInt8sAttribute(DefaultClusterCallback callback, Integer value) { - writeNullableInt8sAttribute(chipClusterPtr, callback, value, null); - } - - public void writeNullableInt8sAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeNullableInt8sAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeNullableInt8sAttribute( - NullableInt8sAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeNullableInt8sAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readNullableInt16sAttribute( - NullableInt16sAttributeCallback callback - ) { - readNullableInt16sAttribute(chipClusterPtr, callback); - } - public void writeNullableInt16sAttribute(DefaultClusterCallback callback, Integer value) { - writeNullableInt16sAttribute(chipClusterPtr, callback, value, null); - } - - public void writeNullableInt16sAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeNullableInt16sAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeNullableInt16sAttribute( - NullableInt16sAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeNullableInt16sAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readNullableInt24sAttribute( - NullableInt24sAttributeCallback callback - ) { - readNullableInt24sAttribute(chipClusterPtr, callback); - } - public void writeNullableInt24sAttribute(DefaultClusterCallback callback, Long value) { - writeNullableInt24sAttribute(chipClusterPtr, callback, value, null); - } - - public void writeNullableInt24sAttribute(DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { - writeNullableInt24sAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeNullableInt24sAttribute( - NullableInt24sAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeNullableInt24sAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readNullableInt32sAttribute( - NullableInt32sAttributeCallback callback - ) { - readNullableInt32sAttribute(chipClusterPtr, callback); - } - public void writeNullableInt32sAttribute(DefaultClusterCallback callback, Long value) { - writeNullableInt32sAttribute(chipClusterPtr, callback, value, null); - } - - public void writeNullableInt32sAttribute(DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { - writeNullableInt32sAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeNullableInt32sAttribute( - NullableInt32sAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeNullableInt32sAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readNullableInt40sAttribute( - NullableInt40sAttributeCallback callback - ) { - readNullableInt40sAttribute(chipClusterPtr, callback); - } - public void writeNullableInt40sAttribute(DefaultClusterCallback callback, Long value) { - writeNullableInt40sAttribute(chipClusterPtr, callback, value, null); - } - - public void writeNullableInt40sAttribute(DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { - writeNullableInt40sAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeNullableInt40sAttribute( - NullableInt40sAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeNullableInt40sAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readNullableInt48sAttribute( - NullableInt48sAttributeCallback callback - ) { - readNullableInt48sAttribute(chipClusterPtr, callback); - } - public void writeNullableInt48sAttribute(DefaultClusterCallback callback, Long value) { - writeNullableInt48sAttribute(chipClusterPtr, callback, value, null); - } - - public void writeNullableInt48sAttribute(DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { - writeNullableInt48sAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeNullableInt48sAttribute( - NullableInt48sAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeNullableInt48sAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readNullableInt56sAttribute( - NullableInt56sAttributeCallback callback - ) { - readNullableInt56sAttribute(chipClusterPtr, callback); - } - public void writeNullableInt56sAttribute(DefaultClusterCallback callback, Long value) { - writeNullableInt56sAttribute(chipClusterPtr, callback, value, null); - } - - public void writeNullableInt56sAttribute(DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { - writeNullableInt56sAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeNullableInt56sAttribute( - NullableInt56sAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeNullableInt56sAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readNullableInt64sAttribute( - NullableInt64sAttributeCallback callback - ) { - readNullableInt64sAttribute(chipClusterPtr, callback); - } - public void writeNullableInt64sAttribute(DefaultClusterCallback callback, Long value) { - writeNullableInt64sAttribute(chipClusterPtr, callback, value, null); - } - - public void writeNullableInt64sAttribute(DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { - writeNullableInt64sAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeNullableInt64sAttribute( - NullableInt64sAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeNullableInt64sAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readNullableEnum8Attribute( - NullableEnum8AttributeCallback callback - ) { - readNullableEnum8Attribute(chipClusterPtr, callback); - } - public void writeNullableEnum8Attribute(DefaultClusterCallback callback, Integer value) { - writeNullableEnum8Attribute(chipClusterPtr, callback, value, null); - } - - public void writeNullableEnum8Attribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeNullableEnum8Attribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeNullableEnum8Attribute( - NullableEnum8AttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeNullableEnum8Attribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readNullableEnum16Attribute( - NullableEnum16AttributeCallback callback - ) { - readNullableEnum16Attribute(chipClusterPtr, callback); - } - public void writeNullableEnum16Attribute(DefaultClusterCallback callback, Integer value) { - writeNullableEnum16Attribute(chipClusterPtr, callback, value, null); - } - - public void writeNullableEnum16Attribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeNullableEnum16Attribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeNullableEnum16Attribute( - NullableEnum16AttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeNullableEnum16Attribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readNullableFloatSingleAttribute( - NullableFloatSingleAttributeCallback callback - ) { - readNullableFloatSingleAttribute(chipClusterPtr, callback); - } - public void writeNullableFloatSingleAttribute(DefaultClusterCallback callback, Float value) { - writeNullableFloatSingleAttribute(chipClusterPtr, callback, value, null); - } - - public void writeNullableFloatSingleAttribute(DefaultClusterCallback callback, Float value, int timedWriteTimeoutMs) { - writeNullableFloatSingleAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeNullableFloatSingleAttribute( - NullableFloatSingleAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeNullableFloatSingleAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readNullableFloatDoubleAttribute( - NullableFloatDoubleAttributeCallback callback - ) { - readNullableFloatDoubleAttribute(chipClusterPtr, callback); - } - public void writeNullableFloatDoubleAttribute(DefaultClusterCallback callback, Double value) { - writeNullableFloatDoubleAttribute(chipClusterPtr, callback, value, null); - } - - public void writeNullableFloatDoubleAttribute(DefaultClusterCallback callback, Double value, int timedWriteTimeoutMs) { - writeNullableFloatDoubleAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeNullableFloatDoubleAttribute( - NullableFloatDoubleAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeNullableFloatDoubleAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readNullableOctetStringAttribute( - NullableOctetStringAttributeCallback callback - ) { - readNullableOctetStringAttribute(chipClusterPtr, callback); - } - public void writeNullableOctetStringAttribute(DefaultClusterCallback callback, byte[] value) { - writeNullableOctetStringAttribute(chipClusterPtr, callback, value, null); - } - - public void writeNullableOctetStringAttribute(DefaultClusterCallback callback, byte[] value, int timedWriteTimeoutMs) { - writeNullableOctetStringAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeNullableOctetStringAttribute( - NullableOctetStringAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeNullableOctetStringAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readNullableCharStringAttribute( - NullableCharStringAttributeCallback callback - ) { - readNullableCharStringAttribute(chipClusterPtr, callback); - } - public void writeNullableCharStringAttribute(DefaultClusterCallback callback, String value) { - writeNullableCharStringAttribute(chipClusterPtr, callback, value, null); - } - - public void writeNullableCharStringAttribute(DefaultClusterCallback callback, String value, int timedWriteTimeoutMs) { - writeNullableCharStringAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeNullableCharStringAttribute( - NullableCharStringAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeNullableCharStringAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readNullableEnumAttrAttribute( - NullableEnumAttrAttributeCallback callback - ) { - readNullableEnumAttrAttribute(chipClusterPtr, callback); - } - public void writeNullableEnumAttrAttribute(DefaultClusterCallback callback, Integer value) { - writeNullableEnumAttrAttribute(chipClusterPtr, callback, value, null); - } - - public void writeNullableEnumAttrAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeNullableEnumAttrAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeNullableEnumAttrAttribute( - NullableEnumAttrAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeNullableEnumAttrAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readNullableRangeRestrictedInt8uAttribute( - NullableRangeRestrictedInt8uAttributeCallback callback - ) { - readNullableRangeRestrictedInt8uAttribute(chipClusterPtr, callback); - } - public void writeNullableRangeRestrictedInt8uAttribute(DefaultClusterCallback callback, Integer value) { - writeNullableRangeRestrictedInt8uAttribute(chipClusterPtr, callback, value, null); - } - - public void writeNullableRangeRestrictedInt8uAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeNullableRangeRestrictedInt8uAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeNullableRangeRestrictedInt8uAttribute( - NullableRangeRestrictedInt8uAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeNullableRangeRestrictedInt8uAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readNullableRangeRestrictedInt8sAttribute( - NullableRangeRestrictedInt8sAttributeCallback callback - ) { - readNullableRangeRestrictedInt8sAttribute(chipClusterPtr, callback); - } - public void writeNullableRangeRestrictedInt8sAttribute(DefaultClusterCallback callback, Integer value) { - writeNullableRangeRestrictedInt8sAttribute(chipClusterPtr, callback, value, null); - } - - public void writeNullableRangeRestrictedInt8sAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeNullableRangeRestrictedInt8sAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeNullableRangeRestrictedInt8sAttribute( - NullableRangeRestrictedInt8sAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeNullableRangeRestrictedInt8sAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readNullableRangeRestrictedInt16uAttribute( - NullableRangeRestrictedInt16uAttributeCallback callback - ) { - readNullableRangeRestrictedInt16uAttribute(chipClusterPtr, callback); - } - public void writeNullableRangeRestrictedInt16uAttribute(DefaultClusterCallback callback, Integer value) { - writeNullableRangeRestrictedInt16uAttribute(chipClusterPtr, callback, value, null); - } - - public void writeNullableRangeRestrictedInt16uAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeNullableRangeRestrictedInt16uAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeNullableRangeRestrictedInt16uAttribute( - NullableRangeRestrictedInt16uAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeNullableRangeRestrictedInt16uAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readNullableRangeRestrictedInt16sAttribute( - NullableRangeRestrictedInt16sAttributeCallback callback - ) { - readNullableRangeRestrictedInt16sAttribute(chipClusterPtr, callback); - } - public void writeNullableRangeRestrictedInt16sAttribute(DefaultClusterCallback callback, Integer value) { - writeNullableRangeRestrictedInt16sAttribute(chipClusterPtr, callback, value, null); - } - - public void writeNullableRangeRestrictedInt16sAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeNullableRangeRestrictedInt16sAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeNullableRangeRestrictedInt16sAttribute( - NullableRangeRestrictedInt16sAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeNullableRangeRestrictedInt16sAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readWriteOnlyInt8uAttribute( - IntegerAttributeCallback callback - ) { - readWriteOnlyInt8uAttribute(chipClusterPtr, callback); - } - public void writeWriteOnlyInt8uAttribute(DefaultClusterCallback callback, Integer value) { - writeWriteOnlyInt8uAttribute(chipClusterPtr, callback, value, null); - } - - public void writeWriteOnlyInt8uAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeWriteOnlyInt8uAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeWriteOnlyInt8uAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeWriteOnlyInt8uAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - ) { - readGeneratedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - ) { - readAcceptedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readEventListAttribute( - EventListAttributeCallback callback - ) { - readEventListAttribute(chipClusterPtr, callback); - } - public void subscribeEventListAttribute( - EventListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAttributeListAttribute( - AttributeListAttributeCallback callback - ) { - readAttributeListAttribute(chipClusterPtr, callback); - } - public void subscribeAttributeListAttribute( - AttributeListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readFeatureMapAttribute( - LongAttributeCallback callback - ) { - readFeatureMapAttribute(chipClusterPtr, callback); - } - public void subscribeFeatureMapAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readClusterRevisionAttribute( - IntegerAttributeCallback callback - ) { - readClusterRevisionAttribute(chipClusterPtr, callback); - } - public void subscribeClusterRevisionAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - private native void readBooleanAttribute(long chipClusterPtr, - BooleanAttributeCallback callback - ); - - private native void writeBooleanAttribute(long chipClusterPtr, DefaultClusterCallback callback, Boolean value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeBooleanAttribute(long chipClusterPtr, - BooleanAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readBitmap8Attribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - - private native void writeBitmap8Attribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeBitmap8Attribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readBitmap16Attribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - - private native void writeBitmap16Attribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeBitmap16Attribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readBitmap32Attribute(long chipClusterPtr, - LongAttributeCallback callback - ); - - private native void writeBitmap32Attribute(long chipClusterPtr, DefaultClusterCallback callback, Long value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeBitmap32Attribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readBitmap64Attribute(long chipClusterPtr, - LongAttributeCallback callback - ); - - private native void writeBitmap64Attribute(long chipClusterPtr, DefaultClusterCallback callback, Long value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeBitmap64Attribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readInt8uAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - - private native void writeInt8uAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeInt8uAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readInt16uAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - - private native void writeInt16uAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeInt16uAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readInt24uAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - - private native void writeInt24uAttribute(long chipClusterPtr, DefaultClusterCallback callback, Long value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeInt24uAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readInt32uAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - - private native void writeInt32uAttribute(long chipClusterPtr, DefaultClusterCallback callback, Long value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeInt32uAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readInt40uAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - - private native void writeInt40uAttribute(long chipClusterPtr, DefaultClusterCallback callback, Long value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeInt40uAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readInt48uAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - - private native void writeInt48uAttribute(long chipClusterPtr, DefaultClusterCallback callback, Long value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeInt48uAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readInt56uAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - - private native void writeInt56uAttribute(long chipClusterPtr, DefaultClusterCallback callback, Long value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeInt56uAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readInt64uAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - - private native void writeInt64uAttribute(long chipClusterPtr, DefaultClusterCallback callback, Long value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeInt64uAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readInt8sAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - - private native void writeInt8sAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeInt8sAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readInt16sAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - - private native void writeInt16sAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeInt16sAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readInt24sAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - - private native void writeInt24sAttribute(long chipClusterPtr, DefaultClusterCallback callback, Long value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeInt24sAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readInt32sAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - - private native void writeInt32sAttribute(long chipClusterPtr, DefaultClusterCallback callback, Long value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeInt32sAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readInt40sAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - - private native void writeInt40sAttribute(long chipClusterPtr, DefaultClusterCallback callback, Long value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeInt40sAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readInt48sAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - - private native void writeInt48sAttribute(long chipClusterPtr, DefaultClusterCallback callback, Long value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeInt48sAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readInt56sAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - - private native void writeInt56sAttribute(long chipClusterPtr, DefaultClusterCallback callback, Long value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeInt56sAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readInt64sAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - - private native void writeInt64sAttribute(long chipClusterPtr, DefaultClusterCallback callback, Long value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeInt64sAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readEnum8Attribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - - private native void writeEnum8Attribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeEnum8Attribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readEnum16Attribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - - private native void writeEnum16Attribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeEnum16Attribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readFloatSingleAttribute(long chipClusterPtr, - FloatAttributeCallback callback - ); - - private native void writeFloatSingleAttribute(long chipClusterPtr, DefaultClusterCallback callback, Float value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeFloatSingleAttribute(long chipClusterPtr, - FloatAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readFloatDoubleAttribute(long chipClusterPtr, - DoubleAttributeCallback callback - ); - - private native void writeFloatDoubleAttribute(long chipClusterPtr, DefaultClusterCallback callback, Double value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeFloatDoubleAttribute(long chipClusterPtr, - DoubleAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readOctetStringAttribute(long chipClusterPtr, - OctetStringAttributeCallback callback - ); - - private native void writeOctetStringAttribute(long chipClusterPtr, DefaultClusterCallback callback, byte[] value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeOctetStringAttribute(long chipClusterPtr, - OctetStringAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readListInt8uAttribute(long chipClusterPtr, - ListInt8uAttributeCallback callback - ); - - private native void writeListInt8uAttribute(long chipClusterPtr, DefaultClusterCallback callback, ArrayList value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeListInt8uAttribute(long chipClusterPtr, - ListInt8uAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readListOctetStringAttribute(long chipClusterPtr, - ListOctetStringAttributeCallback callback - ); - - private native void writeListOctetStringAttribute(long chipClusterPtr, DefaultClusterCallback callback, ArrayList value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeListOctetStringAttribute(long chipClusterPtr, - ListOctetStringAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readListStructOctetStringAttribute(long chipClusterPtr, - ListStructOctetStringAttributeCallback callback - ); - - private native void writeListStructOctetStringAttribute(long chipClusterPtr, DefaultClusterCallback callback, ArrayList value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeListStructOctetStringAttribute(long chipClusterPtr, - ListStructOctetStringAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readLongOctetStringAttribute(long chipClusterPtr, - OctetStringAttributeCallback callback - ); - - private native void writeLongOctetStringAttribute(long chipClusterPtr, DefaultClusterCallback callback, byte[] value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeLongOctetStringAttribute(long chipClusterPtr, - OctetStringAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readCharStringAttribute(long chipClusterPtr, - CharStringAttributeCallback callback - ); - - private native void writeCharStringAttribute(long chipClusterPtr, DefaultClusterCallback callback, String value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeCharStringAttribute(long chipClusterPtr, - CharStringAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readLongCharStringAttribute(long chipClusterPtr, - CharStringAttributeCallback callback - ); - - private native void writeLongCharStringAttribute(long chipClusterPtr, DefaultClusterCallback callback, String value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeLongCharStringAttribute(long chipClusterPtr, - CharStringAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readEpochUsAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - - private native void writeEpochUsAttribute(long chipClusterPtr, DefaultClusterCallback callback, Long value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeEpochUsAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readEpochSAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - - private native void writeEpochSAttribute(long chipClusterPtr, DefaultClusterCallback callback, Long value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeEpochSAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readVendorIdAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - - private native void writeVendorIdAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeVendorIdAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readListNullablesAndOptionalsStructAttribute(long chipClusterPtr, - ListNullablesAndOptionalsStructAttributeCallback callback - ); - - private native void writeListNullablesAndOptionalsStructAttribute(long chipClusterPtr, DefaultClusterCallback callback, ArrayList value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeListNullablesAndOptionalsStructAttribute(long chipClusterPtr, - ListNullablesAndOptionalsStructAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readEnumAttrAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - - private native void writeEnumAttrAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeEnumAttrAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readRangeRestrictedInt8uAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - - private native void writeRangeRestrictedInt8uAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeRangeRestrictedInt8uAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readRangeRestrictedInt8sAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - - private native void writeRangeRestrictedInt8sAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeRangeRestrictedInt8sAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readRangeRestrictedInt16uAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - - private native void writeRangeRestrictedInt16uAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeRangeRestrictedInt16uAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readRangeRestrictedInt16sAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - - private native void writeRangeRestrictedInt16sAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeRangeRestrictedInt16sAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readListLongOctetStringAttribute(long chipClusterPtr, - ListLongOctetStringAttributeCallback callback - ); - - private native void writeListLongOctetStringAttribute(long chipClusterPtr, DefaultClusterCallback callback, ArrayList value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeListLongOctetStringAttribute(long chipClusterPtr, - ListLongOctetStringAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readListFabricScopedAttribute(long chipClusterPtr, - ListFabricScopedAttributeCallback callback - , boolean isFabricFiltered - ); - - private native void writeListFabricScopedAttribute(long chipClusterPtr, DefaultClusterCallback callback, ArrayList value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeListFabricScopedAttribute(long chipClusterPtr, - ListFabricScopedAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readTimedWriteBooleanAttribute(long chipClusterPtr, - BooleanAttributeCallback callback - ); - - private native void writeTimedWriteBooleanAttribute(long chipClusterPtr, DefaultClusterCallback callback, Boolean value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeTimedWriteBooleanAttribute(long chipClusterPtr, - BooleanAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readGeneralErrorBooleanAttribute(long chipClusterPtr, - BooleanAttributeCallback callback - ); - - private native void writeGeneralErrorBooleanAttribute(long chipClusterPtr, DefaultClusterCallback callback, Boolean value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeGeneralErrorBooleanAttribute(long chipClusterPtr, - BooleanAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readClusterErrorBooleanAttribute(long chipClusterPtr, - BooleanAttributeCallback callback - ); - - private native void writeClusterErrorBooleanAttribute(long chipClusterPtr, DefaultClusterCallback callback, Boolean value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeClusterErrorBooleanAttribute(long chipClusterPtr, - BooleanAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readUnsupportedAttribute(long chipClusterPtr, - BooleanAttributeCallback callback - ); - - private native void writeUnsupportedAttribute(long chipClusterPtr, DefaultClusterCallback callback, Boolean value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeUnsupportedAttribute(long chipClusterPtr, - BooleanAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readNullableBooleanAttribute(long chipClusterPtr, - NullableBooleanAttributeCallback callback - ); - - private native void writeNullableBooleanAttribute(long chipClusterPtr, DefaultClusterCallback callback, Boolean value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeNullableBooleanAttribute(long chipClusterPtr, - NullableBooleanAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readNullableBitmap8Attribute(long chipClusterPtr, - NullableBitmap8AttributeCallback callback - ); - - private native void writeNullableBitmap8Attribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeNullableBitmap8Attribute(long chipClusterPtr, - NullableBitmap8AttributeCallback callback - , int minInterval, int maxInterval); - - private native void readNullableBitmap16Attribute(long chipClusterPtr, - NullableBitmap16AttributeCallback callback - ); - - private native void writeNullableBitmap16Attribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeNullableBitmap16Attribute(long chipClusterPtr, - NullableBitmap16AttributeCallback callback - , int minInterval, int maxInterval); - - private native void readNullableBitmap32Attribute(long chipClusterPtr, - NullableBitmap32AttributeCallback callback - ); - - private native void writeNullableBitmap32Attribute(long chipClusterPtr, DefaultClusterCallback callback, Long value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeNullableBitmap32Attribute(long chipClusterPtr, - NullableBitmap32AttributeCallback callback - , int minInterval, int maxInterval); - - private native void readNullableBitmap64Attribute(long chipClusterPtr, - NullableBitmap64AttributeCallback callback - ); - - private native void writeNullableBitmap64Attribute(long chipClusterPtr, DefaultClusterCallback callback, Long value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeNullableBitmap64Attribute(long chipClusterPtr, - NullableBitmap64AttributeCallback callback - , int minInterval, int maxInterval); - - private native void readNullableInt8uAttribute(long chipClusterPtr, - NullableInt8uAttributeCallback callback - ); - - private native void writeNullableInt8uAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeNullableInt8uAttribute(long chipClusterPtr, - NullableInt8uAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readNullableInt16uAttribute(long chipClusterPtr, - NullableInt16uAttributeCallback callback - ); - - private native void writeNullableInt16uAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeNullableInt16uAttribute(long chipClusterPtr, - NullableInt16uAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readNullableInt24uAttribute(long chipClusterPtr, - NullableInt24uAttributeCallback callback - ); - - private native void writeNullableInt24uAttribute(long chipClusterPtr, DefaultClusterCallback callback, Long value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeNullableInt24uAttribute(long chipClusterPtr, - NullableInt24uAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readNullableInt32uAttribute(long chipClusterPtr, - NullableInt32uAttributeCallback callback - ); - - private native void writeNullableInt32uAttribute(long chipClusterPtr, DefaultClusterCallback callback, Long value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeNullableInt32uAttribute(long chipClusterPtr, - NullableInt32uAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readNullableInt40uAttribute(long chipClusterPtr, - NullableInt40uAttributeCallback callback - ); - - private native void writeNullableInt40uAttribute(long chipClusterPtr, DefaultClusterCallback callback, Long value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeNullableInt40uAttribute(long chipClusterPtr, - NullableInt40uAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readNullableInt48uAttribute(long chipClusterPtr, - NullableInt48uAttributeCallback callback - ); - - private native void writeNullableInt48uAttribute(long chipClusterPtr, DefaultClusterCallback callback, Long value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeNullableInt48uAttribute(long chipClusterPtr, - NullableInt48uAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readNullableInt56uAttribute(long chipClusterPtr, - NullableInt56uAttributeCallback callback - ); - - private native void writeNullableInt56uAttribute(long chipClusterPtr, DefaultClusterCallback callback, Long value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeNullableInt56uAttribute(long chipClusterPtr, - NullableInt56uAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readNullableInt64uAttribute(long chipClusterPtr, - NullableInt64uAttributeCallback callback - ); - - private native void writeNullableInt64uAttribute(long chipClusterPtr, DefaultClusterCallback callback, Long value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeNullableInt64uAttribute(long chipClusterPtr, - NullableInt64uAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readNullableInt8sAttribute(long chipClusterPtr, - NullableInt8sAttributeCallback callback - ); - - private native void writeNullableInt8sAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeNullableInt8sAttribute(long chipClusterPtr, - NullableInt8sAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readNullableInt16sAttribute(long chipClusterPtr, - NullableInt16sAttributeCallback callback - ); - - private native void writeNullableInt16sAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeNullableInt16sAttribute(long chipClusterPtr, - NullableInt16sAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readNullableInt24sAttribute(long chipClusterPtr, - NullableInt24sAttributeCallback callback - ); - - private native void writeNullableInt24sAttribute(long chipClusterPtr, DefaultClusterCallback callback, Long value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeNullableInt24sAttribute(long chipClusterPtr, - NullableInt24sAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readNullableInt32sAttribute(long chipClusterPtr, - NullableInt32sAttributeCallback callback - ); - - private native void writeNullableInt32sAttribute(long chipClusterPtr, DefaultClusterCallback callback, Long value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeNullableInt32sAttribute(long chipClusterPtr, - NullableInt32sAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readNullableInt40sAttribute(long chipClusterPtr, - NullableInt40sAttributeCallback callback - ); - - private native void writeNullableInt40sAttribute(long chipClusterPtr, DefaultClusterCallback callback, Long value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeNullableInt40sAttribute(long chipClusterPtr, - NullableInt40sAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readNullableInt48sAttribute(long chipClusterPtr, - NullableInt48sAttributeCallback callback - ); - - private native void writeNullableInt48sAttribute(long chipClusterPtr, DefaultClusterCallback callback, Long value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeNullableInt48sAttribute(long chipClusterPtr, - NullableInt48sAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readNullableInt56sAttribute(long chipClusterPtr, - NullableInt56sAttributeCallback callback - ); - - private native void writeNullableInt56sAttribute(long chipClusterPtr, DefaultClusterCallback callback, Long value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeNullableInt56sAttribute(long chipClusterPtr, - NullableInt56sAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readNullableInt64sAttribute(long chipClusterPtr, - NullableInt64sAttributeCallback callback - ); - - private native void writeNullableInt64sAttribute(long chipClusterPtr, DefaultClusterCallback callback, Long value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeNullableInt64sAttribute(long chipClusterPtr, - NullableInt64sAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readNullableEnum8Attribute(long chipClusterPtr, - NullableEnum8AttributeCallback callback - ); - - private native void writeNullableEnum8Attribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeNullableEnum8Attribute(long chipClusterPtr, - NullableEnum8AttributeCallback callback - , int minInterval, int maxInterval); - - private native void readNullableEnum16Attribute(long chipClusterPtr, - NullableEnum16AttributeCallback callback - ); - - private native void writeNullableEnum16Attribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeNullableEnum16Attribute(long chipClusterPtr, - NullableEnum16AttributeCallback callback - , int minInterval, int maxInterval); - - private native void readNullableFloatSingleAttribute(long chipClusterPtr, - NullableFloatSingleAttributeCallback callback - ); - - private native void writeNullableFloatSingleAttribute(long chipClusterPtr, DefaultClusterCallback callback, Float value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeNullableFloatSingleAttribute(long chipClusterPtr, - NullableFloatSingleAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readNullableFloatDoubleAttribute(long chipClusterPtr, - NullableFloatDoubleAttributeCallback callback - ); - - private native void writeNullableFloatDoubleAttribute(long chipClusterPtr, DefaultClusterCallback callback, Double value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeNullableFloatDoubleAttribute(long chipClusterPtr, - NullableFloatDoubleAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readNullableOctetStringAttribute(long chipClusterPtr, - NullableOctetStringAttributeCallback callback - ); - - private native void writeNullableOctetStringAttribute(long chipClusterPtr, DefaultClusterCallback callback, byte[] value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeNullableOctetStringAttribute(long chipClusterPtr, - NullableOctetStringAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readNullableCharStringAttribute(long chipClusterPtr, - NullableCharStringAttributeCallback callback - ); - - private native void writeNullableCharStringAttribute(long chipClusterPtr, DefaultClusterCallback callback, String value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeNullableCharStringAttribute(long chipClusterPtr, - NullableCharStringAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readNullableEnumAttrAttribute(long chipClusterPtr, - NullableEnumAttrAttributeCallback callback - ); - - private native void writeNullableEnumAttrAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeNullableEnumAttrAttribute(long chipClusterPtr, - NullableEnumAttrAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readNullableRangeRestrictedInt8uAttribute(long chipClusterPtr, - NullableRangeRestrictedInt8uAttributeCallback callback - ); - - private native void writeNullableRangeRestrictedInt8uAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeNullableRangeRestrictedInt8uAttribute(long chipClusterPtr, - NullableRangeRestrictedInt8uAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readNullableRangeRestrictedInt8sAttribute(long chipClusterPtr, - NullableRangeRestrictedInt8sAttributeCallback callback - ); - - private native void writeNullableRangeRestrictedInt8sAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeNullableRangeRestrictedInt8sAttribute(long chipClusterPtr, - NullableRangeRestrictedInt8sAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readNullableRangeRestrictedInt16uAttribute(long chipClusterPtr, - NullableRangeRestrictedInt16uAttributeCallback callback - ); - - private native void writeNullableRangeRestrictedInt16uAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeNullableRangeRestrictedInt16uAttribute(long chipClusterPtr, - NullableRangeRestrictedInt16uAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readNullableRangeRestrictedInt16sAttribute(long chipClusterPtr, - NullableRangeRestrictedInt16sAttributeCallback callback - ); - - private native void writeNullableRangeRestrictedInt16sAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeNullableRangeRestrictedInt16sAttribute(long chipClusterPtr, - NullableRangeRestrictedInt16sAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readWriteOnlyInt8uAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - - private native void writeWriteOnlyInt8uAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeWriteOnlyInt8uAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - ); - private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - ); - private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - ); - private native void subscribeEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - ); - private native void subscribeAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - } - - public static class FaultInjectionCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 0xFFF1FC06L; - - public FaultInjectionCluster(long devicePtr, int endpointId) { - super(devicePtr, endpointId); - } - - @Override - public native long initWithDevice(long devicePtr, int endpointId); - - public void failAtFault(DefaultClusterCallback callback - , Integer type, Long id, Long numCallsToSkip, Long numCallsToFail, Boolean takeMutex) { - failAtFault(chipClusterPtr, callback, type, id, numCallsToSkip, numCallsToFail, takeMutex, null); - } - - public void failAtFault(DefaultClusterCallback callback - , Integer type, Long id, Long numCallsToSkip, Long numCallsToFail, Boolean takeMutex - , int timedInvokeTimeoutMs) { - failAtFault(chipClusterPtr, callback, type, id, numCallsToSkip, numCallsToFail, takeMutex, timedInvokeTimeoutMs); - } - - public void failRandomlyAtFault(DefaultClusterCallback callback - , Integer type, Long id, Integer percentage) { - failRandomlyAtFault(chipClusterPtr, callback, type, id, percentage, null); - } - - public void failRandomlyAtFault(DefaultClusterCallback callback - , Integer type, Long id, Integer percentage - , int timedInvokeTimeoutMs) { - failRandomlyAtFault(chipClusterPtr, callback, type, id, percentage, timedInvokeTimeoutMs); - } - private native void failAtFault(long chipClusterPtr, DefaultClusterCallback Callback - , Integer type, Long id, Long numCallsToSkip, Long numCallsToFail, Boolean takeMutex - , @Nullable Integer timedInvokeTimeoutMs); - private native void failRandomlyAtFault(long chipClusterPtr, DefaultClusterCallback Callback - , Integer type, Long id, Integer percentage - , @Nullable Integer timedInvokeTimeoutMs); - - public interface GeneratedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AcceptedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface EventListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AttributeListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - - public void readGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - ) { - readGeneratedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - ) { - readAcceptedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readEventListAttribute( - EventListAttributeCallback callback - ) { - readEventListAttribute(chipClusterPtr, callback); - } - public void subscribeEventListAttribute( - EventListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAttributeListAttribute( - AttributeListAttributeCallback callback - ) { - readAttributeListAttribute(chipClusterPtr, callback); - } - public void subscribeAttributeListAttribute( - AttributeListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readFeatureMapAttribute( - LongAttributeCallback callback - ) { - readFeatureMapAttribute(chipClusterPtr, callback); - } - public void subscribeFeatureMapAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readClusterRevisionAttribute( - IntegerAttributeCallback callback - ) { - readClusterRevisionAttribute(chipClusterPtr, callback); - } - public void subscribeClusterRevisionAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - private native void readGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - ); - private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - ); - private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - ); - private native void subscribeEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - ); - private native void subscribeAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - } - - public static class SampleMeiCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 0xFFF1FC20L; - - public SampleMeiCluster(long devicePtr, int endpointId) { - super(devicePtr, endpointId); - } - - @Override - public native long initWithDevice(long devicePtr, int endpointId); - - public void ping(DefaultClusterCallback callback - ) { - ping(chipClusterPtr, callback, null); - } - - public void ping(DefaultClusterCallback callback - - , int timedInvokeTimeoutMs) { - ping(chipClusterPtr, callback, timedInvokeTimeoutMs); - } - - public void addArguments(AddArgumentsResponseCallback callback - , Integer arg1, Integer arg2) { - addArguments(chipClusterPtr, callback, arg1, arg2, null); - } - - public void addArguments(AddArgumentsResponseCallback callback - , Integer arg1, Integer arg2 - , int timedInvokeTimeoutMs) { - addArguments(chipClusterPtr, callback, arg1, arg2, timedInvokeTimeoutMs); - } - private native void ping(long chipClusterPtr, DefaultClusterCallback Callback - - , @Nullable Integer timedInvokeTimeoutMs); - private native void addArguments(long chipClusterPtr, AddArgumentsResponseCallback Callback - , Integer arg1, Integer arg2 - , @Nullable Integer timedInvokeTimeoutMs); - public interface AddArgumentsResponseCallback { - void onSuccess(Integer returnValue); - - void onError(Exception error); - } - - - public interface GeneratedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AcceptedCommandListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface EventListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface AttributeListAttributeCallback { - void onSuccess( List valueList); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - - public void readFlipFlopAttribute( - BooleanAttributeCallback callback - ) { - readFlipFlopAttribute(chipClusterPtr, callback); - } - public void writeFlipFlopAttribute(DefaultClusterCallback callback, Boolean value) { - writeFlipFlopAttribute(chipClusterPtr, callback, value, null); - } - - public void writeFlipFlopAttribute(DefaultClusterCallback callback, Boolean value, int timedWriteTimeoutMs) { - writeFlipFlopAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeFlipFlopAttribute( - BooleanAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeFlipFlopAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - ) { - readGeneratedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - ) { - readAcceptedCommandListAttribute(chipClusterPtr, callback); - } - public void subscribeAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readEventListAttribute( - EventListAttributeCallback callback - ) { - readEventListAttribute(chipClusterPtr, callback); - } - public void subscribeEventListAttribute( - EventListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readAttributeListAttribute( - AttributeListAttributeCallback callback - ) { - readAttributeListAttribute(chipClusterPtr, callback); - } - public void subscribeAttributeListAttribute( - AttributeListAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readFeatureMapAttribute( - LongAttributeCallback callback - ) { - readFeatureMapAttribute(chipClusterPtr, callback); - } - public void subscribeFeatureMapAttribute( - LongAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readClusterRevisionAttribute( - IntegerAttributeCallback callback - ) { - readClusterRevisionAttribute(chipClusterPtr, callback); - } - public void subscribeClusterRevisionAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - private native void readFlipFlopAttribute(long chipClusterPtr, - BooleanAttributeCallback callback - ); - - private native void writeFlipFlopAttribute(long chipClusterPtr, DefaultClusterCallback callback, Boolean value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeFlipFlopAttribute(long chipClusterPtr, - BooleanAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - ); - private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, - GeneratedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - ); - private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, - AcceptedCommandListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - ); - private native void subscribeEventListAttribute(long chipClusterPtr, - EventListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - ); - private native void subscribeAttributeListAttribute(long chipClusterPtr, - AttributeListAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback - ); - private native void subscribeFeatureMapAttribute(long chipClusterPtr, - LongAttributeCallback callback -, int minInterval, int maxInterval); - - private native void readClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeClusterRevisionAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - } -} diff --git a/zzz_generated/app-common/app-common/zap-generated/callback.h b/zzz_generated/app-common/app-common/zap-generated/callback.h index 33f6cfaa4a01f5..e6313f4fbd04a4 100644 --- a/zzz_generated/app-common/app-common/zap-generated/callback.h +++ b/zzz_generated/app-common/app-common/zap-generated/callback.h @@ -5428,30 +5428,6 @@ bool emberAfTimerClusterAddTimeCallback(chip::app::CommandHandler * commandObj, bool emberAfTimerClusterReduceTimeCallback(chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, const chip::app::Clusters::Timer::Commands::ReduceTime::DecodableType & commandData); -/** - * @brief Oven Cavity Operational State Cluster Pause Command callback (from client) - */ -bool emberAfOvenCavityOperationalStateClusterPauseCallback( - chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, - const chip::app::Clusters::OvenCavityOperationalState::Commands::Pause::DecodableType & commandData); -/** - * @brief Oven Cavity Operational State Cluster Stop Command callback (from client) - */ -bool emberAfOvenCavityOperationalStateClusterStopCallback( - chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, - const chip::app::Clusters::OvenCavityOperationalState::Commands::Stop::DecodableType & commandData); -/** - * @brief Oven Cavity Operational State Cluster Start Command callback (from client) - */ -bool emberAfOvenCavityOperationalStateClusterStartCallback( - chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, - const chip::app::Clusters::OvenCavityOperationalState::Commands::Start::DecodableType & commandData); -/** - * @brief Oven Cavity Operational State Cluster Resume Command callback (from client) - */ -bool emberAfOvenCavityOperationalStateClusterResumeCallback( - chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, - const chip::app::Clusters::OvenCavityOperationalState::Commands::Resume::DecodableType & commandData); /** * @brief Mode Select Cluster ChangeToMode Command callback (from client) */ From 9c94fe62a2a4ecca2ba9d5db2d175ef213add5c2 Mon Sep 17 00:00:00 2001 From: shgutte <102281713+shgutte@users.noreply.github.com> Date: Thu, 18 Jan 2024 23:02:30 +0530 Subject: [PATCH 11/25] [Silabs] [Wi-Fi] [SiWx917] Added fix for slow advertisement on 917 NCP (#31501) * Added fix for slow advertisement * Added changes for the BLE error issue for SOC * Restyled by clang-format --------- Co-authored-by: Restyled.io --- src/platform/silabs/rs911x/BLEManagerImpl.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/platform/silabs/rs911x/BLEManagerImpl.cpp b/src/platform/silabs/rs911x/BLEManagerImpl.cpp index bc79b1429ff94a..a32d46b30f2715 100644 --- a/src/platform/silabs/rs911x/BLEManagerImpl.cpp +++ b/src/platform/silabs/rs911x/BLEManagerImpl.cpp @@ -656,7 +656,7 @@ CHIP_ERROR BLEManagerImpl::ConfigureAdvertisingData(void) CHIP_ERROR BLEManagerImpl::StartAdvertising(void) { - CHIP_ERROR err; + CHIP_ERROR err = CHIP_NO_ERROR; int32_t status = 0; ChipLogProgress(DeviceLayer, "StartAdvertising start"); @@ -675,8 +675,11 @@ CHIP_ERROR BLEManagerImpl::StartAdvertising(void) ChipLogDetail(DeviceLayer, "Start BLE advertissement"); } - err = ConfigureAdvertisingData(); - SuccessOrExit(err); + if (!(mFlags.Has(Flags::kAdvertising))) + { + err = ConfigureAdvertisingData(); + SuccessOrExit(err); + } mFlags.Clear(Flags::kRestartAdvertising); From a0334268f379bbac96b8bf9161a501f29d0298bb Mon Sep 17 00:00:00 2001 From: jamesharrow <93921463+jamesharrow@users.noreply.github.com> Date: Thu, 18 Jan 2024 18:31:55 +0000 Subject: [PATCH 12/25] EVSE update zap xml to reflect latest spec (ChargingTargetStruct) and removed 2 attributes (#31406) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Fix #30665 (EVSE) - Changed to use amperage_mA, energy_mWh - removed max on epoch_s - removed access for operate - removed side for events * Fix #30665 updates to try to get further with ZAP and autogen, but still fails with some parts of regen_all * Added ember-compatibility-functions.cpp which was missing. * Made all types all lowercase to resolve regen_all issues. * Fixed lint issue (trailing whitespace). * Added Device Energy Management server.cpp, added to all-clusters-app.zap and regen_all * Restyled by whitespace * Restyled by clang-format * Fixes based on similar conversations on EVSE review. Made Forecast and PowerAdjustmentCapability Nullable attributes. Added feature support. * Added delegate class to all-clusters-app * Changed ChipLogProgress to Error. Better handling of EnumerateCommands * Aligned EVSE XML to same state as PR#30857 (includes SessionID being Nullable etc and in Fault Event). * Updated Device Energy Management XML to use power_mw, energy_mwh per spec definition. * Updated controller-clusters.zap * regen_all.py * Restyled by whitespace * Regen_all after merging in changes for XML * Fixed types to be signed=true * Fixed 31032 - revert removal of side="server". * regen_all.py * Added Device Energy Management cluster back into all-clusters.zap and regen_all after merging from master. * Compiles but doesn't work. Needs stub to instantiate class * Fixed EnumerateCommands to allow optional ModifyForecastRequest and RequestConstraintBasedForecast commands * Fixed InvokeCommand issues to allow optional commands. * Improved HandleModifyForecastRequest and HandleRequestConstraintBasedForecast in sdk * Updates to add DeviceEnergyManagement to all-clusters. * Compiles and links * Sync file in energy-management-app * Updated DEM to support SetPowerAdjustmentCapability and SetForecast methods. * Updated based on review comments. Changed Epoch to be Matter 2000 based epochs. * Turned on commands in DEM. Added DEM cluster server to energy-management-app. * Added more comments to Delegate to describe expected behaviour. * Updated BUILD.gn to remove duplicated files from all-clusters-common and energy-management-common * Aim to fix compile issues on other platforms due to logging of %d * Restyled by gn * Updated build files to remove duplicate copies from all-clusters-common to energy-management-common * Fixed ESP32 include path * Added DEM into energy-management-app - refactored main.cpp. * Added DEM into EVSEManufacturerImpl.h * Fix - avoid using global namespace in header file * Restyled by gn * Updated CMakeLists.txt to remove duplicate energy-management files. * Added device-energy-management-server to ESP32 all-clusters CMakeLists.txt * Removed return at end of void function. * Added include to all-clusters-minimal in ESP32 * Removed __FUNCTION__ from logs * Removed stray %s * Added FeatureMap handling in sdk (not in ember) * Removed extra chip:: * Used CHIP_ERROR_FORMAT, err.Format() mechanism * Refactored StartTimeAdjust based on review comments. * Removed unnecessary Write Attributes function * Beginnings of Session handling * Added beginnings of EVConnected,EVNotDetected,EnergyTransferStarted,EnergyTransferStopped handling. State machine is not finished. Callback to read Energy Meter added * Added framework for EVSE Test Event triggers * Added EnergyEvseTestEventTrigger delegates * Restyled by whitespace * Restyled by gn * Added :energy-evse-test-event-trigger to public_deps to see if it resolves build errors * Restyled by gn * Fixed Darwin compile error - do not use else after return * Refactored code so that the EvseManufacturer instance could be retrieved for Test Event triggers * Started adding TC_EEVSE_2_2.py * Updated TC_EEVSE_2_2.py to support test events. Still needs to handle reading of Logged Events and verifying they are correct. * Refactored Handling of TestEvents to allow clear, and better error handling. * Refactored state handling by decomposing into state machine events where similar functions are performed based on state transition. Fixed TC chargingEnabledUntil cast to int. Note gets to step 6e * Fixed step 6e caused by not setting the cable limit / maxHardwareCurrentLimit in test events * Added comment to clarify purpose and definition of test eventtrigger field values. * Fixed several bugs in test script * Made SetChargingEnabledUntil take a nullable type. * Removed Reference to step 5c, and moved reading of SessionID to step 4b. More TC_EEVSE_2_2 bug fixes. Added event checking. Still fails at step 14. Does not have enable timeout timer implemented * Fixed issue with not detecting 2nd plug in event, and session ID not incrementing. Now test case passes all the way. * Restyled by isort * Made some attributes persisted per spec. * Added attributes to zcl.json to mark them as implemented in attributeAccessInterfaceAttributes * Ran regen_all.py after changing zcl.json * Fixed incorrect type - not picked up by all compilers. * Re-ran bootstrap, and then regen-all - to pick up more zap generated fixes * Added provisional handling for Faults * Added new test event triggers to help test Fault and Diagnostics * Added TC_EEVSE_2_4 * Fix lint issue - unused datetime modules. * Committed suggested change to comment * Added TC_EEVSE_2_5.py to support DiagnosticsCommand testing. Also changed the SupplyState reverting to Disabled once diagnostics is complete to match the spec. * Created a helper EEVSE base class to avoid repetition in the different test cases. * Restyled by isort * Fixed Lint issues * Revamped TC_EEVSE_2_5 to match spec behaviour (cannot start diagnostics unless Disabled). Also removed hard-coded endpoint ids in Utils * Implemented timer to disable the EVSE automatically. * Added documentation to cover concern about long-lived bytespan in enableKey * Fixed Lint and build issues on other platforms * Restyled by isort * Implemented some of the feedback on PR * Refactored HwSetState to use nested switch statements to be clear that all enums are caught. * Fixed error messages * Test scripts: Removed hardcoded endpoint 1 (use --endpoint 1 in args), allowed the enableKey to be passed in using --hex-arg enableKey:000102030405060708090a0b0c0d0e0f * Made enum class for callbacks and improved documentation comments based on feedback. * Fixed another python lint issue. * Updated README.md with help on how to build for test event triggers, using chip-repl and python testing. * Tweaks to README.md to avoid Myst syntax highlighting issues. * Improved error logging around GetEpochTS() * Made main use std::unique_ptr instead of using new/delete per PR comments. Also moved GetEVSEManufacturer declaration to header file. * Fixing MISSPELL issues in README.md * Small change missed in main.cpp missed in unique_ptr change. * Changed all-clusters app stubs to use unique_ptr style instead of new/delete. * Removed unhelpful comment * Restyled by whitespace * Fixes #31061 Updated DEVICE_TYPE to 0x050C now this has been allocated * Fixes #31061 Updated DEVICE_TYPE to 0x050C now this has been allocated * Updated energy-evse-cluster.xml to use latest EnergyEVSE.adoc which removes numberOfWeeklyTargets, numberOfDailyTargets, and adds new ChargingTargetScheduleStruct in Get/Set/Clear Target commands * Removed min/max for Randomisation window due to ZAP bug that doesn't allow more than 2 bytes. * Added missing new Java files * Changed DayOfWeekforSequence -> DayOfWeekForSequence in XML. Regen-all * Python testing: Add helper functions for marking steps as skipped in the TH (#31373) * Add two new helper functions for marking steps skipped * python testing: Add helper functions for skipped steps * Do not use gen_config.h directly. (#31401) * Do not use gen_config.h directly. Apparently the right file is config.h, which includes the gen file. * Restyled by clang-format --------- Co-authored-by: Restyled.io * Bump third_party/ot-br-posix/repo from `657e775` to `58822dc` (#31420) Bumps [third_party/ot-br-posix/repo](https://github.com/openthread/ot-br-posix) from `657e775` to `58822dc`. - [Release notes](https://github.com/openthread/ot-br-posix/releases) - [Commits](https://github.com/openthread/ot-br-posix/compare/657e775cd9ca757af7487da2fb039aee645c3d65...58822dce1934568523bf1389c039f249e1d979ad) --- updated-dependencies: - dependency-name: third_party/ot-br-posix/repo dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump third_party/imgui/repo from `240ab58` to `6228c2e` (#31418) Bumps [third_party/imgui/repo](https://github.com/ocornut/imgui) from `240ab58` to `6228c2e`. - [Release notes](https://github.com/ocornut/imgui/releases) - [Commits](https://github.com/ocornut/imgui/compare/240ab5890b2e8da294937a1710b021ac3f271472...6228c2e1ec7ef21ca1809579c055ed34540dedb0) --- updated-dependencies: - dependency-name: third_party/imgui/repo dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump third_party/pigweed/repo from `cbbc73d` to `9640cde` (#31414) Bumps [third_party/pigweed/repo](https://github.com/google/pigweed) from `cbbc73d` to `9640cde`. - [Commits](https://github.com/google/pigweed/compare/cbbc73dc4d56bc201e9d50c4b10db974aff82754...9640cdef100f87d7987875d3a418931d6500e5b2) --- updated-dependencies: - dependency-name: third_party/pigweed/repo dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * [Chef] Fix variable may be used without initialization (#31413) * Fix variable may be used without initialization * Restyled by clang-format --------- Co-authored-by: Restyled.io * Bump third_party/nanopb/repo from `cf26d28` to `423c03b` (#31421) Bumps [third_party/nanopb/repo](https://github.com/nanopb/nanopb) from `cf26d28` to `423c03b`. - [Commits](https://github.com/nanopb/nanopb/compare/cf26d28b88010dd3ac94e0cba64d4a71522154bc...423c03b626a861a7b3a08a2d411e23aefd58827b) --- updated-dependencies: - dependency-name: third_party/nanopb/repo dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Test_TC_DGWIFI_2_1 WiFiVersion enum8 maxValue should be 6 (#31364) * WiFiVersion enum8 maxValue should be 6 Matter Spec 1.2 Section 11.14.5.2. WiFiVersionEnum Type ranges from 0 (802.11a) to 6 (802.11ah) * Update command.h darwin zap-genersated WiFiVersion * Handle energy type naming in data model xml handlers (#31344) * Correct case names for enerty types in data model handlers. * Add unit test * restyle * [nrfconnect] Switch unit tests to PSA crypto (#31408) * [nrfconnect] Switch unit tests to PSA crypto Switch nRF Connect unit tests to PSA crypto backend since legacy mbedTLS is already tested on many platforms. Additionally, clean the configuration of nRF Connect test runner by removing some redundant configurations and better grouping the items. * Restyled by gn --------- Co-authored-by: Restyled.io * Bump third_party/libwebsockets/repo from `f18fc23` to `49bfef2` (#31417) Bumps [third_party/libwebsockets/repo](https://github.com/warmcat/libwebsockets) from `f18fc23` to `49bfef2`. - [Commits](https://github.com/warmcat/libwebsockets/compare/f18fc2316f9743624ced9ba934595f7b9ba8cd05...49bfef2ecd51b854b63e35d913849b6bb518a7f6) --- updated-dependencies: - dependency-name: third_party/libwebsockets/repo dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Add initial valve cluster implementation (#30562) * added first version of valve configuration and control cluster * added first version of boolean sensor configuration cluster XML and updated event descriptions for valve config and control cluster * fixed wrong attribute name Co-authored-by: Boris Zbarsky * fixed typo Co-authored-by: Boris Zbarsky * removed StartUpLevel attribute and added optional OpenDuration command args * use allocated cluster ID * added code generating bits * added new device types * restyle * added BooleanSensorConfiguration and ValveConfigurationAndControl clusters to all-clusters-app * - fixed wrong attribute name caused by copy paste - min/max is not allowed for attributes with size larger than 2 bytes * regenerate all * added initial implementation for the new clusters * apply provisional property to new clusters * fixed typo Co-authored-by: Boris Zbarsky * removed empty implementation, removed clusters from all-clusters-app * added a skeleton implementation * fixed typo Co-authored-by: Boris Zbarsky * fixed typos and regen all * fixes based on PR comments * added descriptor cluster to valve device type * updated zap and idl files to fixed typo in command name * close to final implementation, needs careful going through * activate alarms if enabled, added API for sensor fault event, clean-up * WIP * Implemented open command * finalize initial implementation * added all-clusters-app example for valve device * added null checking * added attribute changed callback and fixed some bugs after testing * did a regen and fixed rebase issue * restyle * added missed generated code by previous commits * attempt to fix failing CI * restyle * add a missed zap gen output * removed redundant return * update valve configuration and control cluster according to latest spec * remove boolean sensor config cluster implementation and into a separate PR * DefaultOpenDuration is writable and updated device type name to Water Valve * updated code to latest spec * changed RemainingDuration to be handled by AttributeAccessInterface * WIP RemainingDuration * moved domain to be the first element * update to the latest spec changes, removed attribute changed callback, handle remainingduration in AAI * added LevelStep attribute in all-clusters-app * removed unused code * set default null values in ZAP * Added transition handling in Delegate * Reworked AutoTimeClose handling in SetValveLevel * Changed include * added mechanism to signal UTCTime change in timesync cluster --------- Co-authored-by: Boris Zbarsky Co-authored-by: fessehat Co-authored-by: René Josefsen Co-authored-by: René Josefsen <69624991+ReneJosefsen@users.noreply.github.com> * Bump third_party/mbedtls/repo from `ffb18d2` to `56fd26c` (#31422) Bumps [third_party/mbedtls/repo](https://github.com/ARMmbed/mbedtls) from `ffb18d2` to `56fd26c`. - [Release notes](https://github.com/ARMmbed/mbedtls/releases) - [Commits](https://github.com/ARMmbed/mbedtls/compare/ffb18d2012909c05277a1e16dc6ba23dc8ba2854...56fd26cee97531f223071b91ed108dc1e22e7a85) --- updated-dependencies: - dependency-name: third_party/mbedtls/repo dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * [K32W0] SDK 2.6.13 additional changes (#31382) * [K32W] Fix a corner case when switching the TLV processors After the current block is processed, if the block size is 0, it means that the processed data was a multiple of received BDX block size (e.g. 8 blocks of 1024 bytes were transferred). After state for selecting next processor is reset, a request for fetching next data must be sent. Signed-off-by: marius-alex-tache * [K32W] Make Validate public Change access modifier of Validate to public, to be used by K32W0 for factory data validation after factory data OTA. Signed-off-by: marius-alex-tache * [K32W0] Add CRC validation during factory data OTA After factory data is copied into internal flash, call Validate to ensure the CRC of factory data matches the CRC in the header. If the check fails, then OTA is aborted and factory data is restored to previous version. Signed-off-by: marius-alex-tache * [K32W0] Add additional check for provider pointer Signed-off-by: marius-alex-tache * [K32W0] Change root node revision to 2 Signed-off-by: marius-alex-tache * [K32W] Expose SearchForId in factory data provider public API Removed additional checks on tags with the assumption that factory data is strictly checked at manufacturing time. Applications can now use the public API to search the factory data section for an id, e.g. in the case of custom factory data provider, where the app has additional factory data information besides the default one. Signed-off-by: marius-alex-tache * [K32W0] Refactor custom factory data provider The example now leverages the actual factory data provider API to search the factory data section for some custom ids. Signed-off-by: marius-alex-tache * [K32W] Add platform support for Product Appearance Implement GetProductFinish and GetProductPrimaryColor defined in DeviceInstanceInfoProvider. Signed-off-by: marius-alex-tache * [K32W] Remove maxLengths array This array was used to store the maximum length of factory data fields. It's no longer used, with the assumption that the factory data is strictly checked in manufacturing. Signed-off-by: marius-alex-tache * [K32W0] Remove usage of maxLength array Signed-off-by: marius-alex-tache * [K32W0] remove unused code in LowPowerHook.cpp file * [K32W0] use Encoding::HexToBytes to parse the ota encryption key * [K32W0] remove extra PWR_DisallowDeviceToSleep() which will cause unsleep after commissioning * [K32W] Revert removal of disallow to sleep and enclose it in specific tag Only call disallow to sleep when the platform is K32W1. Signed-off-by: marius-alex-tache * [K32W0] Update reference app readme files This is a minor improvement to the building instructions. It aims to clarify the usage of west SDK or package SDK. Signed-off-by: marius-alex-tache * [K32W0] Fix ICD parameters Name of the ICD parameters were updated according with the latest stack updates. Signed-off-by: Andrei Menzopol * Restyled by clang-format * Restyled by gn * Restyled by prettier-markdown * [K32W0] Fix gn check error Signed-off-by: marius-alex-tache * Restyled by gn * [K32W1] Fix gn check errors Signed-off-by: marius-alex-tache * Restyled by gn * [K32W1] Fix another gn error Signed-off-by: marius-alex-tache * Restyled by gn * [K32W] Send a report before resetting the device during OTA State-transition event from Downloading to Applying was not successfully sent to a subscriber during OTA because the device would reset before actually sending the ReportData message. Added an explicit call to handle server shutting down, which will sync send all events. Signed-off-by: marius-alex-tache * Restyled by clang-format * [K32W0] Remove deprecated dependency Signed-off-by: marius-alex-tache * [K32W1] Remove deprecated dependency Signed-off-by: marius-alex-tache * Restyled by gn --------- Signed-off-by: marius-alex-tache Signed-off-by: Andrei Menzopol Co-authored-by: Damien Vagner Co-authored-by: tanyue518 Co-authored-by: Ethan Tan Co-authored-by: Andrei Menzopol Co-authored-by: Restyled.io * For CFFI in chip-repl, remove variadic arguments (#31159) * Updated energy-evse-cluster.xml to use latest EnergyEVSE.adoc which removes numberOfWeeklyTargets, numberOfDailyTargets, and adds new ChargingTargetScheduleStruct in Get/Set/Clear Target commands * Removed optional=true in xml for DayOfWeekForSequence & ChargingTargets in ChargingTargetScheduleStruct * Small correction to description in test case. * Updated energy-evse-cluster.xml to use latest EnergyEVSE.adoc which removes numberOfWeeklyTargets, numberOfDailyTargets, and adds new ChargingTargetScheduleStruct in Get/Set/Clear Target commands * Removed min/max for Randomisation window due to ZAP bug that doesn't allow more than 2 bytes. * Added missing new Java files * Changed DayOfWeekforSequence -> DayOfWeekForSequence in XML. Regen-all * Updated energy-evse-cluster.xml to use latest EnergyEVSE.adoc which removes numberOfWeeklyTargets, numberOfDailyTargets, and adds new ChargingTargetScheduleStruct in Get/Set/Clear Target commands * Removed optional=true in xml for DayOfWeekForSequence & ChargingTargets in ChargingTargetScheduleStruct * Update examples/energy-management-app/energy-management-common/include/EnergyEvseDelegateImpl.h Co-authored-by: Boris Zbarsky * Touched file to retrigger restyled job * Removed whitespace which was added to trigger restyled to rerun * Removed potentially unsafe code before merging into PR #30957 * Renamed variable and replaced auto with type so it is clearer to reader. * Restyled by clang-format --------- Signed-off-by: dependabot[bot] Signed-off-by: marius-alex-tache Signed-off-by: Andrei Menzopol Co-authored-by: Restyled.io Co-authored-by: C Freeman Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Erwin Pan Co-authored-by: simonhmorris1 <112178216+simonhmorris1@users.noreply.github.com> Co-authored-by: Andrei Litvin Co-authored-by: Damian Królik <66667989+Damian-Nordic@users.noreply.github.com> Co-authored-by: fesseha-eve <88329315+fessehaeve@users.noreply.github.com> Co-authored-by: Boris Zbarsky Co-authored-by: fessehat Co-authored-by: René Josefsen Co-authored-by: René Josefsen <69624991+ReneJosefsen@users.noreply.github.com> Co-authored-by: Marius Tache <102153746+marius-alex-tache@users.noreply.github.com> Co-authored-by: Damien Vagner Co-authored-by: tanyue518 Co-authored-by: Ethan Tan Co-authored-by: Andrei Menzopol Co-authored-by: Terence Hampson --- .../all-clusters-app.matter | 27 +- .../all-clusters-common/all-clusters-app.zap | 150 ++++++----- .../energy-management-app.matter | 21 +- .../energy-management-app.zap | 92 +++---- .../include/EnergyEvseDelegateImpl.h | 4 - .../src/EnergyEvseDelegateImpl.cpp | 8 - .../energy-evse-server/energy-evse-server.cpp | 4 - .../energy-evse-server/energy-evse-server.h | 2 - .../data-model/chip/energy-evse-cluster.xml | 109 ++++---- .../data_model/controller-clusters.matter | 19 +- .../chip/devicecontroller/ChipClusters.java | 89 +------ .../chip/devicecontroller/ChipStructs.java | 61 +++++ .../devicecontroller/ClusterIDMapping.java | 21 +- .../devicecontroller/ClusterInfoMapping.java | 21 +- .../devicecontroller/ClusterReadMapping.java | 22 -- .../chip/devicecontroller/cluster/files.gni | 1 + ...EvseClusterChargingTargetScheduleStruct.kt | 71 ++++++ .../cluster/clusters/EnergyEvseCluster.kt | 235 ++--------------- .../java/matter/controller/cluster/files.gni | 1 + ...EvseClusterChargingTargetScheduleStruct.kt | 72 ++++++ .../CHIPAttributeTLVValueDecoder.cpp | 32 --- .../zap-generated/CHIPInvokeCallbacks.cpp | 164 +++++++----- .../python/chip/clusters/CHIPClusters.py | 16 +- .../python/chip/clusters/Objects.py | 64 ++--- .../MTRAttributeSpecifiedCheck.mm | 6 - .../MTRAttributeTLVValueDecoder.mm | 22 -- .../CHIP/zap-generated/MTRBaseClusters.h | 16 +- .../CHIP/zap-generated/MTRBaseClusters.mm | 78 +----- .../CHIP/zap-generated/MTRClusterConstants.h | 2 - .../CHIP/zap-generated/MTRClusters.h | 8 +- .../CHIP/zap-generated/MTRClusters.mm | 16 +- .../zap-generated/MTRCommandPayloadsObjc.h | 10 +- .../zap-generated/MTRCommandPayloadsObjc.mm | 130 ++++++---- .../CHIP/zap-generated/MTRStructsObjc.h | 6 + .../CHIP/zap-generated/MTRStructsObjc.mm | 30 +++ .../zap-generated/attributes/Accessors.cpp | 62 ----- .../zap-generated/attributes/Accessors.h | 10 - .../zap-generated/cluster-objects.cpp | 77 +++--- .../zap-generated/cluster-objects.h | 78 +++--- .../app-common/zap-generated/ids/Attributes.h | 8 - .../zap-generated/cluster/Commands.h | 28 +-- .../cluster/ComplexArgumentParser.cpp | 33 +++ .../cluster/ComplexArgumentParser.h | 5 + .../cluster/logging/DataModelLogger.cpp | 39 ++- .../cluster/logging/DataModelLogger.h | 3 + .../zap-generated/cluster/Commands.h | 237 ++---------------- 46 files changed, 872 insertions(+), 1338 deletions(-) create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/structs/EnergyEvseClusterChargingTargetScheduleStruct.kt create mode 100644 src/controller/java/generated/java/matter/controller/cluster/structs/EnergyEvseClusterChargingTargetScheduleStruct.kt diff --git a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter index d414bb98b2ed42..076c291ec6fd96 100644 --- a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter +++ b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter @@ -4239,6 +4239,11 @@ provisional cluster EnergyEvse = 153 { optional energy_mwh addedEnergy = 2; } + struct ChargingTargetScheduleStruct { + TargetDayOfWeekBitmap dayOfWeekForSequence = 0; + ChargingTargetStruct chargingTargets[] = 1; + } + info event EVConnected = 0 { int32u sessionID = 0; } @@ -4286,8 +4291,6 @@ provisional cluster EnergyEvse = 153 { readonly attribute optional amperage_ma maximumDischargeCurrent = 8; attribute access(write: manage) optional amperage_ma userMaximumChargeCurrent = 9; attribute access(write: manage) optional elapsed_s randomizationDelayWindow = 10; - readonly attribute optional int8u numberOfWeeklyTargets = 33; - readonly attribute optional int8u numberOfDailyTargets = 34; readonly attribute optional nullable epoch_s nextChargeStartTime = 35; readonly attribute optional nullable epoch_s nextChargeTargetTime = 36; readonly attribute optional nullable energy_mwh nextChargeRequiredEnergy = 37; @@ -4308,8 +4311,7 @@ provisional cluster EnergyEvse = 153 { readonly attribute int16u clusterRevision = 65533; response struct GetTargetsResponse = 0 { - TargetDayOfWeekBitmap dayOfWeekforSequence = 0; - ChargingTargetStruct chargingTargets[] = 1; + ChargingTargetScheduleStruct chargingTargetSchedules[] = 0; } request struct EnableChargingRequest { @@ -4324,12 +4326,7 @@ provisional cluster EnergyEvse = 153 { } request struct SetTargetsRequest { - TargetDayOfWeekBitmap dayOfWeekforSequence = 0; - ChargingTargetStruct chargingTargets[] = 1; - } - - request struct GetTargetsRequest { - TargetDayOfWeekBitmap daysToReturn = 0; + ChargingTargetScheduleStruct chargingTargetSchedules[] = 0; } /** Allows a client to disable the EVSE from charging and discharging. */ @@ -4343,7 +4340,7 @@ provisional cluster EnergyEvse = 153 { /** Allows a client to set the user specified charging targets. */ timed command SetTargets(SetTargetsRequest): DefaultSuccess = 5; /** Allows a client to retrieve the user specified charging targets. */ - timed command GetTargets(GetTargetsRequest): GetTargetsResponse = 6; + timed command GetTargets(): GetTargetsResponse = 6; /** Allows a client to clear all stored charging targets. */ timed command ClearTargets(): DefaultSuccess = 7; } @@ -8029,6 +8026,12 @@ endpoint 1 { } server cluster EnergyEvse { + emits event EVConnected; + emits event EVNotDetected; + emits event EnergyTransferStarted; + emits event EnergyTransferStopped; + emits event Fault; + emits event RFID; callback attribute state; callback attribute supplyState; callback attribute faultState; @@ -8040,8 +8043,6 @@ endpoint 1 { callback attribute maximumDischargeCurrent; callback attribute userMaximumChargeCurrent; callback attribute randomizationDelayWindow; - callback attribute numberOfWeeklyTargets default = 0; - callback attribute numberOfDailyTargets default = 1; callback attribute nextChargeStartTime; callback attribute nextChargeTargetTime; callback attribute nextChargeRequiredEnergy; diff --git a/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap b/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap index 258626061215d7..1d0d2054ba71fa 100644 --- a/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap +++ b/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap @@ -2572,7 +2572,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -12083,7 +12083,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "2", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -12912,7 +12912,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -12928,7 +12928,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -12944,7 +12944,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -12960,7 +12960,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -12976,7 +12976,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -13088,7 +13088,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -13227,7 +13227,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -13243,7 +13243,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -13259,7 +13259,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -13275,7 +13275,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -13291,7 +13291,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -13307,7 +13307,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -13323,7 +13323,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "6000", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -13339,7 +13339,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -13355,7 +13355,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -13371,7 +13371,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -13387,39 +13387,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "600", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "NumberOfWeeklyTargets", - "code": 33, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "NumberOfDailyTargets", - "code": 34, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -13435,7 +13403,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -13451,7 +13419,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -13467,7 +13435,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -13483,7 +13451,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -13499,7 +13467,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0xFFFF", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -13515,7 +13483,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -13531,7 +13499,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -13547,7 +13515,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -13563,7 +13531,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -13579,7 +13547,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -13595,7 +13563,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -13611,7 +13579,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -13691,7 +13659,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -13713,6 +13681,50 @@ "maxInterval": 65534, "reportableChange": 0 } + ], + "events": [ + { + "name": "EVConnected", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "EVNotDetected", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "EnergyTransferStarted", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "EnergyTransferStopped", + "code": 3, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "Fault", + "code": 4, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "RFID", + "code": 5, + "mfgCode": null, + "side": "server", + "included": 1 + } ] }, { @@ -15002,7 +15014,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -15018,7 +15030,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -15114,7 +15126,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -15130,7 +15142,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -15194,7 +15206,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, diff --git a/examples/energy-management-app/energy-management-common/energy-management-app.matter b/examples/energy-management-app/energy-management-common/energy-management-app.matter index 753c428234a038..6fff020aa05417 100644 --- a/examples/energy-management-app/energy-management-common/energy-management-app.matter +++ b/examples/energy-management-app/energy-management-common/energy-management-app.matter @@ -1151,6 +1151,11 @@ provisional cluster EnergyEvse = 153 { optional energy_mwh addedEnergy = 2; } + struct ChargingTargetScheduleStruct { + TargetDayOfWeekBitmap dayOfWeekForSequence = 0; + ChargingTargetStruct chargingTargets[] = 1; + } + info event EVConnected = 0 { int32u sessionID = 0; } @@ -1198,8 +1203,6 @@ provisional cluster EnergyEvse = 153 { readonly attribute optional amperage_ma maximumDischargeCurrent = 8; attribute access(write: manage) optional amperage_ma userMaximumChargeCurrent = 9; attribute access(write: manage) optional elapsed_s randomizationDelayWindow = 10; - readonly attribute optional int8u numberOfWeeklyTargets = 33; - readonly attribute optional int8u numberOfDailyTargets = 34; readonly attribute optional nullable epoch_s nextChargeStartTime = 35; readonly attribute optional nullable epoch_s nextChargeTargetTime = 36; readonly attribute optional nullable energy_mwh nextChargeRequiredEnergy = 37; @@ -1220,8 +1223,7 @@ provisional cluster EnergyEvse = 153 { readonly attribute int16u clusterRevision = 65533; response struct GetTargetsResponse = 0 { - TargetDayOfWeekBitmap dayOfWeekforSequence = 0; - ChargingTargetStruct chargingTargets[] = 1; + ChargingTargetScheduleStruct chargingTargetSchedules[] = 0; } request struct EnableChargingRequest { @@ -1236,12 +1238,7 @@ provisional cluster EnergyEvse = 153 { } request struct SetTargetsRequest { - TargetDayOfWeekBitmap dayOfWeekforSequence = 0; - ChargingTargetStruct chargingTargets[] = 1; - } - - request struct GetTargetsRequest { - TargetDayOfWeekBitmap daysToReturn = 0; + ChargingTargetScheduleStruct chargingTargetSchedules[] = 0; } /** Allows a client to disable the EVSE from charging and discharging. */ @@ -1255,7 +1252,7 @@ provisional cluster EnergyEvse = 153 { /** Allows a client to set the user specified charging targets. */ timed command SetTargets(SetTargetsRequest): DefaultSuccess = 5; /** Allows a client to retrieve the user specified charging targets. */ - timed command GetTargets(GetTargetsRequest): GetTargetsResponse = 6; + timed command GetTargets(): GetTargetsResponse = 6; /** Allows a client to clear all stored charging targets. */ timed command ClearTargets(): DefaultSuccess = 7; } @@ -1515,8 +1512,6 @@ endpoint 1 { callback attribute maximumDischargeCurrent; callback attribute userMaximumChargeCurrent; callback attribute randomizationDelayWindow; - callback attribute numberOfWeeklyTargets default = 0; - callback attribute numberOfDailyTargets default = 1; callback attribute nextChargeStartTime; callback attribute nextChargeTargetTime; callback attribute nextChargeRequiredEnergy; diff --git a/examples/energy-management-app/energy-management-common/energy-management-app.zap b/examples/energy-management-app/energy-management-common/energy-management-app.zap index 8ed4aa6e2167d7..92430d761980ab 100644 --- a/examples/energy-management-app/energy-management-common/energy-management-app.zap +++ b/examples/energy-management-app/energy-management-common/energy-management-app.zap @@ -2594,7 +2594,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -2610,7 +2610,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -2626,7 +2626,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -2642,7 +2642,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -2658,7 +2658,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -2770,7 +2770,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -2909,7 +2909,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -2925,7 +2925,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -2941,7 +2941,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -2957,7 +2957,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -2973,7 +2973,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -2989,7 +2989,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -3005,7 +3005,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "6000", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -3021,7 +3021,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -3037,7 +3037,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -3053,7 +3053,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -3069,39 +3069,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "600", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "NumberOfWeeklyTargets", - "code": 33, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "NumberOfDailyTargets", - "code": 34, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -3117,7 +3085,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -3133,7 +3101,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -3149,7 +3117,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -3165,7 +3133,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -3181,7 +3149,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0xFFFF", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -3197,7 +3165,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -3213,7 +3181,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -3229,7 +3197,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -3245,7 +3213,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -3261,7 +3229,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -3277,7 +3245,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -3293,7 +3261,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -3373,7 +3341,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, diff --git a/examples/energy-management-app/energy-management-common/include/EnergyEvseDelegateImpl.h b/examples/energy-management-app/energy-management-common/include/EnergyEvseDelegateImpl.h index d27f35ee63201c..558f7c13df2766 100644 --- a/examples/energy-management-app/energy-management-common/include/EnergyEvseDelegateImpl.h +++ b/examples/energy-management-app/energy-management-common/include/EnergyEvseDelegateImpl.h @@ -208,8 +208,6 @@ class EnergyEvseDelegate : public EnergyEvse::Delegate CHIP_ERROR SetRandomizationDelayWindow(uint32_t) override; /* PREF attributes */ - uint8_t GetNumberOfWeeklyTargets() override; - uint8_t GetNumberOfDailyTargets() override; DataModel::Nullable GetNextChargeStartTime() override; DataModel::Nullable GetNextChargeTargetTime() override; DataModel::Nullable GetNextChargeRequiredEnergy() override; @@ -293,8 +291,6 @@ class EnergyEvseDelegate : public EnergyEvse::Delegate int64_t mUserMaximumChargeCurrent = kDefaultUserMaximumChargeCurrent; // TODO update spec uint32_t mRandomizationDelayWindow = kDefaultRandomizationDelayWindow; /* PREF attributes */ - uint8_t mNumberOfWeeklyTargets = 0; - uint8_t mNumberOfDailyTargets = 1; DataModel::Nullable mNextChargeStartTime; DataModel::Nullable mNextChargeTargetTime; DataModel::Nullable mNextChargeRequiredEnergy; diff --git a/examples/energy-management-app/energy-management-common/src/EnergyEvseDelegateImpl.cpp b/examples/energy-management-app/energy-management-common/src/EnergyEvseDelegateImpl.cpp index 2b4a6e44f5fcea..dc60d748958894 100644 --- a/examples/energy-management-app/energy-management-common/src/EnergyEvseDelegateImpl.cpp +++ b/examples/energy-management-app/energy-management-common/src/EnergyEvseDelegateImpl.cpp @@ -1374,14 +1374,6 @@ CHIP_ERROR EnergyEvseDelegate::SetRandomizationDelayWindow(uint32_t newValue) } /* PREF attributes */ -uint8_t EnergyEvseDelegate::GetNumberOfWeeklyTargets() -{ - return mNumberOfWeeklyTargets; -} -uint8_t EnergyEvseDelegate::GetNumberOfDailyTargets() -{ - return mNumberOfDailyTargets; -} DataModel::Nullable EnergyEvseDelegate::GetNextChargeStartTime() { return mNextChargeStartTime; diff --git a/src/app/clusters/energy-evse-server/energy-evse-server.cpp b/src/app/clusters/energy-evse-server/energy-evse-server.cpp index 019aead77c24a8..b3cbbf334a2e4c 100644 --- a/src/app/clusters/energy-evse-server/energy-evse-server.cpp +++ b/src/app/clusters/energy-evse-server/energy-evse-server.cpp @@ -95,10 +95,6 @@ CHIP_ERROR Instance::Read(const ConcreteReadAttributePath & aPath, AttributeValu /* Optional */ return aEncoder.Encode(mDelegate.GetRandomizationDelayWindow()); /* PREF - ChargingPreferences attributes */ - case NumberOfWeeklyTargets::Id: - return aEncoder.Encode(mDelegate.GetNumberOfWeeklyTargets()); - case NumberOfDailyTargets::Id: - return aEncoder.Encode(mDelegate.GetNumberOfDailyTargets()); case NextChargeStartTime::Id: return aEncoder.Encode(mDelegate.GetNextChargeStartTime()); case NextChargeTargetTime::Id: diff --git a/src/app/clusters/energy-evse-server/energy-evse-server.h b/src/app/clusters/energy-evse-server/energy-evse-server.h index a194551607c6f4..dfead37517d4e8 100644 --- a/src/app/clusters/energy-evse-server/energy-evse-server.h +++ b/src/app/clusters/energy-evse-server/energy-evse-server.h @@ -94,8 +94,6 @@ class Delegate virtual int64_t GetUserMaximumChargeCurrent() = 0; virtual uint32_t GetRandomizationDelayWindow() = 0; /* PREF attributes */ - virtual uint8_t GetNumberOfWeeklyTargets() = 0; - virtual uint8_t GetNumberOfDailyTargets() = 0; virtual DataModel::Nullable GetNextChargeStartTime() = 0; virtual DataModel::Nullable GetNextChargeTargetTime() = 0; virtual DataModel::Nullable GetNextChargeRequiredEnergy() = 0; diff --git a/src/app/zap-templates/zcl/data-model/chip/energy-evse-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/energy-evse-cluster.xml index 2e58fb31da3f42..a95a5adbd2e34b 100644 --- a/src/app/zap-templates/zcl/data-model/chip/energy-evse-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/energy-evse-cluster.xml @@ -13,6 +13,7 @@ limitations under the License. --> + @@ -23,6 +24,7 @@ limitations under the License. + @@ -31,6 +33,7 @@ limitations under the License. + @@ -51,12 +54,14 @@ limitations under the License. + + @@ -67,12 +72,20 @@ limitations under the License. + - - - + + + + + + + + + + Energy EVSE Energy Management @@ -81,92 +94,97 @@ limitations under the License. true true Electric Vehicle Supply Equipment (EVSE) is equipment used to charge an Electric Vehicle (EV) or Plug-In Hybrid Electric Vehicle. This cluster provides an interface to the functionality of Electric Vehicle Supply Equipment (EVSE) management. - - + - State - SupplyState - FaultState + + State + SupplyState + FaultState ChargingEnabledUntil + DischargingEnabledUntil CircuitCapacity MinimumChargeCurrent MaximumChargeCurrent + MaximumDischargeCurrent - UserMaximumChargeCurrent - RandomizationDelayWindow - NumberOfWeeklyTargets + - NumberOfDailyTargets + - NextChargeStartTime + + NextChargeStartTime - NextChargeTargetTime + + NextChargeTargetTime + NextChargeRequiredEnergy - NextChargeTargetSoC + + NextChargeTargetSoC - - + + ApproximateEVEfficiency - StateOfCharge + + StateOfCharge + BatteryCapacity + VehicleID SessionID SessionDuration SessionEnergyCharged + SessionEnergyDischarged - + Allows a client to disable the EVSE from charging and discharging. - - + + Allows a client to enable the EVSE to charge an EV. - - + + Allows a client to enable the EVSE to discharge an EV. - + Allows a client to put the EVSE into a self-diagnostics mode. - - - + + Allows a client to set the user specified charging targets. - - + Allows a client to retrieve the user specified charging targets. - + Allows a client to clear all stored charging targets. - - - + + The GetTargetsResponse is sent in response to the GetTargets Command. @@ -176,30 +194,30 @@ limitations under the License. EVNotDetected - + - + EnergyTransferStarted - + EnergyTransferStopped - - + + Fault - - - + + + RFID @@ -208,10 +226,11 @@ limitations under the License. - - - - + + + + + diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter index d1bd05a82d21d4..0a2bc772a5bbf9 100644 --- a/src/controller/data_model/controller-clusters.matter +++ b/src/controller/data_model/controller-clusters.matter @@ -4670,6 +4670,11 @@ provisional cluster EnergyEvse = 153 { optional energy_mwh addedEnergy = 2; } + struct ChargingTargetScheduleStruct { + TargetDayOfWeekBitmap dayOfWeekForSequence = 0; + ChargingTargetStruct chargingTargets[] = 1; + } + info event EVConnected = 0 { int32u sessionID = 0; } @@ -4717,8 +4722,6 @@ provisional cluster EnergyEvse = 153 { readonly attribute optional amperage_ma maximumDischargeCurrent = 8; attribute access(write: manage) optional amperage_ma userMaximumChargeCurrent = 9; attribute access(write: manage) optional elapsed_s randomizationDelayWindow = 10; - readonly attribute optional int8u numberOfWeeklyTargets = 33; - readonly attribute optional int8u numberOfDailyTargets = 34; readonly attribute optional nullable epoch_s nextChargeStartTime = 35; readonly attribute optional nullable epoch_s nextChargeTargetTime = 36; readonly attribute optional nullable energy_mwh nextChargeRequiredEnergy = 37; @@ -4739,8 +4742,7 @@ provisional cluster EnergyEvse = 153 { readonly attribute int16u clusterRevision = 65533; response struct GetTargetsResponse = 0 { - TargetDayOfWeekBitmap dayOfWeekforSequence = 0; - ChargingTargetStruct chargingTargets[] = 1; + ChargingTargetScheduleStruct chargingTargetSchedules[] = 0; } request struct EnableChargingRequest { @@ -4755,12 +4757,7 @@ provisional cluster EnergyEvse = 153 { } request struct SetTargetsRequest { - TargetDayOfWeekBitmap dayOfWeekforSequence = 0; - ChargingTargetStruct chargingTargets[] = 1; - } - - request struct GetTargetsRequest { - TargetDayOfWeekBitmap daysToReturn = 0; + ChargingTargetScheduleStruct chargingTargetSchedules[] = 0; } /** Allows a client to disable the EVSE from charging and discharging. */ @@ -4774,7 +4771,7 @@ provisional cluster EnergyEvse = 153 { /** Allows a client to set the user specified charging targets. */ timed command SetTargets(SetTargetsRequest): DefaultSuccess = 5; /** Allows a client to retrieve the user specified charging targets. */ - timed command GetTargets(GetTargetsRequest): GetTargetsResponse = 6; + timed command GetTargets(): GetTargetsResponse = 6; /** Allows a client to clear all stored charging targets. */ timed command ClearTargets(): DefaultSuccess = 7; } diff --git a/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java b/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java index 8cd5cc11e54cc8..0bbc57d9698c34 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java @@ -29984,8 +29984,6 @@ public static class EnergyEvseCluster extends BaseChipCluster { private static final long MAXIMUM_DISCHARGE_CURRENT_ATTRIBUTE_ID = 8L; private static final long USER_MAXIMUM_CHARGE_CURRENT_ATTRIBUTE_ID = 9L; private static final long RANDOMIZATION_DELAY_WINDOW_ATTRIBUTE_ID = 10L; - private static final long NUMBER_OF_WEEKLY_TARGETS_ATTRIBUTE_ID = 33L; - private static final long NUMBER_OF_DAILY_TARGETS_ATTRIBUTE_ID = 34L; private static final long NEXT_CHARGE_START_TIME_ATTRIBUTE_ID = 35L; private static final long NEXT_CHARGE_TARGET_TIME_ATTRIBUTE_ID = 36L; private static final long NEXT_CHARGE_REQUIRED_ENERGY_ATTRIBUTE_ID = 37L; @@ -30088,17 +30086,13 @@ public void onResponse(StructType invokeStructValue) { } - public void setTargets(DefaultClusterCallback callback, Integer dayOfWeekforSequence, ArrayList chargingTargets, int timedInvokeTimeoutMs) { + public void setTargets(DefaultClusterCallback callback, ArrayList chargingTargetSchedules, int timedInvokeTimeoutMs) { final long commandId = 5L; ArrayList elements = new ArrayList<>(); - final long dayOfWeekforSequenceFieldID = 0L; - BaseTLVType dayOfWeekforSequencetlvValue = new UIntType(dayOfWeekforSequence); - elements.add(new StructElement(dayOfWeekforSequenceFieldID, dayOfWeekforSequencetlvValue)); - - final long chargingTargetsFieldID = 1L; - BaseTLVType chargingTargetstlvValue = ArrayType.generateArrayType(chargingTargets, (elementchargingTargets) -> elementchargingTargets.encodeTlv()); - elements.add(new StructElement(chargingTargetsFieldID, chargingTargetstlvValue)); + final long chargingTargetSchedulesFieldID = 0L; + BaseTLVType chargingTargetSchedulestlvValue = ArrayType.generateArrayType(chargingTargetSchedules, (elementchargingTargetSchedules) -> elementchargingTargetSchedules.encodeTlv()); + elements.add(new StructElement(chargingTargetSchedulesFieldID, chargingTargetSchedulestlvValue)); StructType value = new StructType(elements); invoke(new InvokeCallbackImpl(callback) { @@ -30109,36 +30103,25 @@ public void onResponse(StructType invokeStructValue) { } - public void getTargets(GetTargetsResponseCallback callback, Integer daysToReturn, int timedInvokeTimeoutMs) { + public void getTargets(GetTargetsResponseCallback callback, int timedInvokeTimeoutMs) { final long commandId = 6L; ArrayList elements = new ArrayList<>(); - final long daysToReturnFieldID = 0L; - BaseTLVType daysToReturntlvValue = new UIntType(daysToReturn); - elements.add(new StructElement(daysToReturnFieldID, daysToReturntlvValue)); - StructType value = new StructType(elements); invoke(new InvokeCallbackImpl(callback) { @Override public void onResponse(StructType invokeStructValue) { - final long dayOfWeekforSequenceFieldID = 0L; - Integer dayOfWeekforSequence = null; - final long chargingTargetsFieldID = 1L; - ArrayList chargingTargets = null; + final long chargingTargetSchedulesFieldID = 0L; + ArrayList chargingTargetSchedules = null; for (StructElement element: invokeStructValue.value()) { - if (element.contextTagNum() == dayOfWeekforSequenceFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.UInt) { - UIntType castingValue = element.value(UIntType.class); - dayOfWeekforSequence = castingValue.value(Integer.class); - } - } else if (element.contextTagNum() == chargingTargetsFieldID) { + if (element.contextTagNum() == chargingTargetSchedulesFieldID) { if (element.value(BaseTLVType.class).type() == TLVType.Array) { ArrayType castingValue = element.value(ArrayType.class); - chargingTargets = castingValue.map((elementcastingValue) -> ChipStructs.EnergyEvseClusterChargingTargetStruct.decodeTlv(elementcastingValue)); + chargingTargetSchedules = castingValue.map((elementcastingValue) -> ChipStructs.EnergyEvseClusterChargingTargetScheduleStruct.decodeTlv(elementcastingValue)); } } } - callback.onSuccess(dayOfWeekforSequence, chargingTargets); + callback.onSuccess(chargingTargetSchedules); }}, commandId, value, timedInvokeTimeoutMs); } @@ -30156,7 +30139,7 @@ public void onResponse(StructType invokeStructValue) { } public interface GetTargetsResponseCallback extends BaseClusterCallback { - void onSuccess(Integer dayOfWeekforSequence, ArrayList chargingTargets); + void onSuccess(ArrayList chargingTargetSchedules); } public interface StateAttributeCallback extends BaseAttributeCallback { @@ -30528,56 +30511,6 @@ public void onSuccess(byte[] tlv) { }, RANDOMIZATION_DELAY_WINDOW_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readNumberOfWeeklyTargetsAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, NUMBER_OF_WEEKLY_TARGETS_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, NUMBER_OF_WEEKLY_TARGETS_ATTRIBUTE_ID, true); - } - - public void subscribeNumberOfWeeklyTargetsAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, NUMBER_OF_WEEKLY_TARGETS_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - } - }, NUMBER_OF_WEEKLY_TARGETS_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readNumberOfDailyTargetsAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, NUMBER_OF_DAILY_TARGETS_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, NUMBER_OF_DAILY_TARGETS_ATTRIBUTE_ID, true); - } - - public void subscribeNumberOfDailyTargetsAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, NUMBER_OF_DAILY_TARGETS_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - } - }, NUMBER_OF_DAILY_TARGETS_ATTRIBUTE_ID, minInterval, maxInterval); - } - public void readNextChargeStartTimeAttribute( NextChargeStartTimeAttributeCallback callback) { ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, NEXT_CHARGE_START_TIME_ATTRIBUTE_ID); diff --git a/src/controller/java/generated/java/chip/devicecontroller/ChipStructs.java b/src/controller/java/generated/java/chip/devicecontroller/ChipStructs.java index 9e36accf1b129a..c676d026aa2597 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ChipStructs.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ChipStructs.java @@ -7351,6 +7351,67 @@ public String toString() { return output.toString(); } } +public static class EnergyEvseClusterChargingTargetScheduleStruct { + public Integer dayOfWeekForSequence; + public ArrayList chargingTargets; + private static final long DAY_OF_WEEK_FOR_SEQUENCE_ID = 0L; + private static final long CHARGING_TARGETS_ID = 1L; + + public EnergyEvseClusterChargingTargetScheduleStruct( + Integer dayOfWeekForSequence, + ArrayList chargingTargets + ) { + this.dayOfWeekForSequence = dayOfWeekForSequence; + this.chargingTargets = chargingTargets; + } + + public StructType encodeTlv() { + ArrayList values = new ArrayList<>(); + values.add(new StructElement(DAY_OF_WEEK_FOR_SEQUENCE_ID, new UIntType(dayOfWeekForSequence))); + values.add(new StructElement(CHARGING_TARGETS_ID, ArrayType.generateArrayType(chargingTargets, (elementchargingTargets) -> elementchargingTargets.encodeTlv()))); + + return new StructType(values); + } + + public static EnergyEvseClusterChargingTargetScheduleStruct decodeTlv(BaseTLVType tlvValue) { + if (tlvValue == null || tlvValue.type() != TLVType.Struct) { + return null; + } + Integer dayOfWeekForSequence = null; + ArrayList chargingTargets = null; + for (StructElement element: ((StructType)tlvValue).value()) { + if (element.contextTagNum() == DAY_OF_WEEK_FOR_SEQUENCE_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + dayOfWeekForSequence = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == CHARGING_TARGETS_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.Array) { + ArrayType castingValue = element.value(ArrayType.class); + chargingTargets = castingValue.map((elementcastingValue) -> ChipStructs.EnergyEvseClusterChargingTargetStruct.decodeTlv(elementcastingValue)); + } + } + } + return new EnergyEvseClusterChargingTargetScheduleStruct( + dayOfWeekForSequence, + chargingTargets + ); + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("EnergyEvseClusterChargingTargetScheduleStruct {\n"); + output.append("\tdayOfWeekForSequence: "); + output.append(dayOfWeekForSequence); + output.append("\n"); + output.append("\tchargingTargets: "); + output.append(chargingTargets); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } +} public static class EnergyPreferenceClusterBalanceStruct { public Integer step; public Optional label; diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java index 2c7843a639d268..cb21688a2ec313 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java @@ -9566,8 +9566,6 @@ public enum Attribute { MaximumDischargeCurrent(8L), UserMaximumChargeCurrent(9L), RandomizationDelayWindow(10L), - NumberOfWeeklyTargets(33L), - NumberOfDailyTargets(34L), NextChargeStartTime(35L), NextChargeTargetTime(36L), NextChargeRequiredEnergy(37L), @@ -9690,7 +9688,7 @@ public static EnableDischargingCommandField value(int id) throws NoSuchFieldErro } throw new NoSuchFieldError(); } - }public enum SetTargetsCommandField {DayOfWeekforSequence(0),ChargingTargets(1),; + }public enum SetTargetsCommandField {ChargingTargetSchedules(0),; private final int id; SetTargetsCommandField(int id) { this.id = id; @@ -9707,23 +9705,6 @@ public static SetTargetsCommandField value(int id) throws NoSuchFieldError { } throw new NoSuchFieldError(); } - }public enum GetTargetsCommandField {DaysToReturn(0),; - private final int id; - GetTargetsCommandField(int id) { - this.id = id; - } - - public int getID() { - return id; - } - public static GetTargetsCommandField value(int id) throws NoSuchFieldError { - for (GetTargetsCommandField field : GetTargetsCommandField.values()) { - if (field.getID() == id) { - return field; - } - } - throw new NoSuchFieldError(); - } }@Override public String getAttributeName(long id) throws NoSuchFieldError { return Attribute.value(id).toString(); diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java index 8bd7d3a7a265f9..a030b14c6b218b 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java @@ -10500,12 +10500,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(Integer dayOfWeekforSequence, ArrayList chargingTargets) { + public void onSuccess(ArrayList chargingTargetSchedules) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo dayOfWeekforSequenceResponseValue = new CommandResponseInfo("dayOfWeekforSequence", "Integer"); - responseValues.put(dayOfWeekforSequenceResponseValue, dayOfWeekforSequence); - // chargingTargets: ChargingTargetStruct + // chargingTargetSchedules: ChargingTargetScheduleStruct // Conversion from this type to Java is not properly implemented yet callback.onSuccess(responseValues); @@ -23535,17 +23533,12 @@ public Map> getCommandMap() { Map energyEvsesetTargetsCommandParams = new LinkedHashMap(); - CommandParameterInfo energyEvsesetTargetsdayOfWeekforSequenceCommandParameterInfo = new CommandParameterInfo("dayOfWeekforSequence", Integer.class, Integer.class); - energyEvsesetTargetsCommandParams.put("dayOfWeekforSequence",energyEvsesetTargetsdayOfWeekforSequenceCommandParameterInfo); - InteractionInfo energyEvsesetTargetsInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { ((ChipClusters.EnergyEvseCluster) cluster) .setTargets((DefaultClusterCallback) callback - , (Integer) - commandArguments.get("dayOfWeekforSequence") - , (ArrayList) - commandArguments.get("chargingTargets"), 10000 + , (ArrayList) + commandArguments.get("chargingTargetSchedules"), 10000 ); }, () -> new DelegatedDefaultClusterCallback(), @@ -23554,16 +23547,10 @@ public Map> getCommandMap() { energyEvseClusterInteractionInfoMap.put("setTargets", energyEvsesetTargetsInteractionInfo); Map energyEvsegetTargetsCommandParams = new LinkedHashMap(); - - CommandParameterInfo energyEvsegetTargetsdaysToReturnCommandParameterInfo = new CommandParameterInfo("daysToReturn", Integer.class, Integer.class); - energyEvsegetTargetsCommandParams.put("daysToReturn",energyEvsegetTargetsdaysToReturnCommandParameterInfo); InteractionInfo energyEvsegetTargetsInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { ((ChipClusters.EnergyEvseCluster) cluster) .getTargets((ChipClusters.EnergyEvseCluster.GetTargetsResponseCallback) callback - , (Integer) - commandArguments.get("daysToReturn") - , 10000); }, () -> new DelegatedEnergyEvseClusterGetTargetsResponseCallback(), diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java index 64a4a7a1ff08c7..95880d5849ce0f 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java @@ -9527,28 +9527,6 @@ private static Map readEnergyEvseInteractionInfo() { readEnergyEvseRandomizationDelayWindowCommandParams ); result.put("readRandomizationDelayWindowAttribute", readEnergyEvseRandomizationDelayWindowAttributeInteractionInfo); - Map readEnergyEvseNumberOfWeeklyTargetsCommandParams = new LinkedHashMap(); - InteractionInfo readEnergyEvseNumberOfWeeklyTargetsAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.EnergyEvseCluster) cluster).readNumberOfWeeklyTargetsAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readEnergyEvseNumberOfWeeklyTargetsCommandParams - ); - result.put("readNumberOfWeeklyTargetsAttribute", readEnergyEvseNumberOfWeeklyTargetsAttributeInteractionInfo); - Map readEnergyEvseNumberOfDailyTargetsCommandParams = new LinkedHashMap(); - InteractionInfo readEnergyEvseNumberOfDailyTargetsAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.EnergyEvseCluster) cluster).readNumberOfDailyTargetsAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readEnergyEvseNumberOfDailyTargetsCommandParams - ); - result.put("readNumberOfDailyTargetsAttribute", readEnergyEvseNumberOfDailyTargetsAttributeInteractionInfo); Map readEnergyEvseNextChargeStartTimeCommandParams = new LinkedHashMap(); InteractionInfo readEnergyEvseNextChargeStartTimeAttributeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/files.gni b/src/controller/java/generated/java/chip/devicecontroller/cluster/files.gni index 1cbd4a38983f5c..57b30e5acdf821 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/files.gni +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/files.gni @@ -56,6 +56,7 @@ structs_sources = [ "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ElectricalEnergyMeasurementClusterEnergyMeasurementStruct.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ElectricalEnergyMeasurementClusterMeasurementAccuracyRangeStruct.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ElectricalEnergyMeasurementClusterMeasurementAccuracyStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/EnergyEvseClusterChargingTargetScheduleStruct.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/EnergyEvseClusterChargingTargetStruct.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/EnergyPreferenceClusterBalanceStruct.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/FixedLabelClusterLabelStruct.kt", diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/EnergyEvseClusterChargingTargetScheduleStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/EnergyEvseClusterChargingTargetScheduleStruct.kt new file mode 100644 index 00000000000000..bddc2563640620 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/EnergyEvseClusterChargingTargetScheduleStruct.kt @@ -0,0 +1,71 @@ +/* + * + * Copyright (c) 2023 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. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import matter.tlv.AnonymousTag +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class EnergyEvseClusterChargingTargetScheduleStruct( + val dayOfWeekForSequence: UInt, + val chargingTargets: List +) { + override fun toString(): String = buildString { + append("EnergyEvseClusterChargingTargetScheduleStruct {\n") + append("\tdayOfWeekForSequence : $dayOfWeekForSequence\n") + append("\tchargingTargets : $chargingTargets\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_DAY_OF_WEEK_FOR_SEQUENCE), dayOfWeekForSequence) + startArray(ContextSpecificTag(TAG_CHARGING_TARGETS)) + for (item in chargingTargets.iterator()) { + item.toTlv(AnonymousTag, this) + } + endArray() + endStructure() + } + } + + companion object { + private const val TAG_DAY_OF_WEEK_FOR_SEQUENCE = 0 + private const val TAG_CHARGING_TARGETS = 1 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): EnergyEvseClusterChargingTargetScheduleStruct { + tlvReader.enterStructure(tlvTag) + val dayOfWeekForSequence = tlvReader.getUInt(ContextSpecificTag(TAG_DAY_OF_WEEK_FOR_SEQUENCE)) + val chargingTargets = + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_CHARGING_TARGETS)) + while (!tlvReader.isEndOfContainer()) { + add(EnergyEvseClusterChargingTargetStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + + tlvReader.exitContainer() + + return EnergyEvseClusterChargingTargetScheduleStruct(dayOfWeekForSequence, chargingTargets) + } + } +} diff --git a/src/controller/java/generated/java/matter/controller/cluster/clusters/EnergyEvseCluster.kt b/src/controller/java/generated/java/matter/controller/cluster/clusters/EnergyEvseCluster.kt index c2a269e96018af..20363bff38ec5a 100644 --- a/src/controller/java/generated/java/matter/controller/cluster/clusters/EnergyEvseCluster.kt +++ b/src/controller/java/generated/java/matter/controller/cluster/clusters/EnergyEvseCluster.kt @@ -46,8 +46,7 @@ import matter.tlv.TlvWriter class EnergyEvseCluster(private val controller: MatterController, private val endpointId: UShort) { class GetTargetsResponse( - val dayOfWeekforSequence: UByte, - val chargingTargets: List + val chargingTargetSchedules: List ) class StateAttribute(val value: UByte?) @@ -345,8 +344,7 @@ class EnergyEvseCluster(private val controller: MatterController, private val en } suspend fun setTargets( - dayOfWeekforSequence: UByte, - chargingTargets: List, + chargingTargetSchedules: List, timedInvokeTimeout: Duration ) { val commandId: UInt = 5u @@ -354,12 +352,9 @@ class EnergyEvseCluster(private val controller: MatterController, private val en val tlvWriter = TlvWriter() tlvWriter.startStructure(AnonymousTag) - val TAG_DAY_OF_WEEKFOR_SEQUENCE_REQ: Int = 0 - tlvWriter.put(ContextSpecificTag(TAG_DAY_OF_WEEKFOR_SEQUENCE_REQ), dayOfWeekforSequence) - - val TAG_CHARGING_TARGETS_REQ: Int = 1 - tlvWriter.startArray(ContextSpecificTag(TAG_CHARGING_TARGETS_REQ)) - for (item in chargingTargets.iterator()) { + val TAG_CHARGING_TARGET_SCHEDULES_REQ: Int = 0 + tlvWriter.startArray(ContextSpecificTag(TAG_CHARGING_TARGET_SCHEDULES_REQ)) + for (item in chargingTargetSchedules.iterator()) { item.toTlv(AnonymousTag, tlvWriter) } tlvWriter.endArray() @@ -376,14 +371,11 @@ class EnergyEvseCluster(private val controller: MatterController, private val en logger.log(Level.FINE, "Invoke command succeeded: ${response}") } - suspend fun getTargets(daysToReturn: UByte, timedInvokeTimeout: Duration): GetTargetsResponse { + suspend fun getTargets(timedInvokeTimeout: Duration): GetTargetsResponse { val commandId: UInt = 6u val tlvWriter = TlvWriter() tlvWriter.startStructure(AnonymousTag) - - val TAG_DAYS_TO_RETURN_REQ: Int = 0 - tlvWriter.put(ContextSpecificTag(TAG_DAYS_TO_RETURN_REQ), daysToReturn) tlvWriter.endStructure() val request: InvokeRequest = @@ -398,25 +390,18 @@ class EnergyEvseCluster(private val controller: MatterController, private val en val tlvReader = TlvReader(response.payload) tlvReader.enterStructure(AnonymousTag) - val TAG_DAY_OF_WEEKFOR_SEQUENCE: Int = 0 - var dayOfWeekforSequence_decoded: UByte? = null - - val TAG_CHARGING_TARGETS: Int = 1 - var chargingTargets_decoded: List? = null + val TAG_CHARGING_TARGET_SCHEDULES: Int = 0 + var chargingTargetSchedules_decoded: List? = null while (!tlvReader.isEndOfContainer()) { val tag = tlvReader.peekElement().tag - if (tag == ContextSpecificTag(TAG_DAY_OF_WEEKFOR_SEQUENCE)) { - dayOfWeekforSequence_decoded = tlvReader.getUByte(tag) - } - - if (tag == ContextSpecificTag(TAG_CHARGING_TARGETS)) { - chargingTargets_decoded = - buildList { + if (tag == ContextSpecificTag(TAG_CHARGING_TARGET_SCHEDULES)) { + chargingTargetSchedules_decoded = + buildList { tlvReader.enterArray(tag) while (!tlvReader.isEndOfContainer()) { - add(EnergyEvseClusterChargingTargetStruct.fromTlv(AnonymousTag, tlvReader)) + add(EnergyEvseClusterChargingTargetScheduleStruct.fromTlv(AnonymousTag, tlvReader)) } tlvReader.exitContainer() } @@ -425,17 +410,13 @@ class EnergyEvseCluster(private val controller: MatterController, private val en } } - if (dayOfWeekforSequence_decoded == null) { - throw IllegalStateException("dayOfWeekforSequence not found in TLV") - } - - if (chargingTargets_decoded == null) { - throw IllegalStateException("chargingTargets not found in TLV") + if (chargingTargetSchedules_decoded == null) { + throw IllegalStateException("chargingTargetSchedules not found in TLV") } tlvReader.exitContainer() - return GetTargetsResponse(dayOfWeekforSequence_decoded, chargingTargets_decoded) + return GetTargetsResponse(chargingTargetSchedules_decoded) } suspend fun clearTargets(timedInvokeTimeout: Duration) { @@ -1523,192 +1504,6 @@ class EnergyEvseCluster(private val controller: MatterController, private val en } } - suspend fun readNumberOfWeeklyTargetsAttribute(): UByte? { - val ATTRIBUTE_ID: UInt = 33u - - val attributePath = - AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) - - val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath)) - - val response = controller.read(readRequest) - - if (response.successes.isEmpty()) { - logger.log(Level.WARNING, "Read command failed") - throw IllegalStateException("Read command failed with failures: ${response.failures}") - } - - logger.log(Level.FINE, "Read command succeeded") - - val attributeData = - response.successes.filterIsInstance().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Numberofweeklytargets attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: UByte? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getUByte(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun subscribeNumberOfWeeklyTargetsAttribute( - minInterval: Int, - maxInterval: Int - ): Flow { - val ATTRIBUTE_ID: UInt = 33u - val attributePaths = - listOf( - AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) - ) - - val subscribeRequest: SubscribeRequest = - SubscribeRequest( - eventPaths = emptyList(), - attributePaths = attributePaths, - minInterval = Duration.ofSeconds(minInterval.toLong()), - maxInterval = Duration.ofSeconds(maxInterval.toLong()) - ) - - return controller.subscribe(subscribeRequest).transform { subscriptionState -> - when (subscriptionState) { - is SubscriptionState.SubscriptionErrorNotification -> { - emit( - UByteSubscriptionState.Error( - Exception( - "Subscription terminated with error code: ${subscriptionState.terminationCause}" - ) - ) - ) - } - is SubscriptionState.NodeStateUpdate -> { - val attributeData = - subscriptionState.updateState.successes - .filterIsInstance() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { - "Numberofweeklytargets attribute not found in Node State update" - } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: UByte? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getUByte(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(UByteSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(UByteSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readNumberOfDailyTargetsAttribute(): UByte? { - val ATTRIBUTE_ID: UInt = 34u - - val attributePath = - AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) - - val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath)) - - val response = controller.read(readRequest) - - if (response.successes.isEmpty()) { - logger.log(Level.WARNING, "Read command failed") - throw IllegalStateException("Read command failed with failures: ${response.failures}") - } - - logger.log(Level.FINE, "Read command succeeded") - - val attributeData = - response.successes.filterIsInstance().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Numberofdailytargets attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: UByte? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getUByte(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun subscribeNumberOfDailyTargetsAttribute( - minInterval: Int, - maxInterval: Int - ): Flow { - val ATTRIBUTE_ID: UInt = 34u - val attributePaths = - listOf( - AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) - ) - - val subscribeRequest: SubscribeRequest = - SubscribeRequest( - eventPaths = emptyList(), - attributePaths = attributePaths, - minInterval = Duration.ofSeconds(minInterval.toLong()), - maxInterval = Duration.ofSeconds(maxInterval.toLong()) - ) - - return controller.subscribe(subscribeRequest).transform { subscriptionState -> - when (subscriptionState) { - is SubscriptionState.SubscriptionErrorNotification -> { - emit( - UByteSubscriptionState.Error( - Exception( - "Subscription terminated with error code: ${subscriptionState.terminationCause}" - ) - ) - ) - } - is SubscriptionState.NodeStateUpdate -> { - val attributeData = - subscriptionState.updateState.successes - .filterIsInstance() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { - "Numberofdailytargets attribute not found in Node State update" - } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: UByte? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getUByte(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(UByteSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(UByteSubscriptionState.SubscriptionEstablished) - } - } - } - } - suspend fun readNextChargeStartTimeAttribute(): NextChargeStartTimeAttribute { val ATTRIBUTE_ID: UInt = 35u diff --git a/src/controller/java/generated/java/matter/controller/cluster/files.gni b/src/controller/java/generated/java/matter/controller/cluster/files.gni index 83ff5cb6e20a0d..635cff6021ba99 100644 --- a/src/controller/java/generated/java/matter/controller/cluster/files.gni +++ b/src/controller/java/generated/java/matter/controller/cluster/files.gni @@ -56,6 +56,7 @@ matter_structs_sources = [ "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/ElectricalEnergyMeasurementClusterEnergyMeasurementStruct.kt", "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/ElectricalEnergyMeasurementClusterMeasurementAccuracyRangeStruct.kt", "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/ElectricalEnergyMeasurementClusterMeasurementAccuracyStruct.kt", + "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/EnergyEvseClusterChargingTargetScheduleStruct.kt", "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/EnergyEvseClusterChargingTargetStruct.kt", "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/EnergyPreferenceClusterBalanceStruct.kt", "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/FixedLabelClusterLabelStruct.kt", diff --git a/src/controller/java/generated/java/matter/controller/cluster/structs/EnergyEvseClusterChargingTargetScheduleStruct.kt b/src/controller/java/generated/java/matter/controller/cluster/structs/EnergyEvseClusterChargingTargetScheduleStruct.kt new file mode 100644 index 00000000000000..eaa06f527c652f --- /dev/null +++ b/src/controller/java/generated/java/matter/controller/cluster/structs/EnergyEvseClusterChargingTargetScheduleStruct.kt @@ -0,0 +1,72 @@ +/* + * + * Copyright (c) 2023 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. + */ +package matter.controller.cluster.structs + +import matter.controller.cluster.* +import matter.tlv.AnonymousTag +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class EnergyEvseClusterChargingTargetScheduleStruct( + val dayOfWeekForSequence: UByte, + val chargingTargets: List +) { + override fun toString(): String = buildString { + append("EnergyEvseClusterChargingTargetScheduleStruct {\n") + append("\tdayOfWeekForSequence : $dayOfWeekForSequence\n") + append("\tchargingTargets : $chargingTargets\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_DAY_OF_WEEK_FOR_SEQUENCE), dayOfWeekForSequence) + startArray(ContextSpecificTag(TAG_CHARGING_TARGETS)) + for (item in chargingTargets.iterator()) { + item.toTlv(AnonymousTag, this) + } + endArray() + endStructure() + } + } + + companion object { + private const val TAG_DAY_OF_WEEK_FOR_SEQUENCE = 0 + private const val TAG_CHARGING_TARGETS = 1 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): EnergyEvseClusterChargingTargetScheduleStruct { + tlvReader.enterStructure(tlvTag) + val dayOfWeekForSequence = + tlvReader.getUByte(ContextSpecificTag(TAG_DAY_OF_WEEK_FOR_SEQUENCE)) + val chargingTargets = + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_CHARGING_TARGETS)) + while (!tlvReader.isEndOfContainer()) { + add(EnergyEvseClusterChargingTargetStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + + tlvReader.exitContainer() + + return EnergyEvseClusterChargingTargetScheduleStruct(dayOfWeekForSequence, chargingTargets) + } + } +} diff --git a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp index 58910928212ab4..1ca2a96af986df 100644 --- a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp +++ b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp @@ -22884,38 +22884,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jnivalue, value); return value; } - case Attributes::NumberOfWeeklyTargets::Id: { - using TypeInfo = Attributes::NumberOfWeeklyTargets::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - std::string valueClassName = "java/lang/Integer"; - std::string valueCtorSignature = "(I)V"; - jint jnivalue = static_cast(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::NumberOfDailyTargets::Id: { - using TypeInfo = Attributes::NumberOfDailyTargets::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - std::string valueClassName = "java/lang/Integer"; - std::string valueCtorSignature = "(I)V"; - jint jnivalue = static_cast(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } case Attributes::NextChargeStartTime::Id: { using TypeInfo = Attributes::NextChargeStartTime::TypeInfo; TypeInfo::DecodableType cppValue; diff --git a/src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp b/src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp index 0a1171eab1635c..7568ccc093c00e 100644 --- a/src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp +++ b/src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp @@ -3978,92 +3978,126 @@ void CHIPEnergyEvseClusterGetTargetsResponseCallback::CallbackFn( // Java callback is allowed to be null, exit early if this is the case. VerifyOrReturn(javaCallbackRef != nullptr); - err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;Ljava/util/ArrayList;)V", - &javaMethod); + err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/ArrayList;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); - jobject DayOfWeekforSequence; - std::string DayOfWeekforSequenceClassName = "java/lang/Integer"; - std::string DayOfWeekforSequenceCtorSignature = "(I)V"; - jint jniDayOfWeekforSequence = static_cast(dataResponse.dayOfWeekforSequence.Raw()); - chip::JniReferences::GetInstance().CreateBoxedObject(DayOfWeekforSequenceClassName.c_str(), - DayOfWeekforSequenceCtorSignature.c_str(), jniDayOfWeekforSequence, - DayOfWeekforSequence); - jobject ChargingTargets; - chip::JniReferences::GetInstance().CreateArrayList(ChargingTargets); + jobject ChargingTargetSchedules; + chip::JniReferences::GetInstance().CreateArrayList(ChargingTargetSchedules); - auto iter_ChargingTargets_0 = dataResponse.chargingTargets.begin(); - while (iter_ChargingTargets_0.Next()) + auto iter_ChargingTargetSchedules_0 = dataResponse.chargingTargetSchedules.begin(); + while (iter_ChargingTargetSchedules_0.Next()) { - auto & entry_0 = iter_ChargingTargets_0.GetValue(); + auto & entry_0 = iter_ChargingTargetSchedules_0.GetValue(); jobject newElement_0; - jobject newElement_0_targetTimeMinutesPastMidnight; - std::string newElement_0_targetTimeMinutesPastMidnightClassName = "java/lang/Integer"; - std::string newElement_0_targetTimeMinutesPastMidnightCtorSignature = "(I)V"; - jint jninewElement_0_targetTimeMinutesPastMidnight = static_cast(entry_0.targetTimeMinutesPastMidnight); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_targetTimeMinutesPastMidnightClassName.c_str(), - newElement_0_targetTimeMinutesPastMidnightCtorSignature.c_str(), - jninewElement_0_targetTimeMinutesPastMidnight, - newElement_0_targetTimeMinutesPastMidnight); - jobject newElement_0_targetSoC; - if (!entry_0.targetSoC.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_targetSoC); - } - else + jobject newElement_0_dayOfWeekForSequence; + std::string newElement_0_dayOfWeekForSequenceClassName = "java/lang/Integer"; + std::string newElement_0_dayOfWeekForSequenceCtorSignature = "(I)V"; + jint jninewElement_0_dayOfWeekForSequence = static_cast(entry_0.dayOfWeekForSequence.Raw()); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_dayOfWeekForSequenceClassName.c_str(), newElement_0_dayOfWeekForSequenceCtorSignature.c_str(), + jninewElement_0_dayOfWeekForSequence, newElement_0_dayOfWeekForSequence); + jobject newElement_0_chargingTargets; + chip::JniReferences::GetInstance().CreateArrayList(newElement_0_chargingTargets); + + auto iter_newElement_0_chargingTargets_2 = entry_0.chargingTargets.begin(); + while (iter_newElement_0_chargingTargets_2.Next()) { - jobject newElement_0_targetSoCInsideOptional; - std::string newElement_0_targetSoCInsideOptionalClassName = "java/lang/Integer"; - std::string newElement_0_targetSoCInsideOptionalCtorSignature = "(I)V"; - jint jninewElement_0_targetSoCInsideOptional = static_cast(entry_0.targetSoC.Value()); + auto & entry_2 = iter_newElement_0_chargingTargets_2.GetValue(); + jobject newElement_2; + jobject newElement_2_targetTimeMinutesPastMidnight; + std::string newElement_2_targetTimeMinutesPastMidnightClassName = "java/lang/Integer"; + std::string newElement_2_targetTimeMinutesPastMidnightCtorSignature = "(I)V"; + jint jninewElement_2_targetTimeMinutesPastMidnight = static_cast(entry_2.targetTimeMinutesPastMidnight); chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_targetSoCInsideOptionalClassName.c_str(), newElement_0_targetSoCInsideOptionalCtorSignature.c_str(), - jninewElement_0_targetSoCInsideOptional, newElement_0_targetSoCInsideOptional); - chip::JniReferences::GetInstance().CreateOptional(newElement_0_targetSoCInsideOptional, newElement_0_targetSoC); - } - jobject newElement_0_addedEnergy; - if (!entry_0.addedEnergy.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_addedEnergy); - } - else - { - jobject newElement_0_addedEnergyInsideOptional; - std::string newElement_0_addedEnergyInsideOptionalClassName = "java/lang/Long"; - std::string newElement_0_addedEnergyInsideOptionalCtorSignature = "(J)V"; - jlong jninewElement_0_addedEnergyInsideOptional = static_cast(entry_0.addedEnergy.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_addedEnergyInsideOptionalClassName.c_str(), - newElement_0_addedEnergyInsideOptionalCtorSignature.c_str(), - jninewElement_0_addedEnergyInsideOptional, - newElement_0_addedEnergyInsideOptional); - chip::JniReferences::GetInstance().CreateOptional(newElement_0_addedEnergyInsideOptional, newElement_0_addedEnergy); + newElement_2_targetTimeMinutesPastMidnightClassName.c_str(), + newElement_2_targetTimeMinutesPastMidnightCtorSignature.c_str(), jninewElement_2_targetTimeMinutesPastMidnight, + newElement_2_targetTimeMinutesPastMidnight); + jobject newElement_2_targetSoC; + if (!entry_2.targetSoC.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_targetSoC); + } + else + { + jobject newElement_2_targetSoCInsideOptional; + std::string newElement_2_targetSoCInsideOptionalClassName = "java/lang/Integer"; + std::string newElement_2_targetSoCInsideOptionalCtorSignature = "(I)V"; + jint jninewElement_2_targetSoCInsideOptional = static_cast(entry_2.targetSoC.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_2_targetSoCInsideOptionalClassName.c_str(), + newElement_2_targetSoCInsideOptionalCtorSignature.c_str(), jninewElement_2_targetSoCInsideOptional, + newElement_2_targetSoCInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(newElement_2_targetSoCInsideOptional, newElement_2_targetSoC); + } + jobject newElement_2_addedEnergy; + if (!entry_2.addedEnergy.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_addedEnergy); + } + else + { + jobject newElement_2_addedEnergyInsideOptional; + std::string newElement_2_addedEnergyInsideOptionalClassName = "java/lang/Long"; + std::string newElement_2_addedEnergyInsideOptionalCtorSignature = "(J)V"; + jlong jninewElement_2_addedEnergyInsideOptional = static_cast(entry_2.addedEnergy.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_2_addedEnergyInsideOptionalClassName.c_str(), + newElement_2_addedEnergyInsideOptionalCtorSignature.c_str(), jninewElement_2_addedEnergyInsideOptional, + newElement_2_addedEnergyInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(newElement_2_addedEnergyInsideOptional, newElement_2_addedEnergy); + } + + jclass chargingTargetStructStructClass_3; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$EnergyEvseClusterChargingTargetStruct", chargingTargetStructStructClass_3); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$EnergyEvseClusterChargingTargetStruct"); + return; + } + + jmethodID chargingTargetStructStructCtor_3; + err = chip::JniReferences::GetInstance().FindMethod(env, chargingTargetStructStructClass_3, "", + "(Ljava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;)V", + &chargingTargetStructStructCtor_3); + if (err != CHIP_NO_ERROR || chargingTargetStructStructCtor_3 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$EnergyEvseClusterChargingTargetStruct constructor"); + return; + } + + newElement_2 = + env->NewObject(chargingTargetStructStructClass_3, chargingTargetStructStructCtor_3, + newElement_2_targetTimeMinutesPastMidnight, newElement_2_targetSoC, newElement_2_addedEnergy); + chip::JniReferences::GetInstance().AddToList(newElement_0_chargingTargets, newElement_2); } - jclass chargingTargetStructStructClass_1; + jclass chargingTargetScheduleStructStructClass_1; err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$EnergyEvseClusterChargingTargetStruct", chargingTargetStructStructClass_1); + env, "chip/devicecontroller/ChipStructs$EnergyEvseClusterChargingTargetScheduleStruct", + chargingTargetScheduleStructStructClass_1); if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$EnergyEvseClusterChargingTargetStruct"); + ChipLogError(Zcl, "Could not find class ChipStructs$EnergyEvseClusterChargingTargetScheduleStruct"); return; } - jmethodID chargingTargetStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod(env, chargingTargetStructStructClass_1, "", - "(Ljava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;)V", - &chargingTargetStructStructCtor_1); - if (err != CHIP_NO_ERROR || chargingTargetStructStructCtor_1 == nullptr) + jmethodID chargingTargetScheduleStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod(env, chargingTargetScheduleStructStructClass_1, "", + "(Ljava/lang/Integer;Ljava/util/ArrayList;)V", + &chargingTargetScheduleStructStructCtor_1); + if (err != CHIP_NO_ERROR || chargingTargetScheduleStructStructCtor_1 == nullptr) { - ChipLogError(Zcl, "Could not find ChipStructs$EnergyEvseClusterChargingTargetStruct constructor"); + ChipLogError(Zcl, "Could not find ChipStructs$EnergyEvseClusterChargingTargetScheduleStruct constructor"); return; } - newElement_0 = env->NewObject(chargingTargetStructStructClass_1, chargingTargetStructStructCtor_1, - newElement_0_targetTimeMinutesPastMidnight, newElement_0_targetSoC, newElement_0_addedEnergy); - chip::JniReferences::GetInstance().AddToList(ChargingTargets, newElement_0); + newElement_0 = env->NewObject(chargingTargetScheduleStructStructClass_1, chargingTargetScheduleStructStructCtor_1, + newElement_0_dayOfWeekForSequence, newElement_0_chargingTargets); + chip::JniReferences::GetInstance().AddToList(ChargingTargetSchedules, newElement_0); } - env->CallVoidMethod(javaCallbackRef, javaMethod, DayOfWeekforSequence, ChargingTargets); + env->CallVoidMethod(javaCallbackRef, javaMethod, ChargingTargetSchedules); } CHIPDoorLockClusterGetWeekDayScheduleResponseCallback::CHIPDoorLockClusterGetWeekDayScheduleResponseCallback(jobject javaCallback) : Callback::Callback(CallbackFn, this) diff --git a/src/controller/python/chip/clusters/CHIPClusters.py b/src/controller/python/chip/clusters/CHIPClusters.py index afe5190e8f96b9..d599bd7f46f730 100644 --- a/src/controller/python/chip/clusters/CHIPClusters.py +++ b/src/controller/python/chip/clusters/CHIPClusters.py @@ -6781,15 +6781,13 @@ class ChipClusters: "commandId": 0x00000005, "commandName": "SetTargets", "args": { - "dayOfWeekforSequence": "int", - "chargingTargets": "ChargingTargetStruct", + "chargingTargetSchedules": "ChargingTargetScheduleStruct", }, }, 0x00000006: { "commandId": 0x00000006, "commandName": "GetTargets", "args": { - "daysToReturn": "int", }, }, 0x00000007: { @@ -6868,18 +6866,6 @@ class ChipClusters: "reportable": True, "writable": True, }, - 0x00000021: { - "attributeName": "NumberOfWeeklyTargets", - "attributeId": 0x00000021, - "type": "int", - "reportable": True, - }, - 0x00000022: { - "attributeName": "NumberOfDailyTargets", - "attributeId": 0x00000022, - "type": "int", - "reportable": True, - }, 0x00000023: { "attributeName": "NextChargeStartTime", "attributeId": 0x00000023, diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py index 4a1c6a0c8400ec..6a2d53df035fe1 100644 --- a/src/controller/python/chip/clusters/Objects.py +++ b/src/controller/python/chip/clusters/Objects.py @@ -24009,8 +24009,6 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="maximumDischargeCurrent", Tag=0x00000008, Type=typing.Optional[int]), ClusterObjectFieldDescriptor(Label="userMaximumChargeCurrent", Tag=0x00000009, Type=typing.Optional[int]), ClusterObjectFieldDescriptor(Label="randomizationDelayWindow", Tag=0x0000000A, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="numberOfWeeklyTargets", Tag=0x00000021, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="numberOfDailyTargets", Tag=0x00000022, Type=typing.Optional[uint]), ClusterObjectFieldDescriptor(Label="nextChargeStartTime", Tag=0x00000023, Type=typing.Union[None, Nullable, uint]), ClusterObjectFieldDescriptor(Label="nextChargeTargetTime", Tag=0x00000024, Type=typing.Union[None, Nullable, uint]), ClusterObjectFieldDescriptor(Label="nextChargeRequiredEnergy", Tag=0x00000025, Type=typing.Union[None, Nullable, int]), @@ -24042,8 +24040,6 @@ def descriptor(cls) -> ClusterObjectDescriptor: maximumDischargeCurrent: 'typing.Optional[int]' = None userMaximumChargeCurrent: 'typing.Optional[int]' = None randomizationDelayWindow: 'typing.Optional[uint]' = None - numberOfWeeklyTargets: 'typing.Optional[uint]' = None - numberOfDailyTargets: 'typing.Optional[uint]' = None nextChargeStartTime: 'typing.Union[None, Nullable, uint]' = None nextChargeTargetTime: 'typing.Union[None, Nullable, uint]' = None nextChargeRequiredEnergy: 'typing.Union[None, Nullable, int]' = None @@ -24157,6 +24153,19 @@ def descriptor(cls) -> ClusterObjectDescriptor: targetSoC: 'typing.Optional[uint]' = None addedEnergy: 'typing.Optional[int]' = None + @dataclass + class ChargingTargetScheduleStruct(ClusterObject): + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="dayOfWeekForSequence", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="chargingTargets", Tag=1, Type=typing.List[EnergyEvse.Structs.ChargingTargetStruct]), + ]) + + dayOfWeekForSequence: 'uint' = 0 + chargingTargets: 'typing.List[EnergyEvse.Structs.ChargingTargetStruct]' = field(default_factory=lambda: []) + class Commands: @dataclass class GetTargetsResponse(ClusterCommand): @@ -24169,12 +24178,10 @@ class GetTargetsResponse(ClusterCommand): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="dayOfWeekforSequence", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="chargingTargets", Tag=1, Type=typing.List[EnergyEvse.Structs.ChargingTargetStruct]), + ClusterObjectFieldDescriptor(Label="chargingTargetSchedules", Tag=0, Type=typing.List[EnergyEvse.Structs.ChargingTargetScheduleStruct]), ]) - dayOfWeekforSequence: 'uint' = 0 - chargingTargets: 'typing.List[EnergyEvse.Structs.ChargingTargetStruct]' = field(default_factory=lambda: []) + chargingTargetSchedules: 'typing.List[EnergyEvse.Structs.ChargingTargetScheduleStruct]' = field(default_factory=lambda: []) @dataclass class Disable(ClusterCommand): @@ -24267,16 +24274,14 @@ class SetTargets(ClusterCommand): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="dayOfWeekforSequence", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="chargingTargets", Tag=1, Type=typing.List[EnergyEvse.Structs.ChargingTargetStruct]), + ClusterObjectFieldDescriptor(Label="chargingTargetSchedules", Tag=0, Type=typing.List[EnergyEvse.Structs.ChargingTargetScheduleStruct]), ]) @ChipUtility.classproperty def must_use_timed_invoke(cls) -> bool: return True - dayOfWeekforSequence: 'uint' = 0 - chargingTargets: 'typing.List[EnergyEvse.Structs.ChargingTargetStruct]' = field(default_factory=lambda: []) + chargingTargetSchedules: 'typing.List[EnergyEvse.Structs.ChargingTargetScheduleStruct]' = field(default_factory=lambda: []) @dataclass class GetTargets(ClusterCommand): @@ -24289,15 +24294,12 @@ class GetTargets(ClusterCommand): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="daysToReturn", Tag=0, Type=uint), ]) @ChipUtility.classproperty def must_use_timed_invoke(cls) -> bool: return True - daysToReturn: 'uint' = 0 - @dataclass class ClearTargets(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000099 @@ -24492,38 +24494,6 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Optional[uint]' = None - @dataclass - class NumberOfWeeklyTargets(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000099 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000021 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - - value: 'typing.Optional[uint]' = None - - @dataclass - class NumberOfDailyTargets(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000099 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000022 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - - value: 'typing.Optional[uint]' = None - @dataclass class NextChargeStartTime(ClusterAttributeDescriptor): @ChipUtility.classproperty diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm index 61c99664562981..d7d9849a4f9c57 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm @@ -3123,12 +3123,6 @@ static BOOL AttributeIsSpecifiedInEnergyEVSECluster(AttributeId aAttributeId) case Attributes::RandomizationDelayWindow::Id: { return YES; } - case Attributes::NumberOfWeeklyTargets::Id: { - return YES; - } - case Attributes::NumberOfDailyTargets::Id: { - return YES; - } case Attributes::NextChargeStartTime::Id: { return YES; } diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm index 6308eacacf72f9..acf77070414712 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm @@ -8679,28 +8679,6 @@ static id _Nullable DecodeAttributeValueForEnergyEVSECluster(AttributeId aAttrib value = [NSNumber numberWithUnsignedInt:cppValue]; return value; } - case Attributes::NumberOfWeeklyTargets::Id: { - using TypeInfo = Attributes::NumberOfWeeklyTargets::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; - return value; - } - case Attributes::NumberOfDailyTargets::Id: { - using TypeInfo = Attributes::NumberOfDailyTargets::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; - return value; - } case Attributes::NextChargeStartTime::Id: { using TypeInfo = Attributes::NextChargeStartTime::TypeInfo; TypeInfo::DecodableType cppValue; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h index 741bca21657ec4..f484ada4d19774 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h @@ -7734,7 +7734,9 @@ MTR_PROVISIONALLY_AVAILABLE * * Allows a client to retrieve the user specified charging targets. */ -- (void)getTargetsWithParams:(MTREnergyEVSEClusterGetTargetsParams *)params completion:(void (^)(MTREnergyEVSEClusterGetTargetsResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)getTargetsWithParams:(MTREnergyEVSEClusterGetTargetsParams * _Nullable)params completion:(void (^)(MTREnergyEVSEClusterGetTargetsResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)getTargetsWithCompletion:(void (^)(MTREnergyEVSEClusterGetTargetsResponseParams * _Nullable data, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; /** * Command ClearTargets * @@ -7814,18 +7816,6 @@ MTR_PROVISIONALLY_AVAILABLE reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; + (void)readAttributeRandomizationDelayWindowWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeNumberOfWeeklyTargetsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeNumberOfWeeklyTargetsWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeNumberOfWeeklyTargetsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - -- (void)readAttributeNumberOfDailyTargetsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeNumberOfDailyTargetsWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeNumberOfDailyTargetsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - - (void)readAttributeNextChargeStartTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - (void)subscribeAttributeNextChargeStartTimeWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm index 2f8a21416af04d..aa248a596e44b3 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm @@ -52030,7 +52030,11 @@ - (void)setTargetsWithParams:(MTREnergyEVSEClusterSetTargetsParams *)params comp queue:self.callbackQueue completion:responseHandler]; } -- (void)getTargetsWithParams:(MTREnergyEVSEClusterGetTargetsParams *)params completion:(void (^)(MTREnergyEVSEClusterGetTargetsResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)getTargetsWithCompletion:(void (^)(MTREnergyEVSEClusterGetTargetsResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + [self getTargetsWithParams:nil completion:completion]; +} +- (void)getTargetsWithParams:(MTREnergyEVSEClusterGetTargetsParams * _Nullable)params completion:(void (^)(MTREnergyEVSEClusterGetTargetsResponseParams * _Nullable data, NSError * _Nullable error))completion { if (params == nil) { params = [[MTREnergyEVSEClusterGetTargetsParams @@ -52541,78 +52545,6 @@ + (void)readAttributeRandomizationDelayWindowWithClusterStateCache:(MTRClusterSt completion:completion]; } -- (void)readAttributeNumberOfWeeklyTargetsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = EnergyEvse::Attributes::NumberOfWeeklyTargets::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeNumberOfWeeklyTargetsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = EnergyEvse::Attributes::NumberOfWeeklyTargets::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeNumberOfWeeklyTargetsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = EnergyEvse::Attributes::NumberOfWeeklyTargets::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeNumberOfDailyTargetsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = EnergyEvse::Attributes::NumberOfDailyTargets::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeNumberOfDailyTargetsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = EnergyEvse::Attributes::NumberOfDailyTargets::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeNumberOfDailyTargetsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = EnergyEvse::Attributes::NumberOfDailyTargets::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - - (void)readAttributeNextChargeStartTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = EnergyEvse::Attributes::NextChargeStartTime::TypeInfo; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h b/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h index 4f9fdb33c6cd0a..fedd4aa13d0628 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h @@ -2637,8 +2637,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterEnergyEVSEAttributeMaximumDischargeCurrentID MTR_PROVISIONALLY_AVAILABLE = 0x00000008, MTRAttributeIDTypeClusterEnergyEVSEAttributeUserMaximumChargeCurrentID MTR_PROVISIONALLY_AVAILABLE = 0x00000009, MTRAttributeIDTypeClusterEnergyEVSEAttributeRandomizationDelayWindowID MTR_PROVISIONALLY_AVAILABLE = 0x0000000A, - MTRAttributeIDTypeClusterEnergyEVSEAttributeNumberOfWeeklyTargetsID MTR_PROVISIONALLY_AVAILABLE = 0x00000021, - MTRAttributeIDTypeClusterEnergyEVSEAttributeNumberOfDailyTargetsID MTR_PROVISIONALLY_AVAILABLE = 0x00000022, MTRAttributeIDTypeClusterEnergyEVSEAttributeNextChargeStartTimeID MTR_PROVISIONALLY_AVAILABLE = 0x00000023, MTRAttributeIDTypeClusterEnergyEVSEAttributeNextChargeTargetTimeID MTR_PROVISIONALLY_AVAILABLE = 0x00000024, MTRAttributeIDTypeClusterEnergyEVSEAttributeNextChargeRequiredEnergyID MTR_PROVISIONALLY_AVAILABLE = 0x00000025, diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h index c1d6782c518c59..a102f158d5b0a4 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h @@ -3643,7 +3643,9 @@ MTR_PROVISIONALLY_AVAILABLE - (void)startDiagnosticsWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; - (void)setTargetsWithParams:(MTREnergyEVSEClusterSetTargetsParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; -- (void)getTargetsWithParams:(MTREnergyEVSEClusterGetTargetsParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTREnergyEVSEClusterGetTargetsResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)getTargetsWithParams:(MTREnergyEVSEClusterGetTargetsParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTREnergyEVSEClusterGetTargetsResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)getTargetsWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTREnergyEVSEClusterGetTargetsResponseParams * _Nullable data, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; - (void)clearTargetsWithParams:(MTREnergyEVSEClusterClearTargetsParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; - (void)clearTargetsWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; @@ -3674,10 +3676,6 @@ MTR_PROVISIONALLY_AVAILABLE - (void)writeAttributeRandomizationDelayWindowWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_PROVISIONALLY_AVAILABLE; - (void)writeAttributeRandomizationDelayWindowWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeNumberOfWeeklyTargetsWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - -- (NSDictionary * _Nullable)readAttributeNumberOfDailyTargetsWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - - (NSDictionary * _Nullable)readAttributeNextChargeStartTimeWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - (NSDictionary * _Nullable)readAttributeNextChargeTargetTimeWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm index bff98afd6ab590..11ca8e1ab2e8eb 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm @@ -9962,7 +9962,11 @@ - (void)setTargetsWithParams:(MTREnergyEVSEClusterSetTargetsParams *)params expe completion:responseHandler]; } -- (void)getTargetsWithParams:(MTREnergyEVSEClusterGetTargetsParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTREnergyEVSEClusterGetTargetsResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)getTargetsWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(void (^)(MTREnergyEVSEClusterGetTargetsResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + [self getTargetsWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; +} +- (void)getTargetsWithParams:(MTREnergyEVSEClusterGetTargetsParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTREnergyEVSEClusterGetTargetsResponseParams * _Nullable data, NSError * _Nullable error))completion { if (params == nil) { params = [[MTREnergyEVSEClusterGetTargetsParams @@ -10103,16 +10107,6 @@ - (void)writeAttributeRandomizationDelayWindowWithValue:(NSDictionary * _Nullable)readAttributeNumberOfWeeklyTargetsWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEnergyEVSEID) attributeID:@(MTRAttributeIDTypeClusterEnergyEVSEAttributeNumberOfWeeklyTargetsID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeNumberOfDailyTargetsWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEnergyEVSEID) attributeID:@(MTRAttributeIDTypeClusterEnergyEVSEAttributeNumberOfDailyTargetsID) params:params]; -} - - (NSDictionary * _Nullable)readAttributeNextChargeStartTimeWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEnergyEVSEID) attributeID:@(MTRAttributeIDTypeClusterEnergyEVSEAttributeNextChargeStartTimeID) params:params]; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h index f617ffcd65e400..1656beb4969d85 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h @@ -5846,9 +5846,7 @@ MTR_PROVISIONALLY_AVAILABLE MTR_PROVISIONALLY_AVAILABLE @interface MTREnergyEVSEClusterGetTargetsResponseParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull dayOfWeekforSequence MTR_PROVISIONALLY_AVAILABLE; - -@property (nonatomic, copy) NSArray * _Nonnull chargingTargets MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSArray * _Nonnull chargingTargetSchedules MTR_PROVISIONALLY_AVAILABLE; /** * Initialize an MTREnergyEVSEClusterGetTargetsResponseParams with a response-value dictionary @@ -5989,9 +5987,7 @@ MTR_PROVISIONALLY_AVAILABLE MTR_PROVISIONALLY_AVAILABLE @interface MTREnergyEVSEClusterSetTargetsParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull dayOfWeekforSequence MTR_PROVISIONALLY_AVAILABLE; - -@property (nonatomic, copy) NSArray * _Nonnull chargingTargets MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSArray * _Nonnull chargingTargetSchedules MTR_PROVISIONALLY_AVAILABLE; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -6020,8 +6016,6 @@ MTR_PROVISIONALLY_AVAILABLE MTR_PROVISIONALLY_AVAILABLE @interface MTREnergyEVSEClusterGetTargetsParams : NSObject - -@property (nonatomic, copy) NSNumber * _Nonnull daysToReturn MTR_PROVISIONALLY_AVAILABLE; /** * Controls whether the command is a timed command (using Timed Invoke). * diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm index 2a4863997b5143..a1e41d3407a968 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm @@ -16510,9 +16510,7 @@ - (instancetype)init { if (self = [super init]) { - _dayOfWeekforSequence = @(0); - - _chargingTargets = [NSArray array]; + _chargingTargetSchedules = [NSArray array]; } return self; } @@ -16521,15 +16519,14 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTREnergyEVSEClusterGetTargetsResponseParams alloc] init]; - other.dayOfWeekforSequence = self.dayOfWeekforSequence; - other.chargingTargets = self.chargingTargets; + other.chargingTargetSchedules = self.chargingTargetSchedules; return other; } - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: dayOfWeekforSequence:%@; chargingTargets:%@; >", NSStringFromClass([self class]), _dayOfWeekforSequence, _chargingTargets]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: chargingTargetSchedules:%@; >", NSStringFromClass([self class]), _chargingTargetSchedules]; return descriptionString; } @@ -16579,27 +16576,40 @@ @implementation MTREnergyEVSEClusterGetTargetsResponseParams (InternalMethods) - (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::EnergyEvse::Commands::GetTargetsResponse::DecodableType &)decodableStruct { - { - self.dayOfWeekforSequence = [NSNumber numberWithUnsignedChar:decodableStruct.dayOfWeekforSequence.Raw()]; - } { { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; - auto iter_0 = decodableStruct.chargingTargets.begin(); + auto iter_0 = decodableStruct.chargingTargetSchedules.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - MTREnergyEVSEClusterChargingTargetStruct * newElement_0; - newElement_0 = [MTREnergyEVSEClusterChargingTargetStruct new]; - newElement_0.targetTimeMinutesPastMidnight = [NSNumber numberWithUnsignedShort:entry_0.targetTimeMinutesPastMidnight]; - if (entry_0.targetSoC.HasValue()) { - newElement_0.targetSoC = [NSNumber numberWithUnsignedChar:entry_0.targetSoC.Value()]; - } else { - newElement_0.targetSoC = nil; - } - if (entry_0.addedEnergy.HasValue()) { - newElement_0.addedEnergy = [NSNumber numberWithLongLong:entry_0.addedEnergy.Value()]; - } else { - newElement_0.addedEnergy = nil; + MTREnergyEVSEClusterChargingTargetScheduleStruct * newElement_0; + newElement_0 = [MTREnergyEVSEClusterChargingTargetScheduleStruct new]; + newElement_0.dayOfWeekForSequence = [NSNumber numberWithUnsignedChar:entry_0.dayOfWeekForSequence.Raw()]; + { // Scope for our temporary variables + auto * array_2 = [NSMutableArray new]; + auto iter_2 = entry_0.chargingTargets.begin(); + while (iter_2.Next()) { + auto & entry_2 = iter_2.GetValue(); + MTREnergyEVSEClusterChargingTargetStruct * newElement_2; + newElement_2 = [MTREnergyEVSEClusterChargingTargetStruct new]; + newElement_2.targetTimeMinutesPastMidnight = [NSNumber numberWithUnsignedShort:entry_2.targetTimeMinutesPastMidnight]; + if (entry_2.targetSoC.HasValue()) { + newElement_2.targetSoC = [NSNumber numberWithUnsignedChar:entry_2.targetSoC.Value()]; + } else { + newElement_2.targetSoC = nil; + } + if (entry_2.addedEnergy.HasValue()) { + newElement_2.addedEnergy = [NSNumber numberWithLongLong:entry_2.addedEnergy.Value()]; + } else { + newElement_2.addedEnergy = nil; + } + [array_2 addObject:newElement_2]; + } + CHIP_ERROR err = iter_2.GetStatus(); + if (err != CHIP_NO_ERROR) { + return err; + } + newElement_0.chargingTargets = array_2; } [array_0 addObject:newElement_0]; } @@ -16607,7 +16617,7 @@ - (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::EnergyEv if (err != CHIP_NO_ERROR) { return err; } - self.chargingTargets = array_0; + self.chargingTargetSchedules = array_0; } } return CHIP_NO_ERROR; @@ -16952,9 +16962,7 @@ - (instancetype)init { if (self = [super init]) { - _dayOfWeekforSequence = @(0); - - _chargingTargets = [NSArray array]; + _chargingTargetSchedules = [NSArray array]; _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -16965,8 +16973,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTREnergyEVSEClusterSetTargetsParams alloc] init]; - other.dayOfWeekforSequence = self.dayOfWeekforSequence; - other.chargingTargets = self.chargingTargets; + other.chargingTargetSchedules = self.chargingTargetSchedules; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -16975,7 +16982,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: dayOfWeekforSequence:%@; chargingTargets:%@; >", NSStringFromClass([self class]), _dayOfWeekforSequence, _chargingTargets]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: chargingTargetSchedules:%@; >", NSStringFromClass([self class]), _chargingTargetSchedules]; return descriptionString; } @@ -16987,38 +16994,57 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { chip::app::Clusters::EnergyEvse::Commands::SetTargets::Type encodableStruct; ListFreer listFreer; - { - encodableStruct.dayOfWeekforSequence = static_cast>(self.dayOfWeekforSequence.unsignedCharValue); - } { { - using ListType_0 = std::remove_reference_t; + using ListType_0 = std::remove_reference_t; using ListMemberType_0 = ListMemberTypeGetter::Type; - if (self.chargingTargets.count != 0) { - auto * listHolder_0 = new ListHolder(self.chargingTargets.count); + if (self.chargingTargetSchedules.count != 0) { + auto * listHolder_0 = new ListHolder(self.chargingTargetSchedules.count); if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { return CHIP_ERROR_INVALID_ARGUMENT; } listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < self.chargingTargets.count; ++i_0) { - if (![self.chargingTargets[i_0] isKindOfClass:[MTREnergyEVSEClusterChargingTargetStruct class]]) { + for (size_t i_0 = 0; i_0 < self.chargingTargetSchedules.count; ++i_0) { + if (![self.chargingTargetSchedules[i_0] isKindOfClass:[MTREnergyEVSEClusterChargingTargetScheduleStruct class]]) { // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - auto element_0 = (MTREnergyEVSEClusterChargingTargetStruct *) self.chargingTargets[i_0]; - listHolder_0->mList[i_0].targetTimeMinutesPastMidnight = element_0.targetTimeMinutesPastMidnight.unsignedShortValue; - if (element_0.targetSoC != nil) { - auto & definedValue_2 = listHolder_0->mList[i_0].targetSoC.Emplace(); - definedValue_2 = element_0.targetSoC.unsignedCharValue; - } - if (element_0.addedEnergy != nil) { - auto & definedValue_2 = listHolder_0->mList[i_0].addedEnergy.Emplace(); - definedValue_2 = element_0.addedEnergy.longLongValue; + auto element_0 = (MTREnergyEVSEClusterChargingTargetScheduleStruct *) self.chargingTargetSchedules[i_0]; + listHolder_0->mList[i_0].dayOfWeekForSequence = static_castmList[i_0].dayOfWeekForSequence)>>(element_0.dayOfWeekForSequence.unsignedCharValue); + { + using ListType_2 = std::remove_reference_tmList[i_0].chargingTargets)>; + using ListMemberType_2 = ListMemberTypeGetter::Type; + if (element_0.chargingTargets.count != 0) { + auto * listHolder_2 = new ListHolder(element_0.chargingTargets.count); + if (listHolder_2 == nullptr || listHolder_2->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_2); + for (size_t i_2 = 0; i_2 < element_0.chargingTargets.count; ++i_2) { + if (![element_0.chargingTargets[i_2] isKindOfClass:[MTREnergyEVSEClusterChargingTargetStruct class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_2 = (MTREnergyEVSEClusterChargingTargetStruct *) element_0.chargingTargets[i_2]; + listHolder_2->mList[i_2].targetTimeMinutesPastMidnight = element_2.targetTimeMinutesPastMidnight.unsignedShortValue; + if (element_2.targetSoC != nil) { + auto & definedValue_4 = listHolder_2->mList[i_2].targetSoC.Emplace(); + definedValue_4 = element_2.targetSoC.unsignedCharValue; + } + if (element_2.addedEnergy != nil) { + auto & definedValue_4 = listHolder_2->mList[i_2].addedEnergy.Emplace(); + definedValue_4 = element_2.addedEnergy.longLongValue; + } + } + listHolder_0->mList[i_0].chargingTargets = ListType_2(listHolder_2->mList, element_0.chargingTargets.count); + } else { + listHolder_0->mList[i_0].chargingTargets = ListType_2(); + } } } - encodableStruct.chargingTargets = ListType_0(listHolder_0->mList, self.chargingTargets.count); + encodableStruct.chargingTargetSchedules = ListType_0(listHolder_0->mList, self.chargingTargetSchedules.count); } else { - encodableStruct.chargingTargets = ListType_0(); + encodableStruct.chargingTargetSchedules = ListType_0(); } } } @@ -17065,8 +17091,6 @@ @implementation MTREnergyEVSEClusterGetTargetsParams - (instancetype)init { if (self = [super init]) { - - _daysToReturn = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -17077,7 +17101,6 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTREnergyEVSEClusterGetTargetsParams alloc] init]; - other.daysToReturn = self.daysToReturn; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -17086,7 +17109,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: daysToReturn:%@; >", NSStringFromClass([self class]), _daysToReturn]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; return descriptionString; } @@ -17098,9 +17121,6 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { chip::app::Clusters::EnergyEvse::Commands::GetTargets::Type encodableStruct; ListFreer listFreer; - { - encodableStruct.daysToReturn = static_cast>(self.daysToReturn.unsignedCharValue); - } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h index 064bd1f321d21e..d57f138fa53256 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h @@ -1283,6 +1283,12 @@ MTR_PROVISIONALLY_AVAILABLE @property (nonatomic, copy) NSNumber * _Nullable addedEnergy MTR_PROVISIONALLY_AVAILABLE; @end +MTR_PROVISIONALLY_AVAILABLE +@interface MTREnergyEVSEClusterChargingTargetScheduleStruct : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull dayOfWeekForSequence MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSArray * _Nonnull chargingTargets MTR_PROVISIONALLY_AVAILABLE; +@end + MTR_PROVISIONALLY_AVAILABLE @interface MTREnergyEVSEClusterEVConnectedEvent : NSObject @property (nonatomic, copy) NSNumber * _Nonnull sessionID MTR_PROVISIONALLY_AVAILABLE; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm index d8b97ec82d42fa..810e778412f5c8 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm @@ -5241,6 +5241,36 @@ - (NSString *)description @end +@implementation MTREnergyEVSEClusterChargingTargetScheduleStruct +- (instancetype)init +{ + if (self = [super init]) { + + _dayOfWeekForSequence = @(0); + + _chargingTargets = [NSArray array]; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone +{ + auto other = [[MTREnergyEVSEClusterChargingTargetScheduleStruct alloc] init]; + + other.dayOfWeekForSequence = self.dayOfWeekForSequence; + other.chargingTargets = self.chargingTargets; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: dayOfWeekForSequence:%@; chargingTargets:%@; >", NSStringFromClass([self class]), _dayOfWeekForSequence, _chargingTargets]; + return descriptionString; +} + +@end + @implementation MTREnergyEVSEClusterEVConnectedEvent - (instancetype)init { diff --git a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp index 6f3fba5935f84d..8d4b8eda31fbf1 100644 --- a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp +++ b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp @@ -10437,68 +10437,6 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) namespace EnergyEvse { namespace Attributes { -namespace NumberOfWeeklyTargets { - -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::EnergyEvse::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - *value = Traits::StorageToWorking(temp); - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::EnergyEvse::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); -} - -} // namespace NumberOfWeeklyTargets - -namespace NumberOfDailyTargets { - -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::EnergyEvse::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - *value = Traits::StorageToWorking(temp); - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::EnergyEvse::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); -} - -} // namespace NumberOfDailyTargets - namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) diff --git a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h index 2fed842607a66e..bee14fa51268c8 100644 --- a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h +++ b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h @@ -2033,16 +2033,6 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); namespace EnergyEvse { namespace Attributes { -namespace NumberOfWeeklyTargets { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // int8u -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); -} // namespace NumberOfWeeklyTargets - -namespace NumberOfDailyTargets { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // int8u -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); -} // namespace NumberOfDailyTargets - namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value); // int16u EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp index 3e7412349926bb..a0d28f1a74cb05 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp @@ -15895,14 +15895,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace ChargingTargetStruct -} // namespace Structs -namespace Commands { -namespace GetTargetsResponse { +namespace ChargingTargetScheduleStruct { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kDayOfWeekforSequence), dayOfWeekforSequence); + encoder.Encode(to_underlying(Fields::kDayOfWeekForSequence), dayOfWeekForSequence); encoder.Encode(to_underlying(Fields::kChargingTargets), chargingTargets); return encoder.Finalize(); } @@ -15921,9 +15919,9 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kDayOfWeekforSequence)) + if (__context_tag == to_underlying(Fields::kDayOfWeekForSequence)) { - err = DataModel::Decode(reader, dayOfWeekforSequence); + err = DataModel::Decode(reader, dayOfWeekForSequence); } else if (__context_tag == to_underlying(Fields::kChargingTargets)) { @@ -15936,6 +15934,44 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } + +} // namespace ChargingTargetScheduleStruct +} // namespace Structs + +namespace Commands { +namespace GetTargetsResponse { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kChargingTargetSchedules), chargingTargetSchedules); + return encoder.Finalize(); +} + +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +{ + detail::StructDecodeIterator __iterator(reader); + while (true) + { + auto __element = __iterator.Next(); + if (std::holds_alternative(__element)) + { + return std::get(__element); + } + + CHIP_ERROR err = CHIP_NO_ERROR; + const uint8_t __context_tag = std::get(__element); + + if (__context_tag == to_underlying(Fields::kChargingTargetSchedules)) + { + err = DataModel::Decode(reader, chargingTargetSchedules); + } + else + { + } + + ReturnErrorOnFailure(err); + } +} } // namespace GetTargetsResponse. namespace Disable { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const @@ -16064,8 +16100,7 @@ namespace SetTargets { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kDayOfWeekforSequence), dayOfWeekforSequence); - encoder.Encode(to_underlying(Fields::kChargingTargets), chargingTargets); + encoder.Encode(to_underlying(Fields::kChargingTargetSchedules), chargingTargetSchedules); return encoder.Finalize(); } @@ -16083,13 +16118,9 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kDayOfWeekforSequence)) + if (__context_tag == to_underlying(Fields::kChargingTargetSchedules)) { - err = DataModel::Decode(reader, dayOfWeekforSequence); - } - else if (__context_tag == to_underlying(Fields::kChargingTargets)) - { - err = DataModel::Decode(reader, chargingTargets); + err = DataModel::Decode(reader, chargingTargetSchedules); } else { @@ -16103,7 +16134,6 @@ namespace GetTargets { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kDaysToReturn), daysToReturn); return encoder.Finalize(); } @@ -16117,19 +16147,6 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) { return std::get(__element); } - - CHIP_ERROR err = CHIP_NO_ERROR; - const uint8_t __context_tag = std::get(__element); - - if (__context_tag == to_underlying(Fields::kDaysToReturn)) - { - err = DataModel::Decode(reader, daysToReturn); - } - else - { - } - - ReturnErrorOnFailure(err); } } } // namespace GetTargets. @@ -16182,10 +16199,6 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre return DataModel::Decode(reader, userMaximumChargeCurrent); case Attributes::RandomizationDelayWindow::TypeInfo::GetAttributeId(): return DataModel::Decode(reader, randomizationDelayWindow); - case Attributes::NumberOfWeeklyTargets::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, numberOfWeeklyTargets); - case Attributes::NumberOfDailyTargets::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, numberOfDailyTargets); case Attributes::NextChargeStartTime::TypeInfo::GetAttributeId(): return DataModel::Decode(reader, nextChargeStartTime); case Attributes::NextChargeTargetTime::TypeInfo::GetAttributeId(): diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h index 69683f07a7006e..f85e0335903656 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h @@ -22096,6 +22096,36 @@ struct Type using DecodableType = Type; } // namespace ChargingTargetStruct +namespace ChargingTargetScheduleStruct { +enum class Fields : uint8_t +{ + kDayOfWeekForSequence = 0, + kChargingTargets = 1, +}; + +struct Type +{ +public: + chip::BitMask dayOfWeekForSequence = static_cast>(0); + DataModel::List chargingTargets; + + static constexpr bool kIsFabricScoped = false; + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; +}; + +struct DecodableType +{ +public: + chip::BitMask dayOfWeekForSequence = static_cast>(0); + DataModel::DecodableList chargingTargets; + + CHIP_ERROR Decode(TLV::TLVReader & reader); + + static constexpr bool kIsFabricScoped = false; +}; + +} // namespace ChargingTargetScheduleStruct } // namespace Structs namespace Commands { @@ -22147,8 +22177,7 @@ namespace Commands { namespace GetTargetsResponse { enum class Fields : uint8_t { - kDayOfWeekforSequence = 0, - kChargingTargets = 1, + kChargingTargetSchedules = 0, }; struct Type @@ -22158,8 +22187,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::GetTargetsResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::EnergyEvse::Id; } - chip::BitMask dayOfWeekforSequence = static_cast>(0); - DataModel::List chargingTargets; + DataModel::List chargingTargetSchedules; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; @@ -22174,8 +22202,7 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::GetTargetsResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::EnergyEvse::Id; } - chip::BitMask dayOfWeekforSequence = static_cast>(0); - DataModel::DecodableList chargingTargets; + DataModel::DecodableList chargingTargetSchedules; CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace GetTargetsResponse @@ -22311,8 +22338,7 @@ struct DecodableType namespace SetTargets { enum class Fields : uint8_t { - kDayOfWeekforSequence = 0, - kChargingTargets = 1, + kChargingTargetSchedules = 0, }; struct Type @@ -22322,8 +22348,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::SetTargets::Id; } static constexpr ClusterId GetClusterId() { return Clusters::EnergyEvse::Id; } - chip::BitMask dayOfWeekforSequence = static_cast>(0); - DataModel::List chargingTargets; + DataModel::List chargingTargetSchedules; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; @@ -22338,15 +22363,13 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::SetTargets::Id; } static constexpr ClusterId GetClusterId() { return Clusters::EnergyEvse::Id; } - chip::BitMask dayOfWeekforSequence = static_cast>(0); - DataModel::DecodableList chargingTargets; + DataModel::DecodableList chargingTargetSchedules; CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace SetTargets namespace GetTargets { enum class Fields : uint8_t { - kDaysToReturn = 0, }; struct Type @@ -22356,8 +22379,6 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::GetTargets::Id; } static constexpr ClusterId GetClusterId() { return Clusters::EnergyEvse::Id; } - chip::BitMask daysToReturn = static_cast>(0); - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = Clusters::EnergyEvse::Commands::GetTargetsResponse::DecodableType; @@ -22371,7 +22392,6 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::GetTargets::Id; } static constexpr ClusterId GetClusterId() { return Clusters::EnergyEvse::Id; } - chip::BitMask daysToReturn = static_cast>(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace GetTargets @@ -22539,30 +22559,6 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace RandomizationDelayWindow -namespace NumberOfWeeklyTargets { -struct TypeInfo -{ - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; - - static constexpr ClusterId GetClusterId() { return Clusters::EnergyEvse::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::NumberOfWeeklyTargets::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace NumberOfWeeklyTargets -namespace NumberOfDailyTargets { -struct TypeInfo -{ - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; - - static constexpr ClusterId GetClusterId() { return Clusters::EnergyEvse::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::NumberOfDailyTargets::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace NumberOfDailyTargets namespace NextChargeStartTime { struct TypeInfo { @@ -22766,8 +22762,6 @@ struct TypeInfo Attributes::MaximumDischargeCurrent::TypeInfo::DecodableType maximumDischargeCurrent = static_cast(0); Attributes::UserMaximumChargeCurrent::TypeInfo::DecodableType userMaximumChargeCurrent = static_cast(0); Attributes::RandomizationDelayWindow::TypeInfo::DecodableType randomizationDelayWindow = static_cast(0); - Attributes::NumberOfWeeklyTargets::TypeInfo::DecodableType numberOfWeeklyTargets = static_cast(0); - Attributes::NumberOfDailyTargets::TypeInfo::DecodableType numberOfDailyTargets = static_cast(0); Attributes::NextChargeStartTime::TypeInfo::DecodableType nextChargeStartTime; Attributes::NextChargeTargetTime::TypeInfo::DecodableType nextChargeTargetTime; Attributes::NextChargeRequiredEnergy::TypeInfo::DecodableType nextChargeRequiredEnergy; diff --git a/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h b/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h index 62785377b59df5..f2ce8f91f96885 100644 --- a/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h +++ b/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h @@ -3886,14 +3886,6 @@ namespace RandomizationDelayWindow { static constexpr AttributeId Id = 0x0000000A; } // namespace RandomizationDelayWindow -namespace NumberOfWeeklyTargets { -static constexpr AttributeId Id = 0x00000021; -} // namespace NumberOfWeeklyTargets - -namespace NumberOfDailyTargets { -static constexpr AttributeId Id = 0x00000022; -} // namespace NumberOfDailyTargets - namespace NextChargeStartTime { static constexpr AttributeId Id = 0x00000023; } // namespace NextChargeStartTime diff --git a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h index df306407c81780..12c9198618fac5 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h @@ -7217,8 +7217,6 @@ class DeviceEnergyManagementRequestConstraintBasedForecast : public ClusterComma | * MaximumDischargeCurrent | 0x0008 | | * UserMaximumChargeCurrent | 0x0009 | | * RandomizationDelayWindow | 0x000A | -| * NumberOfWeeklyTargets | 0x0021 | -| * NumberOfDailyTargets | 0x0022 | | * NextChargeStartTime | 0x0023 | | * NextChargeTargetTime | 0x0024 | | * NextChargeRequiredEnergy | 0x0025 | @@ -7405,10 +7403,9 @@ class EnergyEvseSetTargets : public ClusterCommand { public: EnergyEvseSetTargets(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("set-targets", credsIssuerConfig), mComplex_ChargingTargets(&mRequest.chargingTargets) + ClusterCommand("set-targets", credsIssuerConfig), mComplex_ChargingTargetSchedules(&mRequest.chargingTargetSchedules) { - AddArgument("DayOfWeekforSequence", 0, UINT8_MAX, &mRequest.dayOfWeekforSequence); - AddArgument("ChargingTargets", &mComplex_ChargingTargets); + AddArgument("ChargingTargetSchedules", &mComplex_ChargingTargetSchedules); ClusterCommand::AddArguments(); } @@ -7435,8 +7432,9 @@ class EnergyEvseSetTargets : public ClusterCommand private: chip::app::Clusters::EnergyEvse::Commands::SetTargets::Type mRequest; - TypedComplexArgument> - mComplex_ChargingTargets; + TypedComplexArgument< + chip::app::DataModel::List> + mComplex_ChargingTargetSchedules; }; /* @@ -7447,7 +7445,6 @@ class EnergyEvseGetTargets : public ClusterCommand public: EnergyEvseGetTargets(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("get-targets", credsIssuerConfig) { - AddArgument("DaysToReturn", 0, UINT8_MAX, &mRequest.daysToReturn); ClusterCommand::AddArguments(); } @@ -20253,11 +20250,9 @@ void registerClusterEnergyEvse(Commands & commands, CredentialIssuerCommands * c make_unique(Id, "user-maximum-charge-current", Attributes::UserMaximumChargeCurrent::Id, credsIssuerConfig), // make_unique(Id, "randomization-delay-window", Attributes::RandomizationDelayWindow::Id, - credsIssuerConfig), // - make_unique(Id, "number-of-weekly-targets", Attributes::NumberOfWeeklyTargets::Id, credsIssuerConfig), // - make_unique(Id, "number-of-daily-targets", Attributes::NumberOfDailyTargets::Id, credsIssuerConfig), // - make_unique(Id, "next-charge-start-time", Attributes::NextChargeStartTime::Id, credsIssuerConfig), // - make_unique(Id, "next-charge-target-time", Attributes::NextChargeTargetTime::Id, credsIssuerConfig), // + credsIssuerConfig), // + make_unique(Id, "next-charge-start-time", Attributes::NextChargeStartTime::Id, credsIssuerConfig), // + make_unique(Id, "next-charge-target-time", Attributes::NextChargeTargetTime::Id, credsIssuerConfig), // make_unique(Id, "next-charge-required-energy", Attributes::NextChargeRequiredEnergy::Id, credsIssuerConfig), // make_unique(Id, "next-charge-target-so-c", Attributes::NextChargeTargetSoC::Id, credsIssuerConfig), // @@ -20305,10 +20300,6 @@ void registerClusterEnergyEvse(Commands & commands, CredentialIssuerCommands * c make_unique>(Id, "randomization-delay-window", 0, UINT32_MAX, Attributes::RandomizationDelayWindow::Id, WriteCommandType::kWrite, credsIssuerConfig), // - make_unique>(Id, "number-of-weekly-targets", 0, UINT8_MAX, Attributes::NumberOfWeeklyTargets::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "number-of-daily-targets", 0, UINT8_MAX, Attributes::NumberOfDailyTargets::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>>(Id, "next-charge-start-time", 0, UINT32_MAX, Attributes::NextChargeStartTime::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // @@ -20371,10 +20362,7 @@ void registerClusterEnergyEvse(Commands & commands, CredentialIssuerCommands * c make_unique(Id, "user-maximum-charge-current", Attributes::UserMaximumChargeCurrent::Id, credsIssuerConfig), // make_unique(Id, "randomization-delay-window", Attributes::RandomizationDelayWindow::Id, - credsIssuerConfig), // - make_unique(Id, "number-of-weekly-targets", Attributes::NumberOfWeeklyTargets::Id, credsIssuerConfig), // - make_unique(Id, "number-of-daily-targets", Attributes::NumberOfDailyTargets::Id, credsIssuerConfig), // make_unique(Id, "next-charge-start-time", Attributes::NextChargeStartTime::Id, credsIssuerConfig), // make_unique(Id, "next-charge-target-time", Attributes::NextChargeTargetTime::Id, credsIssuerConfig), // make_unique(Id, "next-charge-required-energy", Attributes::NextChargeRequiredEnergy::Id, diff --git a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp index a408c656cbb2a8..2d016ac47c8996 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp +++ b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp @@ -3251,6 +3251,39 @@ void ComplexArgumentParser::Finalize(chip::app::Clusters::EnergyEvse::Structs::C ComplexArgumentParser::Finalize(request.addedEnergy); } +CHIP_ERROR ComplexArgumentParser::Setup(const char * label, + chip::app::Clusters::EnergyEvse::Structs::ChargingTargetScheduleStruct::Type & request, + Json::Value & value) +{ + VerifyOrReturnError(value.isObject(), CHIP_ERROR_INVALID_ARGUMENT); + + // Copy to track which members we already processed. + Json::Value valueCopy(value); + + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("ChargingTargetScheduleStruct.dayOfWeekForSequence", + "dayOfWeekForSequence", value.isMember("dayOfWeekForSequence"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("ChargingTargetScheduleStruct.chargingTargets", "chargingTargets", + value.isMember("chargingTargets"))); + + char labelWithMember[kMaxLabelLength]; + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "dayOfWeekForSequence"); + ReturnErrorOnFailure( + ComplexArgumentParser::Setup(labelWithMember, request.dayOfWeekForSequence, value["dayOfWeekForSequence"])); + valueCopy.removeMember("dayOfWeekForSequence"); + + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "chargingTargets"); + ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.chargingTargets, value["chargingTargets"])); + valueCopy.removeMember("chargingTargets"); + + return ComplexArgumentParser::EnsureNoMembersRemaining(label, valueCopy); +} + +void ComplexArgumentParser::Finalize(chip::app::Clusters::EnergyEvse::Structs::ChargingTargetScheduleStruct::Type & request) +{ + ComplexArgumentParser::Finalize(request.dayOfWeekForSequence); + ComplexArgumentParser::Finalize(request.chargingTargets); +} + CHIP_ERROR ComplexArgumentParser::Setup(const char * label, chip::app::Clusters::EnergyPreference::Structs::BalanceStruct::Type & request, Json::Value & value) diff --git a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.h b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.h index 3af522eef41dea..a05d064f16e66e 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.h @@ -378,6 +378,11 @@ static CHIP_ERROR Setup(const char * label, chip::app::Clusters::EnergyEvse::Str static void Finalize(chip::app::Clusters::EnergyEvse::Structs::ChargingTargetStruct::Type & request); +static CHIP_ERROR Setup(const char * label, chip::app::Clusters::EnergyEvse::Structs::ChargingTargetScheduleStruct::Type & request, + Json::Value & value); + +static void Finalize(chip::app::Clusters::EnergyEvse::Structs::ChargingTargetScheduleStruct::Type & request); + static CHIP_ERROR Setup(const char * label, chip::app::Clusters::EnergyPreference::Structs::BalanceStruct::Type & request, Json::Value & value); diff --git a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp index d38c78eded3f2b..4026dc9e4e0dd3 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp +++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp @@ -2891,6 +2891,32 @@ CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, return CHIP_NO_ERROR; } +CHIP_ERROR +DataModelLogger::LogValue(const char * label, size_t indent, + const chip::app::Clusters::EnergyEvse::Structs::ChargingTargetScheduleStruct::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + { + CHIP_ERROR err = LogValue("DayOfWeekForSequence", indent + 1, value.dayOfWeekForSequence); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'DayOfWeekForSequence'"); + return err; + } + } + { + CHIP_ERROR err = LogValue("ChargingTargets", indent + 1, value.chargingTargets); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'ChargingTargets'"); + return err; + } + } + DataModelLogger::LogString(indent, "}"); + + return CHIP_NO_ERROR; +} + CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, const chip::app::Clusters::EnergyPreference::Structs::BalanceStruct::DecodableType & value) { @@ -7228,8 +7254,7 @@ CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, const EnergyEvse::Commands::GetTargetsResponse::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); - ReturnErrorOnFailure(DataModelLogger::LogValue("dayOfWeekforSequence", indent + 1, value.dayOfWeekforSequence)); - ReturnErrorOnFailure(DataModelLogger::LogValue("chargingTargets", indent + 1, value.chargingTargets)); + ReturnErrorOnFailure(DataModelLogger::LogValue("chargingTargetSchedules", indent + 1, value.chargingTargetSchedules)); DataModelLogger::LogString(indent, "}"); return CHIP_NO_ERROR; } @@ -12347,16 +12372,6 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("RandomizationDelayWindow", 1, value); } - case EnergyEvse::Attributes::NumberOfWeeklyTargets::Id: { - uint8_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("NumberOfWeeklyTargets", 1, value); - } - case EnergyEvse::Attributes::NumberOfDailyTargets::Id: { - uint8_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("NumberOfDailyTargets", 1, value); - } case EnergyEvse::Attributes::NextChargeStartTime::Id: { chip::app::DataModel::Nullable value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); diff --git a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h index 559b6e7a21f5c0..434ee6ee558e2d 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h @@ -238,6 +238,9 @@ static CHIP_ERROR LogValue(const char * label, size_t indent, static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::EnergyEvse::Structs::ChargingTargetStruct::DecodableType & value); +static CHIP_ERROR LogValue(const char * label, size_t indent, + const chip::app::Clusters::EnergyEvse::Structs::ChargingTargetScheduleStruct::DecodableType & value); + static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::EnergyPreference::Structs::BalanceStruct::DecodableType & value); diff --git a/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h b/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h index 674714905aada3..85d892b9960f75 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h @@ -81217,8 +81217,6 @@ class SubscribeAttributeDeviceEnergyManagementClusterRevision : public Subscribe | * MaximumDischargeCurrent | 0x0008 | | * UserMaximumChargeCurrent | 0x0009 | | * RandomizationDelayWindow | 0x000A | -| * NumberOfWeeklyTargets | 0x0021 | -| * NumberOfDailyTargets | 0x0022 | | * NextChargeStartTime | 0x0023 | | * NextChargeTargetTime | 0x0024 | | * NextChargeRequiredEnergy | 0x0025 | @@ -81479,13 +81477,10 @@ class EnergyEvseSetTargets : public ClusterCommand { public: EnergyEvseSetTargets() : ClusterCommand("set-targets") - , mComplex_ChargingTargets(&mRequest.chargingTargets) + , mComplex_ChargingTargetSchedules(&mRequest.chargingTargetSchedules) { #if MTR_ENABLE_PROVISIONAL - AddArgument("DayOfWeekforSequence", 0, UINT8_MAX, &mRequest.dayOfWeekforSequence); -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - AddArgument("ChargingTargets", &mComplex_ChargingTargets); + AddArgument("ChargingTargetSchedules", &mComplex_ChargingTargetSchedules); #endif // MTR_ENABLE_PROVISIONAL ClusterCommand::AddArguments(); } @@ -81501,29 +81496,36 @@ class EnergyEvseSetTargets : public ClusterCommand { __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTREnergyEVSEClusterSetTargetsParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; -#if MTR_ENABLE_PROVISIONAL - params.dayOfWeekforSequence = [NSNumber numberWithUnsignedChar:mRequest.dayOfWeekforSequence.Raw()]; -#endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; - for (auto & entry_0 : mRequest.chargingTargets) { - MTREnergyEVSEClusterChargingTargetStruct * newElement_0; - newElement_0 = [MTREnergyEVSEClusterChargingTargetStruct new]; - newElement_0.targetTimeMinutesPastMidnight = [NSNumber numberWithUnsignedShort:entry_0.targetTimeMinutesPastMidnight]; - if (entry_0.targetSoC.HasValue()) { - newElement_0.targetSoC = [NSNumber numberWithUnsignedChar:entry_0.targetSoC.Value()]; - } else { - newElement_0.targetSoC = nil; - } - if (entry_0.addedEnergy.HasValue()) { - newElement_0.addedEnergy = [NSNumber numberWithLongLong:entry_0.addedEnergy.Value()]; - } else { - newElement_0.addedEnergy = nil; + for (auto & entry_0 : mRequest.chargingTargetSchedules) { + MTREnergyEVSEClusterChargingTargetScheduleStruct * newElement_0; + newElement_0 = [MTREnergyEVSEClusterChargingTargetScheduleStruct new]; + newElement_0.dayOfWeekForSequence = [NSNumber numberWithUnsignedChar:entry_0.dayOfWeekForSequence.Raw()]; + { // Scope for our temporary variables + auto * array_2 = [NSMutableArray new]; + for (auto & entry_2 : entry_0.chargingTargets) { + MTREnergyEVSEClusterChargingTargetStruct * newElement_2; + newElement_2 = [MTREnergyEVSEClusterChargingTargetStruct new]; + newElement_2.targetTimeMinutesPastMidnight = [NSNumber numberWithUnsignedShort:entry_2.targetTimeMinutesPastMidnight]; + if (entry_2.targetSoC.HasValue()) { + newElement_2.targetSoC = [NSNumber numberWithUnsignedChar:entry_2.targetSoC.Value()]; + } else { + newElement_2.targetSoC = nil; + } + if (entry_2.addedEnergy.HasValue()) { + newElement_2.addedEnergy = [NSNumber numberWithLongLong:entry_2.addedEnergy.Value()]; + } else { + newElement_2.addedEnergy = nil; + } + [array_2 addObject:newElement_2]; + } + newElement_0.chargingTargets = array_2; } [array_0 addObject:newElement_0]; } - params.chargingTargets = array_0; + params.chargingTargetSchedules = array_0; } #endif // MTR_ENABLE_PROVISIONAL uint16_t repeatCount = mRepeatCount.ValueOr(1); @@ -81547,7 +81549,7 @@ class EnergyEvseSetTargets : public ClusterCommand { private: chip::app::Clusters::EnergyEvse::Commands::SetTargets::Type mRequest; - TypedComplexArgument> mComplex_ChargingTargets; + TypedComplexArgument> mComplex_ChargingTargetSchedules; }; #endif // MTR_ENABLE_PROVISIONAL @@ -81560,9 +81562,6 @@ class EnergyEvseGetTargets : public ClusterCommand { EnergyEvseGetTargets() : ClusterCommand("get-targets") { -#if MTR_ENABLE_PROVISIONAL - AddArgument("DaysToReturn", 0, UINT8_MAX, &mRequest.daysToReturn); -#endif // MTR_ENABLE_PROVISIONAL ClusterCommand::AddArguments(); } @@ -81577,9 +81576,6 @@ class EnergyEvseGetTargets : public ClusterCommand { __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTREnergyEVSEClusterGetTargetsParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; -#if MTR_ENABLE_PROVISIONAL - params.daysToReturn = [NSNumber numberWithUnsignedChar:mRequest.daysToReturn.Raw()]; -#endif // MTR_ENABLE_PROVISIONAL uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { @@ -81606,7 +81602,6 @@ class EnergyEvseGetTargets : public ClusterCommand { } private: - chip::app::Clusters::EnergyEvse::Commands::GetTargets::Type mRequest; }; #endif // MTR_ENABLE_PROVISIONAL @@ -82676,176 +82671,6 @@ class SubscribeAttributeEnergyEvseRandomizationDelayWindow : public SubscribeAtt #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL -/* - * Attribute NumberOfWeeklyTargets - */ -class ReadEnergyEvseNumberOfWeeklyTargets : public ReadAttribute { -public: - ReadEnergyEvseNumberOfWeeklyTargets() - : ReadAttribute("number-of-weekly-targets") - { - } - - ~ReadEnergyEvseNumberOfWeeklyTargets() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyEvse::Attributes::NumberOfWeeklyTargets::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeNumberOfWeeklyTargetsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"EnergyEVSE.NumberOfWeeklyTargets response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("EnergyEVSE NumberOfWeeklyTargets read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeEnergyEvseNumberOfWeeklyTargets : public SubscribeAttribute { -public: - SubscribeAttributeEnergyEvseNumberOfWeeklyTargets() - : SubscribeAttribute("number-of-weekly-targets") - { - } - - ~SubscribeAttributeEnergyEvseNumberOfWeeklyTargets() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::EnergyEvse::Attributes::NumberOfWeeklyTargets::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeNumberOfWeeklyTargetsWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"EnergyEVSE.NumberOfWeeklyTargets response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - -/* - * Attribute NumberOfDailyTargets - */ -class ReadEnergyEvseNumberOfDailyTargets : public ReadAttribute { -public: - ReadEnergyEvseNumberOfDailyTargets() - : ReadAttribute("number-of-daily-targets") - { - } - - ~ReadEnergyEvseNumberOfDailyTargets() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyEvse::Attributes::NumberOfDailyTargets::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeNumberOfDailyTargetsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"EnergyEVSE.NumberOfDailyTargets response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("EnergyEVSE NumberOfDailyTargets read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeEnergyEvseNumberOfDailyTargets : public SubscribeAttribute { -public: - SubscribeAttributeEnergyEvseNumberOfDailyTargets() - : SubscribeAttribute("number-of-daily-targets") - { - } - - ~SubscribeAttributeEnergyEvseNumberOfDailyTargets() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::EnergyEvse::Attributes::NumberOfDailyTargets::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeNumberOfDailyTargetsWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"EnergyEVSE.NumberOfDailyTargets response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute NextChargeStartTime */ @@ -181652,14 +181477,6 @@ void registerClusterEnergyEvse(Commands & commands) make_unique(), // make_unique(), // #endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - make_unique(), // - make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - make_unique(), // - make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), // From 7dbacc6f1edf2c4c106c97e12964da6ac79cbd6d Mon Sep 17 00:00:00 2001 From: chrisdecenzo <61757564+chrisdecenzo@users.noreply.github.com> Date: Thu, 18 Jan 2024 11:57:05 -0800 Subject: [PATCH 13/25] UDC handling and Commissioner Passcode TXT record (#31432) * UDC handling and Commissioner Passcode TXT record * add shell commands and hooks from casting app for UDC options * fix tv-app android build * fix build * add content app observer handler to casting app --- .../linux/CommissioneeShellCommands.cpp | 95 +++++++++- .../linux/ControllerShellCommands.cpp | 12 +- .../android/java/MyUserPrompter-JNI.cpp | 47 ++++- .../tv-app/android/java/MyUserPrompter-JNI.h | 9 +- .../java/MyUserPrompterResolver-JNI.cpp | 2 +- examples/tv-app/android/java/TVApp-JNI.cpp | 20 ++- .../tv-common/include/CHIPProjectAppConfig.h | 3 + examples/tv-app/tv-common/src/AppTv.cpp | 44 ++++- .../linux/CastingShellCommands.cpp | 85 +++++++++ .../tv-casting-app/tv-casting-common/BUILD.gn | 3 + .../ContentAppObserver.cpp | 50 ++++++ .../content-app-observer/ContentAppObserver.h | 37 ++++ .../tv-casting-common/core/CastingPlayer.cpp | 4 +- .../tv-casting-common/src/CastingServer.cpp | 4 +- .../tv-casting-common/src/ZCLCallbacks.cpp | 67 +++++++ src/app/app-platform/ContentAppPlatform.cpp | 69 ++++++- src/app/app-platform/ContentAppPlatform.h | 13 +- src/app/server/Dnssd.cpp | 11 +- src/app/server/Server.cpp | 97 ++++++---- src/app/server/Server.h | 9 +- .../CommissionerDiscoveryController.cpp | 169 ++++++++++++++++-- .../CommissionerDiscoveryController.h | 114 ++++++++++-- src/include/platform/CHIPDeviceConfig.h | 14 ++ src/lib/dnssd/Advertiser.h | 9 + src/lib/dnssd/Advertiser_ImplMinimalMdns.cpp | 12 ++ src/lib/dnssd/Discovery_ImplPlatform.cpp | 4 + src/lib/dnssd/Resolver.h | 5 + src/lib/dnssd/TxtFields.cpp | 8 + src/lib/dnssd/TxtFields.h | 20 ++- src/lib/dnssd/tests/TestTxtFields.cpp | 28 ++- .../UDCClientState.h | 40 +++-- .../UserDirectedCommissioning.h | 8 +- .../UserDirectedCommissioningClient.cpp | 40 +++-- .../UserDirectedCommissioningServer.cpp | 8 + 34 files changed, 1008 insertions(+), 152 deletions(-) create mode 100644 examples/tv-casting-app/tv-casting-common/clusters/content-app-observer/ContentAppObserver.cpp create mode 100644 examples/tv-casting-app/tv-casting-common/clusters/content-app-observer/ContentAppObserver.h create mode 100644 examples/tv-casting-app/tv-casting-common/src/ZCLCallbacks.cpp diff --git a/examples/platform/linux/CommissioneeShellCommands.cpp b/examples/platform/linux/CommissioneeShellCommands.cpp index f04051b36e8f88..18f8355080201d 100644 --- a/examples/platform/linux/CommissioneeShellCommands.cpp +++ b/examples/platform/linux/CommissioneeShellCommands.cpp @@ -37,7 +37,8 @@ namespace chip { namespace Shell { #if CHIP_DEVICE_CONFIG_ENABLE_COMMISSIONER_DISCOVERY_CLIENT -static CHIP_ERROR SendUDC(bool printHeader, chip::Transport::PeerAddress commissioner) +static CHIP_ERROR SendUDC(bool printHeader, chip::Transport::PeerAddress commissioner, + Protocols::UserDirectedCommissioning::IdentificationDeclaration id) { streamer_t * sout = streamer_get(); @@ -46,7 +47,7 @@ static CHIP_ERROR SendUDC(bool printHeader, chip::Transport::PeerAddress commiss streamer_printf(sout, "SendUDC: "); } - Server::GetInstance().SendUserDirectedCommissioningRequest(commissioner); + Server::GetInstance().SendUserDirectedCommissioningRequest(commissioner, id); streamer_printf(sout, "done\r\n"); @@ -60,6 +61,13 @@ static CHIP_ERROR PrintAllCommands() streamer_printf(sout, " help Usage: commissionee \r\n"); #if CHIP_DEVICE_CONFIG_ENABLE_COMMISSIONER_DISCOVERY_CLIENT streamer_printf(sout, " sendudc
Send UDC message to address. Usage: commissionee sendudc ::1 5543\r\n"); + streamer_printf(sout, " udccancel
Send UDC cancel message to address. Usage: cast udccancel ::1 5543\r\n"); + streamer_printf(sout, + " udccommissionerpasscode
[CommissionerPasscodeReady] [PairingHint] [PairingInst] Send UDC " + "commissioner passcode message to address. Usage: udccommissionerpasscode ::1 5543 t 5 HelloWorld\r\n"); + streamer_printf(sout, + " testudc
[NoPasscode] [CdUponPasscodeDialog] [vid] [PairingHint] [PairingInst] Send UDC " + "message to address. Usage: cast testudc ::1 5543 t t 5 HelloWorld\r\n"); #endif // CHIP_DEVICE_CONFIG_ENABLE_COMMISSIONER_DISCOVERY_CLIENT // TODO: Figure out whether setdiscoverytimeout is a reasonable thing to do // at all, and if so what semantics it should have. Presumably it should @@ -92,12 +100,93 @@ static CHIP_ERROR CommissioneeHandler(int argc, char ** argv) } #if CHIP_DEVICE_CONFIG_ENABLE_COMMISSIONER_DISCOVERY_CLIENT if (strcmp(argv[0], "sendudc") == 0) + { + Protocols::UserDirectedCommissioning::IdentificationDeclaration id; + + char * eptr; + chip::Inet::IPAddress commissioner; + chip::Inet::IPAddress::FromString(argv[1], commissioner); + uint16_t port = (uint16_t) strtol(argv[2], &eptr, 10); + + return SendUDC(true, chip::Transport::PeerAddress::UDP(commissioner, port), id); + } + if (strcmp(argv[0], "udccancel") == 0) + { + char * eptr; + chip::Inet::IPAddress commissioner; + chip::Inet::IPAddress::FromString(argv[1], commissioner); + uint16_t port = (uint16_t) strtol(argv[2], &eptr, 10); + + Protocols::UserDirectedCommissioning::IdentificationDeclaration id; + id.SetCancelPasscode(true); + return Server::GetInstance().SendUserDirectedCommissioningRequest(chip::Transport::PeerAddress::UDP(commissioner, port), + id); + } + if (strcmp(argv[0], "udccommissionerpasscode") == 0) { char * eptr; chip::Inet::IPAddress commissioner; chip::Inet::IPAddress::FromString(argv[1], commissioner); uint16_t port = (uint16_t) strtol(argv[2], &eptr, 10); - return SendUDC(true, chip::Transport::PeerAddress::UDP(commissioner, port)); + + // udccommissionerpasscode
[CommissionerPasscodeReady] [PairingHint] [PairingInst] + // ex. udccommissionerpasscode
t 5 'hello world' + + Protocols::UserDirectedCommissioning::IdentificationDeclaration id; + id.SetCommissionerPasscode(true); + if (argc > 3) + { + id.SetCommissionerPasscodeReady(strcmp(argv[3], "t") == 0); + } + if (argc > 4) + { + uint16_t hint = (uint16_t) strtol(argv[4], &eptr, 10); + id.SetPairingHint(hint); + } + if (argc > 5) + { + id.SetPairingInst(argv[5]); + } + return Server::GetInstance().SendUserDirectedCommissioningRequest(chip::Transport::PeerAddress::UDP(commissioner, port), + id); + } + if (strcmp(argv[0], "testudc") == 0) + { + char * eptr; + chip::Inet::IPAddress commissioner; + chip::Inet::IPAddress::FromString(argv[1], commissioner); + uint16_t port = (uint16_t) strtol(argv[2], &eptr, 10); + + // sendudc
[NoPasscode] [CdUponPasscodeDialog] [vid] [PairingHint] [PairingInst] + // ex. sendudc
t t 111 5 'hello world' + + Protocols::UserDirectedCommissioning::IdentificationDeclaration id; + if (argc > 3) + { + id.SetNoPasscode(strcmp(argv[3], "t") == 0); + } + if (argc > 4) + { + id.SetCdUponPasscodeDialog(strcmp(argv[4], "t") == 0); + } + if (argc > 5) + { + uint16_t vid = (uint16_t) strtol(argv[5], &eptr, 10); + Protocols::UserDirectedCommissioning::TargetAppInfo info; + info.vendorId = vid; + id.AddTargetAppInfo(info); + } + if (argc > 6) + { + uint16_t hint = (uint16_t) strtol(argv[6], &eptr, 10); + id.SetPairingHint(hint); + } + if (argc > 7) + { + id.SetPairingInst(argv[7]); + } + return Server::GetInstance().SendUserDirectedCommissioningRequest(chip::Transport::PeerAddress::UDP(commissioner, port), + id); } #endif // CHIP_DEVICE_CONFIG_ENABLE_COMMISSIONER_DISCOVERY_CLIENT // TODO: Figure out whether setdiscoverytimeout is a reasonable thing to do diff --git a/examples/platform/linux/ControllerShellCommands.cpp b/examples/platform/linux/ControllerShellCommands.cpp index 3d5af4a3a387a1..27116b28c15256 100644 --- a/examples/platform/linux/ControllerShellCommands.cpp +++ b/examples/platform/linux/ControllerShellCommands.cpp @@ -266,8 +266,8 @@ static CHIP_ERROR ControllerHandler(int argc, char ** argv) { if (argc >= 3) { - uint32_t pincode = (uint32_t) strtol(argv[2], &eptr, 10); - GetCommissionerDiscoveryController()->CommissionWithPincode(pincode); + uint32_t passcode = (uint32_t) strtol(argv[2], &eptr, 10); + GetCommissionerDiscoveryController()->CommissionWithPasscode(passcode); return CHIP_NO_ERROR; } GetCommissionerDiscoveryController()->Ok(); @@ -280,15 +280,15 @@ static CHIP_ERROR ControllerHandler(int argc, char ** argv) } else if (strcmp(argv[0], "udc-commission") == 0) { - // udc-commission pincode index + // udc-commission passcode index if (argc < 3) { return PrintAllCommands(); } char * eptr; - uint32_t pincode = (uint32_t) strtol(argv[1], &eptr, 10); - size_t index = (size_t) strtol(argv[2], &eptr, 10); - return pairUDC(true, pincode, index); + uint32_t passcode = (uint32_t) strtol(argv[1], &eptr, 10); + size_t index = (size_t) strtol(argv[2], &eptr, 10); + return pairUDC(true, passcode, index); } #endif // CHIP_DEVICE_CONFIG_ENABLE_BOTH_COMMISSIONER_AND_COMMISSIONEE diff --git a/examples/tv-app/android/java/MyUserPrompter-JNI.cpp b/examples/tv-app/android/java/MyUserPrompter-JNI.cpp index 29fff989fdff57..3d29126e5b838a 100644 --- a/examples/tv-app/android/java/MyUserPrompter-JNI.cpp +++ b/examples/tv-app/android/java/MyUserPrompter-JNI.cpp @@ -116,7 +116,8 @@ void JNIMyUserPrompter::PromptForCommissionOKPermission(uint16_t vendorId, uint1 * If user responds with Cancel then implementor calls UserPrompterResolver.OnPinCodeDeclined(); * */ -void JNIMyUserPrompter::PromptForCommissionPincode(uint16_t vendorId, uint16_t productId, const char * commissioneeName) +void JNIMyUserPrompter::PromptForCommissionPasscode(uint16_t vendorId, uint16_t productId, const char * commissioneeName, + uint16_t pairingHint, const char * pairingInstruction) { CHIP_ERROR err = CHIP_NO_ERROR; JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -148,6 +149,50 @@ void JNIMyUserPrompter::PromptForCommissionPincode(uint16_t vendorId, uint16_t p } } +/** + * Called to when CancelCommissioning is received via UDC. + * Indicates that commissioner can stop showing the passcode entry or display dialog. + * For example, can show text such as "Commissioning cancelled by client" before hiding dialog. + */ +void JNIMyUserPrompter::HidePromptsOnCancel(uint16_t vendorId, uint16_t productId, const char * commissioneeName) +{ + // TODO + ChipLogError(Zcl, "JNIMyUserPrompter::HidePromptsOnCancel Needs Implementation"); +} + +/** + * Return true if this UserPrompter displays QR code along with passcode + * When PromptWithCommissionerPasscode is called during Commissioner Passcode functionality. + */ +bool JNIMyUserPrompter::DisplaysPasscodeAndQRCode() +{ + // TODO + ChipLogError(Zcl, "JNIMyUserPrompter::DisplaysPasscodeAndQRCode Needs Implementation"); + return false; +} + +/** + * Called to display the given setup passcode to the user, + * for commissioning the given commissioneeName with the given vendorId and productId, + * and provide instructions for where to enter it in the commissionee (when pairingHint and pairingInstruction are provided). + * For example "Casting Passcode: [passcode]. For more instructions, click here." + */ +void JNIMyUserPrompter::PromptWithCommissionerPasscode(uint16_t vendorId, uint16_t productId, const char * commissioneeName, + uint32_t passcode, uint16_t pairingHint, const char * pairingInstruction) +{ + // TODO + ChipLogError(Zcl, "JNIMyUserPrompter::PromptWithCommissionerPasscode Needs Implementation"); +} + +/** + * Called to alert the user that commissioning has begun." + */ +void JNIMyUserPrompter::PromptCommissioningStarted(uint16_t vendorId, uint16_t productId, const char * commissioneeName) +{ + // TODO + ChipLogError(Zcl, "JNIMyUserPrompter::PromptCommissioningStarted Needs Implementation"); +} + /* * Called to notify the user that commissioning succeeded. It can be in form of UI Notification. */ diff --git a/examples/tv-app/android/java/MyUserPrompter-JNI.h b/examples/tv-app/android/java/MyUserPrompter-JNI.h index cecdcb305643d2..f4d93ad49b10e1 100644 --- a/examples/tv-app/android/java/MyUserPrompter-JNI.h +++ b/examples/tv-app/android/java/MyUserPrompter-JNI.h @@ -23,9 +23,16 @@ class JNIMyUserPrompter : public UserPrompter { public: + // TODO JNIMyUserPrompter(jobject prompter); void PromptForCommissionOKPermission(uint16_t vendorId, uint16_t productId, const char * commissioneeName) override; - void PromptForCommissionPincode(uint16_t vendorId, uint16_t productId, const char * commissioneeName) override; + void PromptForCommissionPasscode(uint16_t vendorId, uint16_t productId, const char * commissioneeName, uint16_t pairingHint, + const char * pairingInstruction) override; + void HidePromptsOnCancel(uint16_t vendorId, uint16_t productId, const char * commissioneeName) override; + bool DisplaysPasscodeAndQRCode() override; + void PromptWithCommissionerPasscode(uint16_t vendorId, uint16_t productId, const char * commissioneeName, uint32_t passcode, + uint16_t pairingHint, const char * pairingInstruction) override; + void PromptCommissioningStarted(uint16_t vendorId, uint16_t productId, const char * commissioneeName) override; void PromptCommissioningSucceeded(uint16_t vendorId, uint16_t productId, const char * commissioneeName) override; void PromptCommissioningFailed(const char * commissioneeName, CHIP_ERROR error) override; diff --git a/examples/tv-app/android/java/MyUserPrompterResolver-JNI.cpp b/examples/tv-app/android/java/MyUserPrompterResolver-JNI.cpp index ebe342da2f4a43..2e6bd0aa1f54e3 100644 --- a/examples/tv-app/android/java/MyUserPrompterResolver-JNI.cpp +++ b/examples/tv-app/android/java/MyUserPrompterResolver-JNI.cpp @@ -34,7 +34,7 @@ JNI_METHOD(void, OnPinCodeEntered)(JNIEnv *, jobject, jint jPinCode) chip::DeviceLayer::StackLock lock; uint32_t pinCode = (uint32_t) jPinCode; ChipLogProgress(Zcl, "OnPinCodeEntered %d", pinCode); - GetCommissionerDiscoveryController()->CommissionWithPincode(pinCode); + GetCommissionerDiscoveryController()->CommissionWithPasscode(pinCode); #endif } diff --git a/examples/tv-app/android/java/TVApp-JNI.cpp b/examples/tv-app/android/java/TVApp-JNI.cpp index d7081419c0c645..f8afdfeb9c3b5f 100644 --- a/examples/tv-app/android/java/TVApp-JNI.cpp +++ b/examples/tv-app/android/java/TVApp-JNI.cpp @@ -189,11 +189,23 @@ JNI_METHOD(void, setChipDeviceEventProvider)(JNIEnv *, jobject, jobject provider } #if CHIP_DEVICE_CONFIG_APP_PLATFORM_ENABLED -class MyPincodeService : public PincodeService +class MyPincodeService : public PasscodeService { - uint32_t FetchCommissionPincodeFromContentApp(uint16_t vendorId, uint16_t productId, CharSpan rotatingId) override + bool HasTargetContentApp(uint16_t vendorId, uint16_t productId, chip::CharSpan rotatingId, + chip::Protocols::UserDirectedCommissioning::TargetAppInfo & info, uint32_t & passcode) override { - return ContentAppPlatform::GetInstance().GetPincodeFromContentApp(vendorId, productId, rotatingId); + return ContentAppPlatform::GetInstance().HasTargetContentApp(vendorId, productId, rotatingId, info, passcode); + } + + uint32_t GetCommissionerPasscode(uint16_t vendorId, uint16_t productId, chip::CharSpan rotatingId) override + { + // TODO: randomly generate this value + return 12345678; + } + + uint32_t FetchCommissionPasscodeFromContentApp(uint16_t vendorId, uint16_t productId, CharSpan rotatingId) override + { + return ContentAppPlatform::GetInstance().GetPasscodeFromContentApp(vendorId, productId, rotatingId); } }; MyPincodeService gMyPincodeService; @@ -329,7 +341,7 @@ void TvAppJNI::InitializeCommissioner(JNIMyUserPrompter * userPrompter) CommissionerDiscoveryController * cdc = GetCommissionerDiscoveryController(); if (cdc != nullptr && userPrompter != nullptr) { - cdc->SetPincodeService(&gMyPincodeService); + cdc->SetPasscodeService(&gMyPincodeService); cdc->SetUserPrompter(userPrompter); cdc->SetPostCommissioningListener(&gMyPostCommissioningListener); } diff --git a/examples/tv-app/tv-common/include/CHIPProjectAppConfig.h b/examples/tv-app/tv-common/include/CHIPProjectAppConfig.h index 99274da0114257..e5ec3f064a2fbf 100644 --- a/examples/tv-app/tv-common/include/CHIPProjectAppConfig.h +++ b/examples/tv-app/tv-common/include/CHIPProjectAppConfig.h @@ -30,6 +30,9 @@ // TVs need to be commissioners and likely want to be discoverable #define CHIP_DEVICE_CONFIG_ENABLE_COMMISSIONER_DISCOVERY 1 +// TVs will often enable this feature +#define CHIP_DEVICE_CONFIG_ENABLE_COMMISSIONER_PASSCODE 1 + // TVs need to be both commissioners and commissionees #define CHIP_DEVICE_CONFIG_ENABLE_BOTH_COMMISSIONER_AND_COMMISSIONEE 1 diff --git a/examples/tv-app/tv-common/src/AppTv.cpp b/examples/tv-app/tv-common/src/AppTv.cpp index ae87badcbcc1e4..8cd0cd409b783a 100644 --- a/examples/tv-app/tv-common/src/AppTv.cpp +++ b/examples/tv-app/tv-common/src/AppTv.cpp @@ -62,7 +62,27 @@ class MyUserPrompter : public UserPrompter } // tv should override this with a dialog prompt - inline void PromptForCommissionPincode(uint16_t vendorId, uint16_t productId, const char * commissioneeName) override + inline void PromptForCommissionPasscode(uint16_t vendorId, uint16_t productId, const char * commissioneeName, + uint16_t pairingHint, const char * pairingInstruction) override + { + return; + } + + // tv should override this with a dialog prompt + inline void HidePromptsOnCancel(uint16_t vendorId, uint16_t productId, const char * commissioneeName) override { return; } + + // set to true when TV displays both QR and Passcode during Commissioner Passcode display. + inline bool DisplaysPasscodeAndQRCode() override { return true; } + + // tv should override this with a dialog prompt + inline void PromptWithCommissionerPasscode(uint16_t vendorId, uint16_t productId, const char * commissioneeName, + uint32_t passcode, uint16_t pairingHint, const char * pairingInstruction) override + { + return; + } + + // tv should override this with a dialog prompt + inline void PromptCommissioningStarted(uint16_t vendorId, uint16_t productId, const char * commissioneeName) override { return; } @@ -79,14 +99,26 @@ class MyUserPrompter : public UserPrompter MyUserPrompter gMyUserPrompter; -class MyPincodeService : public PincodeService +class MyPasscodeService : public PasscodeService { - uint32_t FetchCommissionPincodeFromContentApp(uint16_t vendorId, uint16_t productId, CharSpan rotatingId) override + bool HasTargetContentApp(uint16_t vendorId, uint16_t productId, chip::CharSpan rotatingId, + chip::Protocols::UserDirectedCommissioning::TargetAppInfo & info, uint32_t & passcode) override + { + return ContentAppPlatform::GetInstance().HasTargetContentApp(vendorId, productId, rotatingId, info, passcode); + } + + uint32_t GetCommissionerPasscode(uint16_t vendorId, uint16_t productId, chip::CharSpan rotatingId) override + { + // TODO: randomly generate this value + return 12345678; + } + + uint32_t FetchCommissionPasscodeFromContentApp(uint16_t vendorId, uint16_t productId, CharSpan rotatingId) override { - return ContentAppPlatform::GetInstance().GetPincodeFromContentApp(vendorId, productId, rotatingId); + return ContentAppPlatform::GetInstance().GetPasscodeFromContentApp(vendorId, productId, rotatingId); } }; -MyPincodeService gMyPincodeService; +MyPasscodeService gMyPasscodeService; class MyPostCommissioningListener : public PostCommissioningListener { @@ -558,7 +590,7 @@ CHIP_ERROR AppTvInit() CommissionerDiscoveryController * cdc = GetCommissionerDiscoveryController(); if (cdc != nullptr) { - cdc->SetPincodeService(&gMyPincodeService); + cdc->SetPasscodeService(&gMyPasscodeService); cdc->SetUserPrompter(&gMyUserPrompter); cdc->SetPostCommissioningListener(&gMyPostCommissioningListener); } diff --git a/examples/tv-casting-app/linux/CastingShellCommands.cpp b/examples/tv-casting-app/linux/CastingShellCommands.cpp index 136c0fef46625f..f6b245b42dc13a 100644 --- a/examples/tv-casting-app/linux/CastingShellCommands.cpp +++ b/examples/tv-casting-app/linux/CastingShellCommands.cpp @@ -60,6 +60,13 @@ static CHIP_ERROR PrintAllCommands() sout, " access Read and display clusters on each endpoint for . Usage: cast access 0xFFFFFFEFFFFFFFFF\r\n"); streamer_printf(sout, " sendudc
Send UDC message to address. Usage: cast sendudc ::1 5543\r\n"); + streamer_printf(sout, " udccancel
Send UDC cancel message to address. Usage: cast udccancel ::1 5543\r\n"); + streamer_printf(sout, + " udccommissionerpasscode
[CommissionerPasscodeReady] [PairingHint] [PairingInst] Send UDC " + "commissioner passcode message to address. Usage: udccommissionerpasscode ::1 5543 t 5 HelloWorld\r\n"); + streamer_printf(sout, + " testudc
[NoPasscode] [CdUponPasscodeDialog] [vid] [PairingHint] [PairingInst] Send UDC " + "message to address. Usage: cast testudc ::1 5543 t t 5 HelloWorld\r\n"); streamer_printf( sout, " cluster [clustercommand] Send cluster command. Usage: cast cluster keypadinput send-key 1 18446744004990074879 1\r\n"); @@ -148,6 +155,84 @@ static CHIP_ERROR CastingHandler(int argc, char ** argv) return CastingServer::GetInstance()->SendUserDirectedCommissioningRequest( chip::Transport::PeerAddress::UDP(commissioner, port)); } + if (strcmp(argv[0], "udccancel") == 0) + { + char * eptr; + chip::Inet::IPAddress commissioner; + chip::Inet::IPAddress::FromString(argv[1], commissioner); + uint16_t port = (uint16_t) strtol(argv[2], &eptr, 10); + + Protocols::UserDirectedCommissioning::IdentificationDeclaration id; + id.SetCancelPasscode(true); + return Server::GetInstance().SendUserDirectedCommissioningRequest(chip::Transport::PeerAddress::UDP(commissioner, port), + id); + } + if (strcmp(argv[0], "udccommissionerpasscode") == 0) + { + char * eptr; + chip::Inet::IPAddress commissioner; + chip::Inet::IPAddress::FromString(argv[1], commissioner); + uint16_t port = (uint16_t) strtol(argv[2], &eptr, 10); + + // udccommissionerpasscode
[CommissionerPasscodeReady] [PairingHint] [PairingInst] + // ex. udccommissionerpasscode
t 5 'hello world' + + Protocols::UserDirectedCommissioning::IdentificationDeclaration id; + id.SetCommissionerPasscode(true); + if (argc > 3) + { + id.SetCommissionerPasscodeReady(strcmp(argv[3], "t") == 0); + } + if (argc > 4) + { + uint16_t hint = (uint16_t) strtol(argv[4], &eptr, 10); + id.SetPairingHint(hint); + } + if (argc > 5) + { + id.SetPairingInst(argv[5]); + } + return Server::GetInstance().SendUserDirectedCommissioningRequest(chip::Transport::PeerAddress::UDP(commissioner, port), + id); + } + if (strcmp(argv[0], "testudc") == 0) + { + char * eptr; + chip::Inet::IPAddress commissioner; + chip::Inet::IPAddress::FromString(argv[1], commissioner); + uint16_t port = (uint16_t) strtol(argv[2], &eptr, 10); + + // sendudc
[NoPasscode] [CdUponPasscodeDialog] [vid] [PairingHint] [PairingInst] + // ex. sendudc
t t 111 5 'hello world' + + Protocols::UserDirectedCommissioning::IdentificationDeclaration id; + if (argc > 3) + { + id.SetNoPasscode(strcmp(argv[3], "t") == 0); + } + if (argc > 4) + { + id.SetCdUponPasscodeDialog(strcmp(argv[4], "t") == 0); + } + if (argc > 5) + { + uint16_t vid = (uint16_t) strtol(argv[5], &eptr, 10); + Protocols::UserDirectedCommissioning::TargetAppInfo info; + info.vendorId = vid; + id.AddTargetAppInfo(info); + } + if (argc > 6) + { + uint16_t hint = (uint16_t) strtol(argv[6], &eptr, 10); + id.SetPairingHint(hint); + } + if (argc > 7) + { + id.SetPairingInst(argv[7]); + } + return Server::GetInstance().SendUserDirectedCommissioningRequest(chip::Transport::PeerAddress::UDP(commissioner, port), + id); + } #endif // CHIP_DEVICE_CONFIG_ENABLE_COMMISSIONER_DISCOVERY_CLIENT if (strcmp(argv[0], "print-bindings") == 0) { diff --git a/examples/tv-casting-app/tv-casting-common/BUILD.gn b/examples/tv-casting-app/tv-casting-common/BUILD.gn index d9c391b1e1b037..e8b62bce23969f 100644 --- a/examples/tv-casting-app/tv-casting-common/BUILD.gn +++ b/examples/tv-casting-app/tv-casting-common/BUILD.gn @@ -52,6 +52,8 @@ chip_data_model("tv-casting-common") { "${chip_root}/src/controller/ExamplePersistentStorage.h", "${chip_root}/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp", "${chip_root}/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp", + "clusters/content-app-observer/ContentAppObserver.cpp", + "clusters/content-app-observer/ContentAppObserver.h", "commands/clusters/ModelCommand.cpp", "commands/common/CHIPCommand.cpp", "include/AppParams.h", @@ -89,6 +91,7 @@ chip_data_model("tv-casting-common") { "src/TargetNavigator.cpp", "src/TargetVideoPlayerInfo.cpp", "src/WakeOnLan.cpp", + "src/ZCLCallbacks.cpp", ] # Add simplified casting API files here diff --git a/examples/tv-casting-app/tv-casting-common/clusters/content-app-observer/ContentAppObserver.cpp b/examples/tv-casting-app/tv-casting-common/clusters/content-app-observer/ContentAppObserver.cpp new file mode 100644 index 00000000000000..a6010a54b0a0f5 --- /dev/null +++ b/examples/tv-casting-app/tv-casting-common/clusters/content-app-observer/ContentAppObserver.cpp @@ -0,0 +1,50 @@ +/** + * + * Copyright (c) 2023 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. + */ + +#include "ContentAppObserver.h" + +#include +#include + +using namespace std; +using namespace chip; +using namespace chip::app::Clusters::ContentAppObserver; + +ContentAppObserverManager::ContentAppObserverManager() +{ + // Create Test Data +} + +void ContentAppObserverManager::HandleContentAppMessage(chip::app::CommandResponseHelper & helper, + const chip::Optional & data, + const chip::CharSpan & encodingHint) +{ + ChipLogProgress(Zcl, "ContentAppObserverManager::HandleContentAppMessage"); + + string dataString(data.HasValue() ? data.Value().data() : "", data.HasValue() ? data.Value().size() : 0); + string encodingHintString(encodingHint.data(), encodingHint.size()); + + ChipLogProgress(Zcl, "ContentAppObserverManager::HandleContentAppMessage TEST CASE hint=%s data=%s ", + encodingHintString.c_str(), dataString.c_str()); + + ContentAppMessageResponse response; + // TODO: Insert code here + response.data = chip::MakeOptional(CharSpan::fromCharString("exampleData")); + response.encodingHint = chip::MakeOptional(CharSpan::fromCharString(encodingHintString.c_str())); + response.status = StatusEnum::kSuccess; + helper.Success(response); +} diff --git a/examples/tv-casting-app/tv-casting-common/clusters/content-app-observer/ContentAppObserver.h b/examples/tv-casting-app/tv-casting-common/clusters/content-app-observer/ContentAppObserver.h new file mode 100644 index 00000000000000..0c0f6fb6efbaec --- /dev/null +++ b/examples/tv-casting-app/tv-casting-common/clusters/content-app-observer/ContentAppObserver.h @@ -0,0 +1,37 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * All rights reserved. + * + * 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. + */ + +#pragma once + +#include +#include +#include + +using ContentAppObserverDelegate = chip::app::Clusters::ContentAppObserver::Delegate; +using ContentAppMessageResponse = chip::app::Clusters::ContentAppObserver::Commands::ContentAppMessageResponse::Type; + +class ContentAppObserverManager : public ContentAppObserverDelegate +{ +public: + ContentAppObserverManager(); + + void HandleContentAppMessage(chip::app::CommandResponseHelper & helper, + const chip::Optional & data, const chip::CharSpan & encodingHint) override; + +protected: +}; diff --git a/examples/tv-casting-app/tv-casting-common/core/CastingPlayer.cpp b/examples/tv-casting-app/tv-casting-common/core/CastingPlayer.cpp index e469775ce27bc0..8ea90c21edb969 100644 --- a/examples/tv-casting-app/tv-casting-common/core/CastingPlayer.cpp +++ b/examples/tv-casting-app/tv-casting-common/core/CastingPlayer.cpp @@ -163,8 +163,10 @@ CHIP_ERROR CastingPlayer::SendUserDirectedCommissioningRequest() ReturnErrorOnFailure(support::ChipDeviceEventHandler::SetUdcStatus(true)); + // TODO: expose options to the higher layer + chip::Protocols::UserDirectedCommissioning::IdentificationDeclaration id; ReturnErrorOnFailure(chip::Server::GetInstance().SendUserDirectedCommissioningRequest( - chip::Transport::PeerAddress::UDP(*ipAddressToUse, mAttributes.port, mAttributes.interfaceId))); + chip::Transport::PeerAddress::UDP(*ipAddressToUse, mAttributes.port, mAttributes.interfaceId), id)); return CHIP_NO_ERROR; } diff --git a/examples/tv-casting-app/tv-casting-common/src/CastingServer.cpp b/examples/tv-casting-app/tv-casting-common/src/CastingServer.cpp index fbbb9d32d8f030..e4bb7647085b40 100644 --- a/examples/tv-casting-app/tv-casting-common/src/CastingServer.cpp +++ b/examples/tv-casting-app/tv-casting-common/src/CastingServer.cpp @@ -191,7 +191,9 @@ void CastingServer::OnCommissioningSessionEstablishmentStarted() #if CHIP_DEVICE_CONFIG_ENABLE_COMMISSIONER_DISCOVERY_CLIENT CHIP_ERROR CastingServer::SendUserDirectedCommissioningRequest(chip::Transport::PeerAddress commissioner) { - return Server::GetInstance().SendUserDirectedCommissioningRequest(commissioner); + // TODO: expose options to the higher layer + Protocols::UserDirectedCommissioning::IdentificationDeclaration id; + return Server::GetInstance().SendUserDirectedCommissioningRequest(commissioner, id); } chip::Inet::IPAddress * CastingServer::getIpAddressForUDCRequest(chip::Inet::IPAddress ipAddresses[], const size_t numIPs) diff --git a/examples/tv-casting-app/tv-casting-common/src/ZCLCallbacks.cpp b/examples/tv-casting-app/tv-casting-common/src/ZCLCallbacks.cpp new file mode 100644 index 00000000000000..608d10b4ef5da2 --- /dev/null +++ b/examples/tv-casting-app/tv-casting-common/src/ZCLCallbacks.cpp @@ -0,0 +1,67 @@ +/* + * + * Copyright (c) 2020 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. + */ + +/** + * @file + * This file implements the handler for data model messages. + */ + +#include +#include +#include +#include +#include + +#include "clusters/content-app-observer/ContentAppObserver.h" + +namespace { +static ContentAppObserverManager contentAppObserverManager; +} // namespace + +using namespace ::chip; +using namespace ::chip::app::Clusters; + +void MatterPostAttributeChangeCallback(const chip::app::ConcreteAttributePath & attributePath, uint8_t type, uint16_t size, + uint8_t * value) +{ + ClusterId clusterId = attributePath.mClusterId; + AttributeId attributeId = attributePath.mAttributeId; + ChipLogProgress(Zcl, "AttributeChangeCallback cluster: " ChipLogFormatMEI " attribute:" ChipLogFormatMEI, + ChipLogValueMEI(clusterId), ChipLogValueMEI(attributeId)); +} + +/** @brief OnOff Cluster Init + * + * This function is called when a specific cluster is initialized. It gives the + * application an opportunity to take care of cluster initialization procedures. + * It is called exactly once for each endpoint where cluster is present. + * + * @param endpoint Ver.: always + * + * TODO Issue #3841 + * emberAfOnOffClusterInitCallback happens before the stack initialize the cluster + * attributes to the default value. + * The logic here expects something similar to the deprecated Plugins callback + * emberAfPluginOnOffClusterServerPostInitCallback. + * + */ + +void emberAfContentAppObserverClusterInitCallback(EndpointId endpoint) +{ + ChipLogProgress(Zcl, "TV Casting Linux App: ContentAppObserverManager::SetDefaultDelegate"); + ContentAppObserver::SetDefaultDelegate(endpoint, &contentAppObserverManager); +} diff --git a/src/app/app-platform/ContentAppPlatform.cpp b/src/app/app-platform/ContentAppPlatform.cpp index 4162693b19508f..fa720418264739 100644 --- a/src/app/app-platform/ContentAppPlatform.cpp +++ b/src/app/app-platform/ContentAppPlatform.cpp @@ -451,7 +451,64 @@ void ContentAppPlatform::UnsetIfCurrentApp(ContentApp * app) } } -uint32_t ContentAppPlatform::GetPincodeFromContentApp(uint16_t vendorId, uint16_t productId, CharSpan rotatingId) +bool ContentAppPlatform::HasTargetContentApp(uint16_t vendorId, uint16_t productId, CharSpan rotatingId, + chip::Protocols::UserDirectedCommissioning::TargetAppInfo & info, uint32_t & passcode) +{ + // TODO: perform more complex search for matching apps + ContentApp * app = LoadContentAppByClient(info.vendorId, info.productId); + if (app == nullptr) + { + ChipLogProgress(DeviceLayer, "no app found for vendor id=%d \r\n", info.vendorId); + return false; + } + + if (app->GetApplicationBasicDelegate() == nullptr) + { + ChipLogProgress(DeviceLayer, "no ApplicationBasic cluster for app with vendor id=%d \r\n", info.vendorId); + return false; + } + + // first check if the vendor id matches the client + bool allow = app->GetApplicationBasicDelegate()->HandleGetVendorId() == vendorId; + if (!allow) + { + // if no match, then check allowed vendor list + for (const auto & allowedVendor : app->GetApplicationBasicDelegate()->GetAllowedVendorList()) + { + if (allowedVendor == vendorId) + { + allow = true; + break; + } + } + if (!allow) + { + ChipLogProgress( + DeviceLayer, + "no permission given by ApplicationBasic cluster on app with vendor id=%d to client with vendor id=%d\r\n", + info.vendorId, vendorId); + return false; + } + } + + if (app->GetAccountLoginDelegate() == nullptr) + { + ChipLogProgress(DeviceLayer, "no AccountLogin cluster for app with vendor id=%d \r\n", info.vendorId); + return true; + } + + static const size_t kSetupPasscodeSize = 12; + char mSetupPasscode[kSetupPasscodeSize]; + + app->GetAccountLoginDelegate()->GetSetupPin(mSetupPasscode, kSetupPasscodeSize, rotatingId); + std::string passcodeString(mSetupPasscode); + + char * eptr; + passcode = (uint32_t) strtol(passcodeString.c_str(), &eptr, 10); + return true; +} + +uint32_t ContentAppPlatform::GetPasscodeFromContentApp(uint16_t vendorId, uint16_t productId, CharSpan rotatingId) { ContentApp * app = LoadContentAppByClient(vendorId, productId); if (app == nullptr) @@ -466,14 +523,14 @@ uint32_t ContentAppPlatform::GetPincodeFromContentApp(uint16_t vendorId, uint16_ return 0; } - static const size_t kSetupPINSize = 12; - char mSetupPIN[kSetupPINSize]; + static const size_t kSetupPasscodeSize = 12; + char mSetupPasscode[kSetupPasscodeSize]; - app->GetAccountLoginDelegate()->GetSetupPin(mSetupPIN, kSetupPINSize, rotatingId); - std::string pinString(mSetupPIN); + app->GetAccountLoginDelegate()->GetSetupPin(mSetupPasscode, kSetupPasscodeSize, rotatingId); + std::string passcodeString(mSetupPasscode); char * eptr; - return (uint32_t) strtol(pinString.c_str(), &eptr, 10); + return (uint32_t) strtol(passcodeString.c_str(), &eptr, 10); } // Returns ACL entry with match subject or CHIP_ERROR_NOT_FOUND if no match is found diff --git a/src/app/app-platform/ContentAppPlatform.h b/src/app/app-platform/ContentAppPlatform.h index f05a94ceda7613..3dd0b138d2e9d1 100644 --- a/src/app/app-platform/ContentAppPlatform.h +++ b/src/app/app-platform/ContentAppPlatform.h @@ -27,6 +27,7 @@ #include #include #include +#include using chip::app::Clusters::ApplicationBasic::CatalogVendorApp; using chip::Controller::CommandResponseFailureCallback; @@ -148,9 +149,15 @@ class DLL_EXPORT ContentAppPlatform // unset this as current app, if it is current app void UnsetIfCurrentApp(ContentApp * app); - // loads content app identified by vid/pid of client and calls HandleGetSetupPin. - // Returns 0 if pin cannot be obtained. - uint32_t GetPincodeFromContentApp(uint16_t vendorId, uint16_t productId, CharSpan rotatingId); + // loads content app identified by vid/pid of client and calls HandleGetSetupPasscode. + // Returns 0 if passcode cannot be obtained. + uint32_t GetPasscodeFromContentApp(uint16_t vendorId, uint16_t productId, CharSpan rotatingId); + + // locates app identified by target info and confirms that it grants access to given vid/pid of client, + // loads given app and calls HandleGetSetupPasscode. Sets passcode to 0 if it cannot be obtained. + // return true if a matching app was found (and it granted this client access), even if a passcode was not obtained + bool HasTargetContentApp(uint16_t vendorId, uint16_t productId, CharSpan rotatingId, + chip::Protocols::UserDirectedCommissioning::TargetAppInfo & info, uint32_t & passcode); /** * @brief diff --git a/src/app/server/Dnssd.cpp b/src/app/server/Dnssd.cpp index 81c3754b891412..e91ef563007cfb 100644 --- a/src/app/server/Dnssd.cpp +++ b/src/app/server/Dnssd.cpp @@ -329,13 +329,20 @@ CHIP_ERROR DnssdServer::Advertise(bool commissionableNode, chip::Dnssd::Commissi } } } +#if CHIP_DEVICE_CONFIG_ENABLE_COMMISSIONER_PASSCODE + else + { + advertiseParameters.SetCommissionerPasscodeSupported(Optional(true)); + } +#endif auto & mdnsAdvertiser = chip::Dnssd::ServiceAdvertiser::Instance(); - ChipLogProgress(Discovery, "Advertise commission parameter vendorID=%u productID=%u discriminator=%04u/%02u cm=%u", + ChipLogProgress(Discovery, "Advertise commission parameter vendorID=%u productID=%u discriminator=%04u/%02u cm=%u cp=%u", advertiseParameters.GetVendorId().ValueOr(0), advertiseParameters.GetProductId().ValueOr(0), advertiseParameters.GetLongDiscriminator(), advertiseParameters.GetShortDiscriminator(), - to_underlying(advertiseParameters.GetCommissioningMode())); + to_underlying(advertiseParameters.GetCommissioningMode()), + advertiseParameters.GetCommissionerPasscodeSupported().ValueOr(false) ? 1 : 0); return mdnsAdvertiser.Advertise(advertiseParameters); } diff --git a/src/app/server/Server.cpp b/src/app/server/Server.cpp index eb9b5835dd23d5..4a0fa91f56d520 100644 --- a/src/app/server/Server.cpp +++ b/src/app/server/Server.cpp @@ -567,65 +567,84 @@ void Server::Shutdown() // NOTE: UDC client is located in Server.cpp because it really only makes sense // to send UDC from a Matter device. The UDC message payload needs to include the device's // randomly generated service name. -CHIP_ERROR Server::SendUserDirectedCommissioningRequest(chip::Transport::PeerAddress commissioner) +CHIP_ERROR Server::SendUserDirectedCommissioningRequest(chip::Transport::PeerAddress commissioner, + Protocols::UserDirectedCommissioning::IdentificationDeclaration & id) { ChipLogDetail(AppServer, "SendUserDirectedCommissioningRequest2"); CHIP_ERROR err; - char nameBuffer[chip::Dnssd::Commission::kInstanceNameMaxLength + 1]; - err = app::DnssdServer::Instance().GetCommissionableInstanceName(nameBuffer, sizeof(nameBuffer)); - if (err != CHIP_NO_ERROR) - { - ChipLogError(AppServer, "Failed to get mdns instance name error: %" CHIP_ERROR_FORMAT, err.Format()); - return err; - } - ChipLogDetail(AppServer, "instanceName=%s", nameBuffer); - - Protocols::UserDirectedCommissioning::IdentificationDeclaration id; - id.SetInstanceName(nameBuffer); - uint16_t vendorId = 0; - if (DeviceLayer::GetDeviceInstanceInfoProvider()->GetVendorId(vendorId) != CHIP_NO_ERROR) + // only populate fields left blank by the client + if (strlen(id.GetInstanceName()) == 0) { - ChipLogDetail(Discovery, "Vendor ID not known"); - } - else - { - id.SetVendorId(vendorId); + char nameBuffer[chip::Dnssd::Commission::kInstanceNameMaxLength + 1]; + err = app::DnssdServer::Instance().GetCommissionableInstanceName(nameBuffer, sizeof(nameBuffer)); + if (err != CHIP_NO_ERROR) + { + ChipLogError(AppServer, "Failed to get mdns instance name error: %" CHIP_ERROR_FORMAT, err.Format()); + return err; + } + id.SetInstanceName(nameBuffer); } + ChipLogDetail(AppServer, "instanceName=%s", id.GetInstanceName()); - uint16_t productId = 0; - if (DeviceLayer::GetDeviceInstanceInfoProvider()->GetProductId(productId) != CHIP_NO_ERROR) - { - ChipLogDetail(Discovery, "Product ID not known"); - } - else + if (id.GetVendorId() == 0) { - id.SetProductId(productId); + uint16_t vendorId = 0; + if (DeviceLayer::GetDeviceInstanceInfoProvider()->GetVendorId(vendorId) != CHIP_NO_ERROR) + { + ChipLogDetail(Discovery, "Vendor ID not known"); + } + else + { + id.SetVendorId(vendorId); + } } - char deviceName[chip::Dnssd::kKeyDeviceNameMaxLength + 1] = {}; - if (!chip::DeviceLayer::ConfigurationMgr().IsCommissionableDeviceNameEnabled() || - chip::DeviceLayer::ConfigurationMgr().GetCommissionableDeviceName(deviceName, sizeof(deviceName)) != CHIP_NO_ERROR) + if (id.GetProductId() == 0) { - ChipLogDetail(Discovery, "Device Name not known"); + uint16_t productId = 0; + if (DeviceLayer::GetDeviceInstanceInfoProvider()->GetProductId(productId) != CHIP_NO_ERROR) + { + ChipLogDetail(Discovery, "Product ID not known"); + } + else + { + id.SetProductId(productId); + } } - else + + if (strlen(id.GetDeviceName()) == 0) { - id.SetDeviceName(deviceName); + char deviceName[chip::Dnssd::kKeyDeviceNameMaxLength + 1] = {}; + if (!chip::DeviceLayer::ConfigurationMgr().IsCommissionableDeviceNameEnabled() || + chip::DeviceLayer::ConfigurationMgr().GetCommissionableDeviceName(deviceName, sizeof(deviceName)) != CHIP_NO_ERROR) + { + ChipLogDetail(Discovery, "Device Name not known"); + } + else + { + id.SetDeviceName(deviceName); + } } #if CHIP_ENABLE_ROTATING_DEVICE_ID && defined(CHIP_DEVICE_CONFIG_ROTATING_DEVICE_ID_UNIQUE_ID) - char rotatingDeviceIdHexBuffer[RotatingDeviceId::kHexMaxLength]; - ReturnErrorOnFailure( - app::DnssdServer::Instance().GenerateRotatingDeviceId(rotatingDeviceIdHexBuffer, ArraySize(rotatingDeviceIdHexBuffer))); + if (id.GetRotatingIdLength() == 0) + { + char rotatingDeviceIdHexBuffer[RotatingDeviceId::kHexMaxLength]; + ReturnErrorOnFailure( + app::DnssdServer::Instance().GenerateRotatingDeviceId(rotatingDeviceIdHexBuffer, ArraySize(rotatingDeviceIdHexBuffer))); - uint8_t * rotatingId = reinterpret_cast(rotatingDeviceIdHexBuffer); - size_t rotatingIdLen = strlen(rotatingDeviceIdHexBuffer); - id.SetRotatingId(rotatingId, rotatingIdLen); + uint8_t * rotatingId = reinterpret_cast(rotatingDeviceIdHexBuffer); + size_t rotatingIdLen = strlen(rotatingDeviceIdHexBuffer); + id.SetRotatingId(rotatingId, rotatingIdLen); + } #endif - id.SetCdPort(mCdcListenPort); + if (id.GetCdPort() == 0) + { + id.SetCdPort(mCdcListenPort); + } err = gUDCClient->SendUDCMessage(&mTransports, id, commissioner); diff --git a/src/app/server/Server.h b/src/app/server/Server.h index e6263ccddc6431..e574b52b159957 100644 --- a/src/app/server/Server.h +++ b/src/app/server/Server.h @@ -314,7 +314,14 @@ class Server CHIP_ERROR Init(const ServerInitParams & initParams); #if CHIP_DEVICE_CONFIG_ENABLE_COMMISSIONER_DISCOVERY_CLIENT - CHIP_ERROR SendUserDirectedCommissioningRequest(chip::Transport::PeerAddress commissioner); + CHIP_ERROR + SendUserDirectedCommissioningRequest(chip::Transport::PeerAddress commissioner, + Protocols::UserDirectedCommissioning::IdentificationDeclaration & id); + + Protocols::UserDirectedCommissioning::UserDirectedCommissioningClient * GetUserDirectedCommissioningClient() + { + return gUDCClient; + } #endif // CHIP_DEVICE_CONFIG_ENABLE_COMMISSIONER_DISCOVERY_CLIENT /** diff --git a/src/controller/CommissionerDiscoveryController.cpp b/src/controller/CommissionerDiscoveryController.cpp index bd6bee4d098078..c1c6492636ecd0 100644 --- a/src/controller/CommissionerDiscoveryController.cpp +++ b/src/controller/CommissionerDiscoveryController.cpp @@ -50,6 +50,47 @@ void CommissionerDiscoveryController::OnUserDirectedCommissioningRequest(UDCClie ChipLogDetail(Controller, "CommissionerDiscoveryController not read. Current instance=%s", mCurrentInstance); return; } + // first check if this is a cancel + if (state.GetCancelPasscode()) + { + ChipLogDetail(Controller, "------PROMPT USER: %s cancelled commissioning [" ChipLogFormatMEI "," ChipLogFormatMEI ",%s]", + state.GetDeviceName(), ChipLogValueMEI(state.GetVendorId()), ChipLogValueMEI(state.GetProductId()), + state.GetInstanceName()); + if (mUserPrompter != nullptr) + { + mUserPrompter->HidePromptsOnCancel(state.GetVendorId(), state.GetProductId(), state.GetDeviceName()); + } + return; + } + if (state.GetCommissionerPasscodeReady() && state.GetCdPort() != 0) + { + uint32_t passcode = state.GetCachedCommissionerPasscode(); + if (!mReady || passcode == 0) + { + ChipLogError(AppServer, "On UDC: commissioner passcode ready but no passcode"); + CommissionerDeclaration cd; + cd.SetErrorCode(CommissionerDeclaration::CdError::kUnexpectedCommissionerPasscodeReady); + + if (mUdcServer == nullptr) + { + ChipLogError(AppServer, "On UDC: no udc server"); + return; + } + mUdcServer->SendCDCMessage(cd, + chip::Transport::PeerAddress::UDP(state.GetPeerAddress().GetIPAddress(), state.GetCdPort())); + return; + } + else + { + // can only get here is ok() has already been called + ChipLogError(AppServer, "On UDC: commissioner passcode ready with passcode - commissioning"); + + // start commissioning using the cached passcode + CommissionWithPasscode(passcode); + return; + } + } + mReady = false; Platform::CopyString(mCurrentInstance, state.GetInstanceName()); mPendingConsent = true; @@ -73,7 +114,7 @@ void CommissionerDiscoveryController::Ok() { if (!mPendingConsent) { - ChipLogError(AppServer, "UX Cancel: no current instance"); + ChipLogError(AppServer, "UX Ok: no current instance"); return; } if (mUdcServer == nullptr) @@ -94,7 +135,7 @@ void CommissionerDiscoveryController::Ok() } client->SetUDCClientProcessingState(UDCClientProcessingState::kObtainingOnboardingPayload); - if (mPincodeService != nullptr) + if (mPasscodeService != nullptr) { char rotatingIdString[chip::Dnssd::kMaxRotatingIdLen * 2 + 1] = ""; Encoding::BytesToUppercaseHexString(client->GetRotatingId(), client->GetRotatingIdLength(), rotatingIdString, @@ -103,24 +144,122 @@ void CommissionerDiscoveryController::Ok() // sizeof(rotatingIdString)); CharSpan rotatingIdSpan = chip::CharSpan(rotatingIdString, sizeof(rotatingIdString)); - uint32_t pincode = - mPincodeService->FetchCommissionPincodeFromContentApp(client->GetVendorId(), client->GetProductId(), rotatingIdSpan); - if (pincode != 0) + uint32_t passcode = 0; + uint8_t targetAppCount = client->GetNumTargetAppInfos(); + if (targetAppCount > 0) + { + bool hasTargetApp = false; + for (uint8_t i = 0; i < targetAppCount; i++) + { + TargetAppInfo info; + if (client->GetTargetAppInfo(i, info)) + { + if (mPasscodeService->HasTargetContentApp(client->GetVendorId(), client->GetProductId(), rotatingIdSpan, info, + passcode)) + { + // found one + hasTargetApp = true; + } + } + } + // handle NoAppsFound CDC case + if (!hasTargetApp) + { + ChipLogError(AppServer, "UX Ok: target apps specified but none found, sending CDC"); + CommissionerDeclaration cd; + cd.SetNoAppsFound(true); + mUdcServer->SendCDCMessage( + cd, chip::Transport::PeerAddress::UDP(client->GetPeerAddress().GetIPAddress(), client->GetCdPort())); + return; + } + } + else + { + passcode = mPasscodeService->FetchCommissionPasscodeFromContentApp(client->GetVendorId(), client->GetProductId(), + rotatingIdSpan); + } + + // if CommissionerPasscode + // - if CommissionerPasscodeReady, then start commissioning + // - if CommissionerPasscode, then call new UX method to show passcode, send CDC + if (passcode == 0 && client->GetCommissionerPasscode() && client->GetCdPort() != 0) + { + // first step of commissioner passcode + ChipLogError(AppServer, "UX Ok: commissioner passcode, sending CDC"); + // generate a passcode + passcode = mPasscodeService->GetCommissionerPasscode(client->GetVendorId(), client->GetProductId(), rotatingIdSpan); + if (passcode == 0) + { + // passcode feature disabled + ChipLogError(AppServer, "UX Ok: commissioner passcode disabled, sending CDC with error"); + CommissionerDeclaration cd; + cd.SetErrorCode(CommissionerDeclaration::CdError::kCommissionerPasscodeDisabled); + cd.SetNeedsPasscode(true); + mUdcServer->SendCDCMessage( + cd, chip::Transport::PeerAddress::UDP(client->GetPeerAddress().GetIPAddress(), client->GetCdPort())); + return; + } + client->SetCachedCommissionerPasscode(passcode); + + CommissionerDeclaration cd; + cd.SetCommissionerPasscode(true); + if (mUserPrompter->DisplaysPasscodeAndQRCode()) + { + cd.SetQRCodeDisplayed(true); + } + mUdcServer->SendCDCMessage( + cd, chip::Transport::PeerAddress::UDP(client->GetPeerAddress().GetIPAddress(), client->GetCdPort())); + + // dialog + ChipLogDetail(Controller, + "------PROMPT USER: %s is requesting permission to cast to this TV. Casting passcode: [" ChipLogFormatMEI + "]. Additional instructions [" ChipLogFormatMEI "] [%s]. [" ChipLogFormatMEI "," ChipLogFormatMEI ",%s]", + client->GetDeviceName(), ChipLogValueMEI(passcode), ChipLogValueMEI(client->GetPairingHint()), + client->GetPairingInst(), ChipLogValueMEI(client->GetVendorId()), ChipLogValueMEI(client->GetProductId()), + client->GetInstanceName()); + mUserPrompter->PromptWithCommissionerPasscode(client->GetVendorId(), client->GetProductId(), client->GetDeviceName(), + passcode, client->GetPairingHint(), client->GetPairingInst()); + return; + } + if (passcode != 0) { - CommissionWithPincode(pincode); + CommissionWithPasscode(passcode); return; } } - ChipLogDetail(Controller, "------PROMPT USER: please enter pin displayed in casting app "); + // if NoPasscode, send CDC + if (client->GetNoPasscode() && client->GetCdPort() != 0) + { + ChipLogError(AppServer, "UX Ok: no app passcode and NoPasscode in UDC, sending CDC"); + CommissionerDeclaration cd; + cd.SetNeedsPasscode(true); + mUdcServer->SendCDCMessage(cd, + chip::Transport::PeerAddress::UDP(client->GetPeerAddress().GetIPAddress(), client->GetCdPort())); + return; + } + + // if CdUponPasscodeDialog, send CDC + if (client->GetCdUponPasscodeDialog() && client->GetCdPort() != 0) + { + ChipLogError(AppServer, "UX Ok: no app passcode and GetCdUponPasscodeDialog in UDC, sending CDC"); + CommissionerDeclaration cd; + cd.SetNeedsPasscode(true); // TODO: should this be set? + cd.SetPasscodeDialogDisplayed(true); + mUdcServer->SendCDCMessage(cd, + chip::Transport::PeerAddress::UDP(client->GetPeerAddress().GetIPAddress(), client->GetCdPort())); + } + + ChipLogDetail(Controller, "------PROMPT USER: please enter passcode displayed in casting app "); if (mUserPrompter != nullptr) { - mUserPrompter->PromptForCommissionPincode(client->GetVendorId(), client->GetProductId(), client->GetDeviceName()); + mUserPrompter->PromptForCommissionPasscode(client->GetVendorId(), client->GetProductId(), client->GetDeviceName(), + client->GetPairingHint(), client->GetPairingInst()); } - ChipLogDetail(Controller, "------Via Shell Enter: controller ux ok [pincode]"); + ChipLogDetail(Controller, "------Via Shell Enter: controller ux ok [passcode]"); } -void CommissionerDiscoveryController::CommissionWithPincode(uint32_t pincode) +void CommissionerDiscoveryController::CommissionWithPasscode(uint32_t passcode) { if (!mPendingConsent) { @@ -129,7 +268,7 @@ void CommissionerDiscoveryController::CommissionWithPincode(uint32_t pincode) } if (mUdcServer == nullptr) { - ChipLogError(AppServer, "UX CommissionWithPincode: no udc server"); + ChipLogError(AppServer, "UX CommissionWithPasscode: no udc server"); return; } UDCClientState * client = mUdcServer->GetUDCClients().FindUDCClientState(mCurrentInstance); @@ -142,14 +281,18 @@ void CommissionerDiscoveryController::CommissionWithPincode(uint32_t pincode) if (!(client->GetUDCClientProcessingState() == UDCClientProcessingState::kPromptingUser || client->GetUDCClientProcessingState() == UDCClientProcessingState::kObtainingOnboardingPayload)) { - ChipLogError(AppServer, "UX CommissionWithPincode: invalid state for CommissionWithPincode"); + ChipLogError(AppServer, "UX CommissionWithPasscode: invalid state for CommissionWithPasscode"); return; } Transport::PeerAddress peerAddress = client->GetPeerAddress(); client->SetUDCClientProcessingState(UDCClientProcessingState::kCommissioningNode); if (mCommissionerCallback != nullptr) { - mCommissionerCallback->ReadyForCommissioning(pincode, client->GetLongDiscriminator(), peerAddress); + if (mUserPrompter != nullptr) + { + mUserPrompter->PromptCommissioningStarted(client->GetVendorId(), client->GetProductId(), client->GetDeviceName()); + } + mCommissionerCallback->ReadyForCommissioning(passcode, client->GetLongDiscriminator(), peerAddress); } } diff --git a/src/controller/CommissionerDiscoveryController.h b/src/controller/CommissionerDiscoveryController.h index 8d7fee99e3d25b..42a0bb6f327fc9 100644 --- a/src/controller/CommissionerDiscoveryController.h +++ b/src/controller/CommissionerDiscoveryController.h @@ -65,18 +65,70 @@ class DLL_EXPORT UserPrompter /** * @brief - * Called to prompt the user to enter the setup pincode displayed by the given commissioneeName/vendorId/productId to be - * commissioned. For example "Please enter pin displayed in casting app." + * Called to prompt the user to enter the setup passcode displayed by the given commissioneeName/vendorId/productId to be + * commissioned. For example "Please enter passcode displayed in casting app." * - * If user enters with pin then implementor should call CommissionerRespondPincode(uint32_t pincode); + * If user enters passcode then implementor should call CommissionerRespondPasscode(uint32_t passcode); * If user responds with Cancel then implementor should call CommissionerRespondCancel(); * * @param[in] vendorId The vendorId in the DNS-SD advertisement of the requesting commissionee. * @param[in] productId The productId in the DNS-SD advertisement of the requesting commissionee. * @param[in] commissioneeName The commissioneeName in the DNS-SD advertisement of the requesting commissionee. + * @param[in] pairingHint The pairingHint in the DNS-SD advertisement of the requesting commissionee. + * @param[in] pairingInstruction The pairingInstruction in the DNS-SD advertisement of the requesting commissionee. * */ - virtual void PromptForCommissionPincode(uint16_t vendorId, uint16_t productId, const char * commissioneeName) = 0; + virtual void PromptForCommissionPasscode(uint16_t vendorId, uint16_t productId, const char * commissioneeName, + uint16_t pairingHint, const char * pairingInstruction) = 0; + + /** + * @brief + * Called to when CancelCommissioning is received via UDC. + * Indicates that commissioner can stop showing the passcode entry or display dialog. + * For example, can show text such as "Commissioning cancelled by client" before hiding dialog. + * + * @param[in] vendorId The vendorId in the DNS-SD advertisement of the requesting commissionee. + * @param[in] productId The productId in the DNS-SD advertisement of the requesting commissionee. + * @param[in] commissioneeName The commissioneeName in the DNS-SD advertisement of the requesting commissionee. + * + */ + virtual void HidePromptsOnCancel(uint16_t vendorId, uint16_t productId, const char * commissioneeName) = 0; + + /** + * @brief + * Return true if this UserPrompter displays QR code along with passcode + * When PromptWithCommissionerPasscode is called during Commissioner Passcode functionality. + */ + virtual bool DisplaysPasscodeAndQRCode() = 0; + + /** + * @brief + * Called to display the given setup passcode to the user, + * for commissioning the given commissioneeName with the given vendorId and productId, + * and provide instructions for where to enter it in the commissionee (when pairingHint and pairingInstruction are provided). + * For example "Casting Passcode: [passcode]. For more instructions, click here." + * + * @param[in] vendorId The vendorId in the DNS-SD advertisement of the requesting commissionee. + * @param[in] productId The productId in the DNS-SD advertisement of the requesting commissionee. + * @param[in] commissioneeName The commissioneeName in the DNS-SD advertisement of the requesting commissionee. + * @param[in] passcode The passcode to display. + * @param[in] pairingHint The pairingHint in the DNS-SD advertisement of the requesting commissionee. + * @param[in] pairingInstruction The pairingInstruction in the DNS-SD advertisement of the requesting commissionee. + * + */ + virtual void PromptWithCommissionerPasscode(uint16_t vendorId, uint16_t productId, const char * commissioneeName, + uint32_t passcode, uint16_t pairingHint, const char * pairingInstruction) = 0; + + /** + * @brief + * Called to alert the user that commissioning has begun." + * + * @param[in] vendorId The vendorid from the DAC of the new node. + * @param[in] productId The productid from the DAC of the new node. + * @param[in] commissioneeName The commissioneeName in the DNS-SD advertisement of the requesting commissionee. + * + */ + virtual void PromptCommissioningStarted(uint16_t vendorId, uint16_t productId, const char * commissioneeName) = 0; /** * @brief @@ -101,13 +153,41 @@ class DLL_EXPORT UserPrompter virtual ~UserPrompter() = default; }; -class DLL_EXPORT PincodeService +// TODO: rename this to Passcode? +class DLL_EXPORT PasscodeService { public: /** * @brief - * Called to get the setup pincode from the content app corresponding to the given vendorId/productId - * Returns 0 if pincode cannot be obtained + * Called to determine if the given target app is available to the commissionee with the given given + * vendorId/productId, and if so, return the passcode. + * + * @param[in] vendorId The vendorId in the DNS-SD advertisement of the requesting commissionee. + * @param[in] productId The productId in the DNS-SD advertisement of the requesting commissionee. + * @param[in] rotatingId The rotatingId in the DNS-SD advertisement of the requesting commissionee. + * @param[in] info App info to look for. + * @param[in] passcode Passcode for the given commissionee, or 0 if passcode cannot be obtained. + * + */ + virtual bool HasTargetContentApp(uint16_t vendorId, uint16_t productId, chip::CharSpan rotatingId, + chip::Protocols::UserDirectedCommissioning::TargetAppInfo & info, uint32_t & passcode) = 0; + + /** + * @brief + * Called to get the commissioner-generated setup passcode. + * Returns 0 if feature is disabled. + * + * @param[in] vendorId The vendorId in the DNS-SD advertisement of the requesting commissionee. + * @param[in] productId The productId in the DNS-SD advertisement of the requesting commissionee. + * @param[in] rotatingId The rotatingId in the DNS-SD advertisement of the requesting commissionee. + * + */ + virtual uint32_t GetCommissionerPasscode(uint16_t vendorId, uint16_t productId, chip::CharSpan rotatingId) = 0; + + /** + * @brief + * Called to get the setup passcode from the content app corresponding to the given vendorId/productId + * Returns 0 if passcode cannot be obtained * * If user responds with OK then implementor should call CommissionerRespondOk(); * If user responds with Cancel then implementor should call CommissionerRespondCancel(); @@ -117,9 +197,9 @@ class DLL_EXPORT PincodeService * @param[in] rotatingId The rotatingId in the DNS-SD advertisement of the requesting commissionee. * */ - virtual uint32_t FetchCommissionPincodeFromContentApp(uint16_t vendorId, uint16_t productId, chip::CharSpan rotatingId) = 0; + virtual uint32_t FetchCommissionPasscodeFromContentApp(uint16_t vendorId, uint16_t productId, chip::CharSpan rotatingId) = 0; - virtual ~PincodeService() = default; + virtual ~PasscodeService() = default; }; class DLL_EXPORT PostCommissioningListener @@ -152,12 +232,12 @@ class DLL_EXPORT CommissionerCallback * Called to notify the commissioner that commissioning can now proceed for * the node identified by the given arguments. * - * @param[in] pincode The pin code to use for the commissionee. + * @param[in] passcode The passcode to use for the commissionee. * @param[in] longDiscriminator The long discriminator for the commissionee. * @param[in] peerAddress The peerAddress for the commissionee. * */ - virtual void ReadyForCommissioning(uint32_t pincode, uint16_t longDiscriminator, PeerAddress peerAddress) = 0; + virtual void ReadyForCommissioning(uint32_t passcode, uint16_t longDiscriminator, PeerAddress peerAddress) = 0; virtual ~CommissionerCallback() = default; }; @@ -201,10 +281,10 @@ class CommissionerDiscoveryController : public chip::Protocols::UserDirectedComm void Cancel(); /** - * This method should be called with the pincode for the client - * indicated in the UserPrompter's PromptForCommissionPincode callback + * This method should be called with the passcode for the client + * indicated in the UserPrompter's PromptForCommissionPasscode callback */ - void CommissionWithPincode(uint32_t pincode); + void CommissionWithPasscode(uint32_t passcode); /** * This method should be called by the commissioner to indicate that commissioning succeeded. @@ -253,9 +333,9 @@ class CommissionerDiscoveryController : public chip::Protocols::UserDirectedComm inline void SetUserPrompter(UserPrompter * userPrompter) { mUserPrompter = userPrompter; } /** - * Assign a PincodeService + * Assign a PasscodeService */ - inline void SetPincodeService(PincodeService * pincodeService) { mPincodeService = pincodeService; } + inline void SetPasscodeService(PasscodeService * passcodeService) { mPasscodeService = passcodeService; } /** * Assign a Commissioner Callback to perform commissioning once user consent has been given @@ -293,7 +373,7 @@ class CommissionerDiscoveryController : public chip::Protocols::UserDirectedComm UserDirectedCommissioningServer * mUdcServer = nullptr; UserPrompter * mUserPrompter = nullptr; - PincodeService * mPincodeService = nullptr; + PasscodeService * mPasscodeService = nullptr; CommissionerCallback * mCommissionerCallback = nullptr; PostCommissioningListener * mPostCommissioningListener = nullptr; }; diff --git a/src/include/platform/CHIPDeviceConfig.h b/src/include/platform/CHIPDeviceConfig.h index bafca37458c8a3..9734e4bfa28b35 100644 --- a/src/include/platform/CHIPDeviceConfig.h +++ b/src/include/platform/CHIPDeviceConfig.h @@ -844,6 +844,20 @@ #define CHIP_DEVICE_CONFIG_PAIRING_SECONDARY_INSTRUCTION "" #endif +/** + * CHIP_DEVICE_CONFIG_ENABLE_COMMISSIONER_PASSCODE + * + * Enable or disable commissioner passcode feature. + * With this feature enabled, the commissioner can generate a commissioning passcode + * and display it to the user so that the user can enter it into a commissionable + * node, such as a phone app, during user directed commissioning. + * + * For Video Players, this value will often be 1 + */ +#ifndef CHIP_DEVICE_CONFIG_ENABLE_COMMISSIONER_PASSCODE +#define CHIP_DEVICE_CONFIG_ENABLE_COMMISSIONER_PASSCODE 0 +#endif + // -------------------- Thread Configuration -------------------- /** diff --git a/src/lib/dnssd/Advertiser.h b/src/lib/dnssd/Advertiser.h index bfb587acec2ad7..0a98a90fa89a7e 100644 --- a/src/lib/dnssd/Advertiser.h +++ b/src/lib/dnssd/Advertiser.h @@ -263,6 +263,13 @@ class CommissionAdvertisingParameters : public BaseAdvertisingParams commissionerPasscodeSupported) + { + mCommissionerPasscodeSupported = commissionerPasscodeSupported; + return *this; + } + Optional GetCommissionerPasscodeSupported() const { return mCommissionerPasscodeSupported; } + private: uint8_t mShortDiscriminator = 0; uint16_t mLongDiscriminator = 0; // 12-bit according to spec @@ -281,6 +288,8 @@ class CommissionAdvertisingParameters : public BaseAdvertisingParams mCommissionerPasscodeSupported; }; /** diff --git a/src/lib/dnssd/Advertiser_ImplMinimalMdns.cpp b/src/lib/dnssd/Advertiser_ImplMinimalMdns.cpp index 92499460b0db5c..a77abebab68a58 100644 --- a/src/lib/dnssd/Advertiser_ImplMinimalMdns.cpp +++ b/src/lib/dnssd/Advertiser_ImplMinimalMdns.cpp @@ -849,6 +849,10 @@ FullQName AdvertiserMinMdns::GetCommissioningTxtEntries(const CommissionAdvertis char txtRotatingDeviceId[chip::Dnssd::kKeyRotatingDeviceIdMaxLength + 4]; char txtPairingHint[chip::Dnssd::kKeyPairingInstructionMaxLength + 4]; char txtPairingInstr[chip::Dnssd::kKeyPairingInstructionMaxLength + 4]; + + // the following sub types only apply to commissioner discovery advertisements + char txtCommissionerPasscode[chip::Dnssd::kKeyCommissionerPasscodeMaxLength + 4]; + if (params.GetCommissionAdvertiseMode() == CommssionAdvertiseMode::kCommissionableNode) { // a discriminator always exists @@ -876,6 +880,14 @@ FullQName AdvertiserMinMdns::GetCommissioningTxtEntries(const CommissionAdvertis txtFields[numTxtFields++] = txtPairingInstr; } } + else + { + if (params.GetCommissionerPasscodeSupported().ValueOr(false)) + { + snprintf(txtCommissionerPasscode, sizeof(txtCommissionerPasscode), "CP=%d", static_cast(1)); + txtFields[numTxtFields++] = txtCommissionerPasscode; + } + } if (numTxtFields == 0) { return allocator->AllocateQNameFromArray(mEmptyTextEntries, 1); diff --git a/src/lib/dnssd/Discovery_ImplPlatform.cpp b/src/lib/dnssd/Discovery_ImplPlatform.cpp index 55debe8eb85e8b..240bb979991038 100644 --- a/src/lib/dnssd/Discovery_ImplPlatform.cpp +++ b/src/lib/dnssd/Discovery_ImplPlatform.cpp @@ -251,6 +251,9 @@ CHIP_ERROR CopyTxtRecord(TxtFieldKey key, char * buffer, size_t bufferLen, const return CopyTextRecordValue(buffer, bufferLen, params.GetPairingHint()); case TxtFieldKey::kCommissioningMode: return CopyTextRecordValue(buffer, bufferLen, params.GetCommissioningMode()); + case TxtFieldKey::kCommissionerPasscode: + return CopyTextRecordValue(buffer, bufferLen, + static_cast(params.GetCommissionerPasscodeSupported().ValueOr(false) ? 1 : 0)); default: return CopyTxtRecord(key, buffer, bufferLen, static_cast>(params)); } @@ -580,6 +583,7 @@ CHIP_ERROR DiscoveryImplPlatform::Advertise(const CommissionAdvertisingParameter if (params.GetCommissionAdvertiseMode() == CommssionAdvertiseMode::kCommissioner) { + ADD_TXT_RECORD(CommissionerPasscode); PUBLISH_RECORDS(Commissioner); return CHIP_NO_ERROR; } diff --git a/src/lib/dnssd/Resolver.h b/src/lib/dnssd/Resolver.h index ae4e95f4341b85..03e68e22df0c4a 100644 --- a/src/lib/dnssd/Resolver.h +++ b/src/lib/dnssd/Resolver.h @@ -177,6 +177,7 @@ struct CommissionNodeData size_t rotatingIdLen = 0; uint16_t pairingHint = 0; char pairingInstruction[kMaxPairingInstructionLen + 1] = {}; + uint8_t commissionerPasscode = 0; CommissionNodeData() {} @@ -230,6 +231,10 @@ struct CommissionNodeData ChipLogDetail(Discovery, "\tInstance Name: %s", instanceName); } ChipLogDetail(Discovery, "\tCommissioning Mode: %u", commissioningMode); + if (commissionerPasscode > 0) + { + ChipLogDetail(Discovery, "\tCommissioner Passcode: %u", commissionerPasscode); + } } }; diff --git a/src/lib/dnssd/TxtFields.cpp b/src/lib/dnssd/TxtFields.cpp index db11983ea869d7..d43650748e53a2 100644 --- a/src/lib/dnssd/TxtFields.cpp +++ b/src/lib/dnssd/TxtFields.cpp @@ -183,6 +183,11 @@ void GetPairingInstruction(const ByteSpan & value, char * pairingInstruction) Platform::CopyString(pairingInstruction, kMaxPairingInstructionLen + 1, value); } +uint8_t GetCommissionerPasscode(const ByteSpan & value) +{ + return MakeU8FromAsciiDecimal(value); +} + Optional GetRetryInterval(const ByteSpan & value) { const auto undefined = std::numeric_limits::max(); @@ -250,6 +255,9 @@ void FillNodeDataFromTxt(const ByteSpan & key, const ByteSpan & val, CommissionN case TxtFieldKey::kPairingHint: nodeData.pairingHint = Internal::GetPairingHint(val); break; + case TxtFieldKey::kCommissionerPasscode: + nodeData.commissionerPasscode = Internal::GetCommissionerPasscode(val); + break; default: break; } diff --git a/src/lib/dnssd/TxtFields.h b/src/lib/dnssd/TxtFields.h index 6e84fa372a8339..c3b8a0d668682c 100644 --- a/src/lib/dnssd/TxtFields.h +++ b/src/lib/dnssd/TxtFields.h @@ -39,14 +39,15 @@ static constexpr size_t kKeyTcpSupportedMaxLength = 1; static constexpr size_t kKeyLongIdleTimeICDMaxLength = 1; // Commissionable/commissioner node TXT entries -static constexpr size_t kKeyLongDiscriminatorMaxLength = 5; -static constexpr size_t kKeyVendorProductMaxLength = 11; -static constexpr size_t kKeyCommissioningModeMaxLength = 1; -static constexpr size_t kKeyDeviceTypeMaxLength = 10; -static constexpr size_t kKeyDeviceNameMaxLength = 32; -static constexpr size_t kKeyRotatingDeviceIdMaxLength = 100; -static constexpr size_t kKeyPairingInstructionMaxLength = 128; -static constexpr size_t kKeyPairingHintMaxLength = 10; +static constexpr size_t kKeyLongDiscriminatorMaxLength = 5; +static constexpr size_t kKeyVendorProductMaxLength = 11; +static constexpr size_t kKeyCommissioningModeMaxLength = 1; +static constexpr size_t kKeyDeviceTypeMaxLength = 10; +static constexpr size_t kKeyDeviceNameMaxLength = 32; +static constexpr size_t kKeyRotatingDeviceIdMaxLength = 100; +static constexpr size_t kKeyPairingInstructionMaxLength = 128; +static constexpr size_t kKeyPairingHintMaxLength = 10; +static constexpr size_t kKeyCommissionerPasscodeMaxLength = 1; enum class TxtKeyUse : uint8_t { @@ -66,6 +67,7 @@ enum class TxtFieldKey : uint8_t kRotatingDeviceId, kPairingInstruction, kPairingHint, + kCommissionerPasscode, kSessionIdleInterval, kSessionActiveInterval, kSessionActiveThreshold, @@ -93,6 +95,7 @@ constexpr const TxtFieldInfo txtFieldInfo[static_cast(TxtFieldKey::kCoun { TxtFieldKey::kRotatingDeviceId, kKeyRotatingDeviceIdMaxLength, "RI", TxtKeyUse::kCommission }, { TxtFieldKey::kPairingInstruction, kKeyPairingInstructionMaxLength, "PI", TxtKeyUse::kCommission }, { TxtFieldKey::kPairingHint, kKeyPairingHintMaxLength, "PH", TxtKeyUse::kCommission }, + { TxtFieldKey::kCommissionerPasscode, kKeyCommissionerPasscodeMaxLength, "CP", TxtKeyUse::kCommission }, { TxtFieldKey::kSessionIdleInterval, kKeySessionIdleIntervalMaxLength, "SII", TxtKeyUse::kCommon }, { TxtFieldKey::kSessionActiveInterval, kKeySessionActiveIntervalMaxLength, "SAI", TxtKeyUse::kCommon }, { TxtFieldKey::kSessionActiveThreshold, kKeySessionActiveThresholdMaxLength, "SAT", TxtKeyUse::kCommon }, @@ -112,6 +115,7 @@ void GetDeviceName(const ByteSpan & value, char * name); void GetRotatingDeviceId(const ByteSpan & value, uint8_t * rotatingId, size_t * len); uint16_t GetPairingHint(const ByteSpan & value); void GetPairingInstruction(const ByteSpan & value, char * pairingInstruction); +uint8_t GetCommissionerPasscode(const ByteSpan & value); #endif } // namespace Internal diff --git a/src/lib/dnssd/tests/TestTxtFields.cpp b/src/lib/dnssd/tests/TestTxtFields.cpp index 9c3f6bd08ae5ba..95f13b5d60c091 100644 --- a/src/lib/dnssd/tests/TestTxtFields.cpp +++ b/src/lib/dnssd/tests/TestTxtFields.cpp @@ -85,6 +85,9 @@ void TestGetTxtFieldKey(nlTestSuite * inSuite, void * inContext) strcpy(key, "XX"); NL_TEST_ASSERT(inSuite, GetTxtFieldKey(GetSpan(key)) == TxtFieldKey::kUnknown); + + strcpy(key, "CP"); + NL_TEST_ASSERT(inSuite, GetTxtFieldKey(GetSpan(key)) == TxtFieldKey::kCommissionerPasscode); } void TestGetTxtFieldKeyCaseInsensitive(nlTestSuite * inSuite, void * inContext) @@ -284,6 +287,20 @@ void TestGetPairingInstruction(nlTestSuite * inSuite, void * inContext) NL_TEST_ASSERT(inSuite, strcmp(ret, data) == 0); } +void TestGetCommissionerPasscode(nlTestSuite * inSuite, void * inContext) +{ + char cm[64]; + strcpy(cm, "0"); + NL_TEST_ASSERT(inSuite, GetCommissionerPasscode(GetSpan(cm)) == 0); + + strcpy(cm, "1"); + NL_TEST_ASSERT(inSuite, GetCommissionerPasscode(GetSpan(cm)) == 1); + + // overflow a uint8 + sprintf(cm, "%u", static_cast(std::numeric_limits::max()) + 1); + NL_TEST_ASSERT(inSuite, GetCommissionerPasscode(GetSpan(cm)) == 0); +} + bool NodeDataIsEmpty(const DiscoveredNodeData & node) { @@ -292,7 +309,7 @@ bool NodeDataIsEmpty(const DiscoveredNodeData & node) node.commissionData.rotatingIdLen != 0 || node.commissionData.pairingHint != 0 || node.resolutionData.mrpRetryIntervalIdle.HasValue() || node.resolutionData.mrpRetryIntervalActive.HasValue() || node.resolutionData.mrpRetryActiveThreshold.HasValue() || node.resolutionData.isICDOperatingAsLIT.HasValue() || - node.resolutionData.supportsTcp) + node.resolutionData.supportsTcp || node.commissionData.commissionerPasscode != 0) { return false; } @@ -343,6 +360,14 @@ void TestFillDiscoveredNodeDataFromTxt(nlTestSuite * inSuite, void * inContext) filled.commissionData.commissioningMode = 0; NL_TEST_ASSERT(inSuite, NodeDataIsEmpty(filled)); + // Commissioning mode + strcpy(key, "CP"); + strcpy(val, "1"); + FillNodeDataFromTxt(GetSpan(key), GetSpan(val), filled.commissionData); + NL_TEST_ASSERT(inSuite, filled.commissionData.commissionerPasscode == 1); + filled.commissionData.commissionerPasscode = 0; + NL_TEST_ASSERT(inSuite, NodeDataIsEmpty(filled)); + // Device type strcpy(key, "DT"); strcpy(val, "1"); @@ -744,6 +769,7 @@ const nlTest sTests[] = { NL_TEST_DEF("TxtFieldRotatingDeviceId", TestGetRotatingDeviceId), // NL_TEST_DEF("TxtFieldPairingHint", TestGetPairingHint), // NL_TEST_DEF("TxtFieldPairingInstruction", TestGetPairingInstruction), // + NL_TEST_DEF("TxtFieldCommissionerPasscode", TestGetCommissionerPasscode), // NL_TEST_DEF("TxtFieldFillDiscoveredNodeDataFromTxt", TestFillDiscoveredNodeDataFromTxt), // NL_TEST_DEF("TxtDiscoveredFieldMrpRetryIntervalIdle", TxtFieldSessionIdleInterval), NL_TEST_DEF("TxtDiscoveredFieldMrpRetryIntervalActive", TxtFieldSessionActiveInterval), diff --git a/src/protocols/user_directed_commissioning/UDCClientState.h b/src/protocols/user_directed_commissioning/UDCClientState.h index 944a1e156ad9f2..587b1e3ff2b64c 100644 --- a/src/protocols/user_directed_commissioning/UDCClientState.h +++ b/src/protocols/user_directed_commissioning/UDCClientState.h @@ -118,7 +118,7 @@ class UDCClientState } return false; } - size_t GetNumTargetAppInfos() const { return mNumTargetAppInfos; } + uint8_t GetNumTargetAppInfos() const { return mNumTargetAppInfos; } bool AddTargetAppInfo(TargetAppInfo vid) { @@ -160,27 +160,31 @@ class UDCClientState void SetCancelPasscode(bool newValue) { mCancelPasscode = newValue; }; bool GetCancelPasscode() const { return mCancelPasscode; }; + void SetCachedCommissionerPasscode(uint32_t newValue) { mCachedCommissionerPasscode = newValue; }; + uint32_t GetCachedCommissionerPasscode() const { return mCachedCommissionerPasscode; }; + /** * Reset the connection state to a completely uninitialized status. */ void Reset() { - mPeerAddress = PeerAddress::Uninitialized(); - mLongDiscriminator = 0; - mVendorId = 0; - mProductId = 0; - mRotatingIdLen = 0; - mCdPort = 0; - mDeviceName[0] = '\0'; - mPairingInst[0] = '\0'; - mPairingHint = 0; - mNoPasscode = false; - mCdUponPasscodeDialog = false; - mCommissionerPasscode = false; - mCommissionerPasscodeReady = false; - mCancelPasscode = false; - mExpirationTime = System::Clock::kZero; - mUDCClientProcessingState = UDCClientProcessingState::kNotInitialized; + mPeerAddress = PeerAddress::Uninitialized(); + mLongDiscriminator = 0; + mVendorId = 0; + mProductId = 0; + mRotatingIdLen = 0; + mCdPort = 0; + mDeviceName[0] = '\0'; + mPairingInst[0] = '\0'; + mPairingHint = 0; + mNoPasscode = false; + mCdUponPasscodeDialog = false; + mCommissionerPasscode = false; + mCommissionerPasscodeReady = false; + mCancelPasscode = false; + mExpirationTime = System::Clock::kZero; + mUDCClientProcessingState = UDCClientProcessingState::kNotInitialized; + mCachedCommissionerPasscode = 0; } private: @@ -208,6 +212,8 @@ class UDCClientState UDCClientProcessingState mUDCClientProcessingState; System::Clock::Timestamp mExpirationTime = System::Clock::kZero; + + uint32_t mCachedCommissionerPasscode = 0; }; } // namespace UserDirectedCommissioning diff --git a/src/protocols/user_directed_commissioning/UserDirectedCommissioning.h b/src/protocols/user_directed_commissioning/UserDirectedCommissioning.h index d05a80a857f200..b4b7e90a085611 100644 --- a/src/protocols/user_directed_commissioning/UserDirectedCommissioning.h +++ b/src/protocols/user_directed_commissioning/UserDirectedCommissioning.h @@ -115,7 +115,7 @@ class DLL_EXPORT IdentificationDeclaration } return false; } - size_t GetNumTargetAppInfos() const { return mNumTargetAppInfos; } + uint8_t GetNumTargetAppInfos() const { return mNumTargetAppInfos; } bool AddTargetAppInfo(TargetAppInfo vid) { @@ -246,7 +246,7 @@ class DLL_EXPORT IdentificationDeclaration } if (mCommissionerPasscodeReady) { - ChipLogDetail(AppServer, "\ttcommissioner passcode ready: true"); + ChipLogDetail(AppServer, "\tcommissioner passcode ready: true"); } if (mCancelPasscode) { @@ -328,7 +328,9 @@ class DLL_EXPORT CommissionerDeclaration kAppInstallConsentPending = 13, kAppInstalling = 14, kAppInstallFailed = 15, - kAppInstalledRetryNeeded = 16 + kAppInstalledRetryNeeded = 16, + kCommissionerPasscodeDisabled = 17, + kUnexpectedCommissionerPasscodeReady = 18 }; constexpr static size_t kUdcTLVDataMaxBytes = 500; diff --git a/src/protocols/user_directed_commissioning/UserDirectedCommissioningClient.cpp b/src/protocols/user_directed_commissioning/UserDirectedCommissioningClient.cpp index 1d93ae5bb1d75e..3bb69c099612e3 100644 --- a/src/protocols/user_directed_commissioning/UserDirectedCommissioningClient.cpp +++ b/src/protocols/user_directed_commissioning/UserDirectedCommissioningClient.cpp @@ -132,27 +132,30 @@ uint32_t IdentificationDeclaration::WritePayload(uint8_t * payloadBuffer, size_t (err = writer.PutBytes(chip::TLV::ContextTag(kRotatingIdTag), mRotatingId, static_cast(mRotatingIdLen))), LogErrorOnFailure(err)); - // AppVendorIdList - VerifyOrExit( - CHIP_NO_ERROR == - (err = writer.StartContainer(chip::TLV::ContextTag(kTargetAppListTag), chip::TLV::kTLVType_List, listContainerType)), - LogErrorOnFailure(err)); - for (size_t i = 0; i < mNumTargetAppInfos; i++) + if (mNumTargetAppInfos > 0) { - // start the TargetApp structure + // AppVendorIdList VerifyOrExit(CHIP_NO_ERROR == - (err = writer.StartContainer(chip::TLV::ContextTag(kTargetAppTag), chip::TLV::kTLVType_Structure, - outerContainerType)), - LogErrorOnFailure(err)); - // add the vendor Id - VerifyOrExit(CHIP_NO_ERROR == (err = writer.Put(chip::TLV::ContextTag(kAppVendorIdTag), mTargetAppInfos[i].vendorId)), + (err = writer.StartContainer(chip::TLV::ContextTag(kTargetAppListTag), chip::TLV::kTLVType_List, + listContainerType)), LogErrorOnFailure(err)); - VerifyOrExit(CHIP_NO_ERROR == (err = writer.Put(chip::TLV::ContextTag(kAppProductIdTag), mTargetAppInfos[i].productId)), - LogErrorOnFailure(err)); - // end the TargetApp structure - VerifyOrExit(CHIP_NO_ERROR == (err = writer.EndContainer(outerContainerType)), LogErrorOnFailure(err)); + for (size_t i = 0; i < mNumTargetAppInfos; i++) + { + // start the TargetApp structure + VerifyOrExit(CHIP_NO_ERROR == + (err = writer.StartContainer(chip::TLV::ContextTag(kTargetAppTag), chip::TLV::kTLVType_Structure, + outerContainerType)), + LogErrorOnFailure(err)); + // add the vendor Id + VerifyOrExit(CHIP_NO_ERROR == (err = writer.Put(chip::TLV::ContextTag(kAppVendorIdTag), mTargetAppInfos[i].vendorId)), + LogErrorOnFailure(err)); + VerifyOrExit(CHIP_NO_ERROR == (err = writer.Put(chip::TLV::ContextTag(kAppProductIdTag), mTargetAppInfos[i].productId)), + LogErrorOnFailure(err)); + // end the TargetApp structure + VerifyOrExit(CHIP_NO_ERROR == (err = writer.EndContainer(outerContainerType)), LogErrorOnFailure(err)); + } + VerifyOrExit(CHIP_NO_ERROR == (err = writer.EndContainer(listContainerType)), LogErrorOnFailure(err)); } - VerifyOrExit(CHIP_NO_ERROR == (err = writer.EndContainer(listContainerType)), LogErrorOnFailure(err)); VerifyOrExit(CHIP_NO_ERROR == (err = writer.PutBoolean(chip::TLV::ContextTag(kNoPasscodeTag), mNoPasscode)), LogErrorOnFailure(err)); @@ -169,9 +172,10 @@ uint32_t IdentificationDeclaration::WritePayload(uint8_t * payloadBuffer, size_t VerifyOrExit(CHIP_NO_ERROR == (err = writer.EndContainer(outerContainerType)), LogErrorOnFailure(err)); VerifyOrExit(CHIP_NO_ERROR == (err = writer.Finalize()), LogErrorOnFailure(err)); - return writer.GetLengthWritten(); + return writer.GetLengthWritten() + static_cast(sizeof(mInstanceName)); exit: + ChipLogError(AppServer, "IdentificationDeclaration::WritePayload exiting early error %" CHIP_ERROR_FORMAT, err.Format()); return 0; } diff --git a/src/protocols/user_directed_commissioning/UserDirectedCommissioningServer.cpp b/src/protocols/user_directed_commissioning/UserDirectedCommissioningServer.cpp index 1a2f125ae5d282..746df853436877 100644 --- a/src/protocols/user_directed_commissioning/UserDirectedCommissioningServer.cpp +++ b/src/protocols/user_directed_commissioning/UserDirectedCommissioningServer.cpp @@ -327,6 +327,10 @@ CHIP_ERROR IdentificationDeclaration::ReadPayload(uint8_t * udcPayload, size_t p err = reader.Get(mCancelPasscode); break; } + if (err != CHIP_NO_ERROR) + { + ChipLogError(AppServer, "IdentificationDeclaration::ReadPayload read error %" CHIP_ERROR_FORMAT, err.Format()); + } } if (err == CHIP_END_OF_TLV) @@ -334,6 +338,10 @@ CHIP_ERROR IdentificationDeclaration::ReadPayload(uint8_t * udcPayload, size_t p // Exiting container ReturnErrorOnFailure(reader.ExitContainer(outerContainerType)); } + else + { + ChipLogError(AppServer, "IdentificationDeclaration::ReadPayload exiting early error %" CHIP_ERROR_FORMAT, err.Format()); + } ChipLogProgress(AppServer, "UDC TLV parse complete"); return CHIP_NO_ERROR; From 8efb6aa317d7b42a2e550f4b2db4b602d63cad13 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Thu, 18 Jan 2024 15:18:39 -0500 Subject: [PATCH 14/25] Added a scoped value changer, mainly for unit test usage (#31513) * Added a scoped value changer, mainly for unit test usage * Restyle * Fix shadow variable naming * Fix name collision due to copy and paste * Update based on code review * Restyle --------- Co-authored-by: Andrei Litvin --- src/lib/support/BUILD.gn | 1 + src/lib/support/Scoped.h | 81 +++++++++++++++++++++ src/lib/support/tests/BUILD.gn | 1 + src/lib/support/tests/TestScoped.cpp | 102 +++++++++++++++++++++++++++ 4 files changed, 185 insertions(+) create mode 100644 src/lib/support/Scoped.h create mode 100644 src/lib/support/tests/TestScoped.cpp diff --git a/src/lib/support/BUILD.gn b/src/lib/support/BUILD.gn index 861cd280cec0d7..b02e4905ff5817 100644 --- a/src/lib/support/BUILD.gn +++ b/src/lib/support/BUILD.gn @@ -196,6 +196,7 @@ static_library("support") { "PrivateHeap.cpp", "PrivateHeap.h", "ReferenceCountedHandle.h", + "Scoped.h", "SerializableIntegerSet.cpp", "SerializableIntegerSet.h", "SetupDiscriminator.h", diff --git a/src/lib/support/Scoped.h b/src/lib/support/Scoped.h new file mode 100644 index 00000000000000..67cc2ea9e96271 --- /dev/null +++ b/src/lib/support/Scoped.h @@ -0,0 +1,81 @@ +/* + * + * Copyright (c) 2024 Project CHIP Authors + * All rights reserved. + * + * 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. + */ +#pragma once + +namespace chip { + +template +class ScopedChange; + +/// Allows a value to only be changed within a scope. +/// +/// Generally used to force determinism for unit test execution. +/// +/// When a variable of this type is used, it should +/// only be changed via `ScopedChange`. +template +class ScopedChangeOnly +{ +public: + explicit ScopedChangeOnly(T initial) : mValue(initial) {} + operator T() const { return mValue; } + +private: + T mValue; + + // Expected to be used only by ScopedChange only + T & InternalMutableValue() { return mValue; } + friend class ScopedChange; +}; + +/// Allows a scoped mutation to occur on a variable. +/// +/// When an instance of this class goes out of scope, the variable +/// will be reset to the default. +/// +/// Example usage +/// +/// int a = 123; +/// ScopedChangeOnly b(234); +/// +/// /* a == 123, b == 234 */ +/// { +/// ScopedChange changeA(a, 321); +/// /* a == 321, b == 234 */ +/// { +/// ScopedChange changeB(b, 10); +/// /* a == 321, b == 10 */ +/// } +/// /* a == 321, b == 234 */ +/// } +/// /* a == 123, b == 234 */ +/// +template +class ScopedChange +{ +public: + ScopedChange(ScopedChangeOnly & what, T value) : mValue(what.InternalMutableValue()), mOriginal(what) { mValue = value; } + ScopedChange(T & what, T value) : mValue(what), mOriginal(what) { mValue = value; } + ~ScopedChange() { mValue = mOriginal; } + +private: + T & mValue; + T mOriginal; +}; + +} // namespace chip diff --git a/src/lib/support/tests/BUILD.gn b/src/lib/support/tests/BUILD.gn index ca647b3dad99cd..7a3b738ef4491a 100644 --- a/src/lib/support/tests/BUILD.gn +++ b/src/lib/support/tests/BUILD.gn @@ -44,6 +44,7 @@ chip_test_suite_using_nltest("tests") { "TestPrivateHeap.cpp", "TestSafeInt.cpp", "TestSafeString.cpp", + "TestScoped.cpp", "TestScopedBuffer.cpp", "TestSerializableIntegerSet.cpp", "TestSpan.cpp", diff --git a/src/lib/support/tests/TestScoped.cpp b/src/lib/support/tests/TestScoped.cpp new file mode 100644 index 00000000000000..90cdd62b0acf4a --- /dev/null +++ b/src/lib/support/tests/TestScoped.cpp @@ -0,0 +1,102 @@ +/* + * + * Copyright (c) 2024 Project CHIP Authors + * All rights reserved. + * + * 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. + */ + +#include +#include + +#include +#include + +namespace { + +using namespace chip; + +void TestScopedVariableChange(nlTestSuite * inSuite, void * inContext) +{ + int x = 123; + + { + ScopedChange change1(x, 10); + NL_TEST_ASSERT(inSuite, x == 10); + + x = 15; + { + ScopedChange change2(x, 20); + NL_TEST_ASSERT(inSuite, x == 20); + } + NL_TEST_ASSERT(inSuite, x == 15); + } + NL_TEST_ASSERT(inSuite, x == 123); +} + +void TestScopedChangeOnly(nlTestSuite * inSuite, void * inContext) +{ + ScopedChangeOnly intValue(123); + ScopedChangeOnly strValue("abc"); + + NL_TEST_ASSERT(inSuite, intValue == 123); + NL_TEST_ASSERT(inSuite, strcmp(strValue, "abc") == 0); + + { + ScopedChange change1(intValue, 234); + + NL_TEST_ASSERT(inSuite, intValue == 234); + NL_TEST_ASSERT(inSuite, strcmp(strValue, "abc") == 0); + + ScopedChange change2(strValue, "xyz"); + NL_TEST_ASSERT(inSuite, intValue == 234); + NL_TEST_ASSERT(inSuite, strcmp(strValue, "xyz") == 0); + + { + ScopedChange change3(intValue, 10); + ScopedChange change4(strValue, "test"); + + NL_TEST_ASSERT(inSuite, intValue == 10); + NL_TEST_ASSERT(inSuite, strcmp(strValue, "test") == 0); + } + + NL_TEST_ASSERT(inSuite, intValue == 234); + NL_TEST_ASSERT(inSuite, strcmp(strValue, "xyz") == 0); + } + + NL_TEST_ASSERT(inSuite, intValue == 123); + NL_TEST_ASSERT(inSuite, strcmp(strValue, "abc") == 0); +} + +} // namespace + +#define NL_TEST_DEF_FN(fn) NL_TEST_DEF("Test " #fn, fn) +/** + * Test Suite. It lists all the test functions. + */ +static const nlTest sTests[] = { + NL_TEST_DEF_FN(TestScopedVariableChange), // + NL_TEST_DEF_FN(TestScopedChangeOnly), // + NL_TEST_SENTINEL() // +}; + +int TestScoped() +{ + nlTestSuite theSuite = { "CHIP Scoped tests", &sTests[0], nullptr, nullptr }; + + // Run test suite against one context. + nlTestRunner(&theSuite, nullptr); + return nlTestRunnerStats(&theSuite); +} + +CHIP_REGISTER_TEST_SUITE(TestScoped) From 45ad1397f7fad60be2b43deb307dae3f117be55e Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Thu, 18 Jan 2024 16:58:12 -0500 Subject: [PATCH 15/25] Update Darwin availability annotations. (#31487) Explicitly annotate unstable Thermostat and RVC bits as provisional. --- .../CHIP/templates/availability.yaml | 59 +++++++++++++++++++ 1 file changed, 59 insertions(+) diff --git a/src/darwin/Framework/CHIP/templates/availability.yaml b/src/darwin/Framework/CHIP/templates/availability.yaml index 611851a064c183..e1f129f9d0e763 100644 --- a/src/darwin/Framework/CHIP/templates/availability.yaml +++ b/src/darwin/Framework/CHIP/templates/availability.yaml @@ -8557,12 +8557,54 @@ - NumberOfAliroCredentialIssuerKeysSupported - NumberOfAliroEndpointKeysSupported ICDManagement: + # Targeting Spring 2024 Matter release - OperatingMode + Thermostat: + # Targeting Spring 2024 Matter release + - PresetTypes + - ScheduleTypes + - NumberOfPresets + - NumberOfSchedules + - NumberOfScheduleTransitions + - NumberOfScheduleTransitionPerDay + - ActivePresetHandle + - Presets + - Schedules + - PresetsSchedulesEditable + - TemperatureSetpointHoldPolicy + - SetpointHoldExpiryTimestamp + - QueuedPreset + - ActiveScheduleHandle commands: DoorLock: # Aliro is not ready yet. - SetAliroReaderConfig - ClearAliroReaderConfig + Thermostat: + # Targeting Spring 2024 Matter release + - SetActiveScheduleRequest + - SetActivePresetRequest + - StartPresetsSchedulesEditRequest + - CancelPresetsSchedulesEditRequest + - CommitPresetsSchedulesRequest + - CancelSetActivePresetRequest + - SetTemperatureSetpointHoldPolicy + RVCOperationalState: + # Targeting Spring 2024 Matter release + - GoHome + structs: + Thermostat: + # Targeting Spring 2024 Matter release + - ScheduleTransitionStruct + - ScheduleStruct + - PresetStruct + - PresetTypeStruct + - ScheduleTypeStruct + - QueuedPresetStruct + enums: + Thermostat: + # Targeting Spring 2024 Matter release + - PresetScenarioEnum enum values: DoorLock: CredentialTypeEnum: @@ -8578,9 +8620,26 @@ OperationSourceEnum: # Aliro is not ready yet. - Aliro + RVCRunMode: + ModeTag: + # Targeting Spring 2024 Matter release + - Mapping + bitmaps: + Thermostat: + # Targeting Spring 2024 Matter release + - PresetTypeFeaturesBitmap + - ScheduleTypeFeaturesBitmap + - TemperatureSetpointHoldPolicyBitmap bitmap values: DoorLock: Feature: # Aliro is not ready yet. - AliroProvisioning - AliroBLEUWB + Thermostat: + Feature: + # Targeting Spring 2024 Matter release + - QueuedPresetsSupported + - Setpoints + - Presets + - MatterScheduleConfiguration From 45aa5b7bc2d8530c6cc31cba747aecf4772cec68 Mon Sep 17 00:00:00 2001 From: jamesharrow <93921463+jamesharrow@users.noreply.github.com> Date: Fri, 19 Jan 2024 00:01:40 +0000 Subject: [PATCH 16/25] 31479 updated DEM xml to take latest spec changes (#31483) * Autogen'd the XML from Hasty's Alchemy tool and some minor hand edits to correct. * Updated ZAP files and regen_all.py * Fixed compile issues caused by type changes. Included GetOptOutState() to allow the new OptOutState attribute to be handled. * Added helper function to handle optout checking of OptOutState attribute against Adjustment cause in existing commands * Added CancelRequest command handler. Updated Conformance feature flags and generated commands. Some code clean up in sdk layer with returning of Status (success was missing in places) * Added AjustmentCause to delegate API for commands that should use it. * Fixed build on all-clusters-app * Merged changes into all-clusters-app.zap and energy-management-app.zap and regen all * Update src/app/clusters/device-energy-management-server/device-energy-management-server.cpp Co-authored-by: Boris Zbarsky --------- Co-authored-by: Boris Zbarsky --- .../all-clusters-app.matter | 51 +++- .../all-clusters-common/all-clusters-app.zap | 58 ++-- .../src/device-energy-management-stub.cpp | 8 +- .../energy-management-app.matter | 51 +++- .../energy-management-app.zap | 26 +- .../DeviceEnergyManagementDelegateImpl.h | 18 +- .../include/DeviceEnergyManagementManager.h | 5 +- .../DeviceEnergyManagementDelegateImpl.cpp | 34 ++- examples/energy-management-app/linux/main.cpp | 9 +- .../device-energy-management-server.cpp | 272 +++++++++++++----- .../device-energy-management-server.h | 47 +-- .../chip/device-energy-management-cluster.xml | 129 ++++++--- .../zcl/zcl-with-test-extensions.json | 1 + src/app/zap-templates/zcl/zcl.json | 1 + .../data_model/controller-clusters.matter | 47 ++- .../chip/devicecontroller/ChipClusters.java | 92 +++++- .../devicecontroller/ChipEventStructs.java | 18 ++ .../chip/devicecontroller/ChipStructs.java | 49 ++-- .../devicecontroller/ClusterIDMapping.java | 14 +- .../devicecontroller/ClusterInfoMapping.java | 37 +++ .../devicecontroller/ClusterReadMapping.java | 11 + ...viceEnergyManagementClusterResumedEvent.kt | 52 ++++ .../chip/devicecontroller/cluster/files.gni | 1 + ...ceEnergyManagementClusterForecastStruct.kt | 10 +- ...DeviceEnergyManagementClusterSlotStruct.kt | 42 ++- .../clusters/DeviceEnergyManagementCluster.kt | 130 ++++++++- ...viceEnergyManagementClusterResumedEvent.kt | 52 ++++ .../java/matter/controller/cluster/files.gni | 1 + ...ceEnergyManagementClusterForecastStruct.kt | 10 +- ...DeviceEnergyManagementClusterSlotStruct.kt | 42 ++- .../CHIPAttributeTLVValueDecoder.cpp | 103 +++++-- .../CHIPEventTLVValueDecoder.cpp | 12 +- .../python/chip/clusters/CHIPClusters.py | 17 ++ .../python/chip/clusters/Objects.py | 103 ++++++- .../MTRAttributeSpecifiedCheck.mm | 3 + .../MTRAttributeTLVValueDecoder.mm | 30 +- .../CHIP/zap-generated/MTRBaseClusters.h | 43 ++- .../CHIP/zap-generated/MTRBaseClusters.mm | 64 +++++ .../CHIP/zap-generated/MTRClusterConstants.h | 2 + .../CHIP/zap-generated/MTRClusters.h | 5 + .../CHIP/zap-generated/MTRClusters.mm | 36 +++ .../zap-generated/MTRCommandPayloadsObjc.h | 38 +++ .../zap-generated/MTRCommandPayloadsObjc.mm | 113 +++++++- .../MTRCommandPayloads_Internal.h | 6 + .../zap-generated/MTREventTLVValueDecoder.mm | 6 + .../CHIP/zap-generated/MTRStructsObjc.h | 8 +- .../CHIP/zap-generated/MTRStructsObjc.mm | 17 +- .../zap-generated/cluster-enums-check.h | 45 ++- .../app-common/zap-generated/cluster-enums.h | 60 +++- .../zap-generated/cluster-objects.cpp | 66 +++++ .../zap-generated/cluster-objects.h | 110 +++++-- .../app-common/zap-generated/ids/Attributes.h | 4 + .../app-common/zap-generated/ids/Commands.h | 4 + .../zap-generated/cluster/Commands.h | 49 ++++ .../cluster/ComplexArgumentParser.cpp | 35 ++- .../cluster/logging/DataModelLogger.cpp | 21 ++ .../zap-generated/cluster/Commands.h | 170 +++++++++++ 57 files changed, 2127 insertions(+), 361 deletions(-) create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DeviceEnergyManagementClusterResumedEvent.kt create mode 100644 src/controller/java/generated/java/matter/controller/cluster/eventstructs/DeviceEnergyManagementClusterResumedEvent.kt diff --git a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter index 076c291ec6fd96..5c7cdec4c3591c 100644 --- a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter +++ b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter @@ -3990,13 +3990,19 @@ provisional cluster ElectricalEnergyMeasurement = 145 { /** This cluster allows a client to manage the power draw of a device. An example of such a client could be an Energy Management System (EMS) which controls an Energy Smart Appliance (ESA). */ provisional cluster DeviceEnergyManagement = 152 { - revision 2; + revision 3; + + enum AdjustmentCauseEnum : enum8 { + kLocalOptimization = 0; + kGridOptimization = 1; + } enum CauseEnum : enum8 { kNormalCompletion = 0; kOffline = 1; kFault = 2; kUserOptOut = 3; + kCancelled = 4; } enum CostTypeEnum : enum8 { @@ -4010,9 +4016,8 @@ provisional cluster DeviceEnergyManagement = 152 { kOffline = 0; kOnline = 1; kFault = 2; - kUserOptOut = 3; - kPowerAdjustActive = 4; - kPaused = 5; + kPowerAdjustActive = 3; + kPaused = 4; } enum ESATypeEnum : enum8 { @@ -4033,11 +4038,27 @@ provisional cluster DeviceEnergyManagement = 152 { kOther = 255; } + enum ForecastUpdateReasonEnum : enum8 { + kInternalOptimization = 0; + kLocalOptimization = 1; + kGridOptimization = 2; + } + + enum OptOutStateEnum : enum8 { + kNoOptOut = 0; + kLocalOptOut = 1; + kGridOptOut = 2; + kOptOut = 3; + } + bitmap Feature : bitmap32 { kPowerAdjustment = 0x1; kPowerForecastReporting = 0x2; kStateForecastReporting = 0x4; - kForecastAdjustment = 0x8; + kStartTimeAdjustment = 0x8; + kPausable = 0x10; + kForecastAdjustment = 0x20; + kConstraintBasedAdjustment = 0x40; } struct CostStruct { @@ -4053,9 +4074,9 @@ provisional cluster DeviceEnergyManagement = 152 { elapsed_s defaultDuration = 2; elapsed_s elapsedSlotTime = 3; elapsed_s remainingSlotTime = 4; - boolean slotIsPauseable = 5; - elapsed_s minPauseDuration = 6; - elapsed_s maxPauseDuration = 7; + optional boolean slotIsPauseable = 5; + optional elapsed_s minPauseDuration = 6; + optional elapsed_s maxPauseDuration = 7; optional int16u manufacturerESAState = 8; optional power_mw nominalPower = 9; optional power_mw minPower = 10; @@ -4077,6 +4098,7 @@ provisional cluster DeviceEnergyManagement = 152 { optional epoch_s latestEndTime = 5; boolean isPauseable = 6; SlotStruct slots[] = 7; + ForecastUpdateReasonEnum forecastUpdateReason = 8; } struct ConstraintsStruct { @@ -4113,6 +4135,7 @@ provisional cluster DeviceEnergyManagement = 152 { } info event Resumed = 3 { + CauseEnum cause = 0; } readonly attribute ESATypeEnum ESAType = 0; @@ -4122,6 +4145,7 @@ provisional cluster DeviceEnergyManagement = 152 { readonly attribute power_mw absMaxPower = 4; readonly attribute optional nullable PowerAdjustStruct powerAdjustmentCapability[] = 5; readonly attribute optional nullable ForecastStruct forecast = 6; + readonly attribute optional OptOutStateEnum optOutState = 7; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -4132,23 +4156,28 @@ provisional cluster DeviceEnergyManagement = 152 { request struct PowerAdjustRequestRequest { power_mw power = 0; elapsed_s duration = 1; + AdjustmentCauseEnum cause = 2; } request struct StartTimeAdjustRequestRequest { epoch_s requestedStartTime = 0; + AdjustmentCauseEnum cause = 1; } request struct PauseRequestRequest { elapsed_s duration = 0; + AdjustmentCauseEnum cause = 1; } request struct ModifyForecastRequestRequest { int32u forecastId = 0; SlotAdjustmentStruct slotAdjustments[] = 1; + AdjustmentCauseEnum cause = 2; } request struct RequestConstraintBasedForecastRequest { ConstraintsStruct constraints[] = 0; + AdjustmentCauseEnum cause = 1; } /** Allows a client to request an adjustment in the power consumption of an ESA for a specified duration. */ @@ -4165,6 +4194,8 @@ provisional cluster DeviceEnergyManagement = 152 { command ModifyForecastRequest(ModifyForecastRequestRequest): DefaultSuccess = 5; /** Allows a client to ask the ESA to recompute its Forecast based on power and time constraints. */ command RequestConstraintBasedForecast(RequestConstraintBasedForecastRequest): DefaultSuccess = 6; + /** Allows a client to request cancellation of a previous adjustment request in a StartTimeAdjustRequest, ModifyForecastRequest or RequestConstraintBasedForecast command */ + command CancelRequest(): DefaultSuccess = 7; } /** Electric Vehicle Supply Equipment (EVSE) is equipment used to charge an Electric Vehicle (EV) or Plug-In Hybrid Electric Vehicle. This cluster provides an interface to the functionality of Electric Vehicle Supply Equipment (EVSE) management. */ @@ -8009,12 +8040,13 @@ endpoint 1 { callback attribute absMaxPower; callback attribute powerAdjustmentCapability; callback attribute forecast; + callback attribute optOutState; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute eventList; callback attribute attributeList; callback attribute featureMap; - ram attribute clusterRevision default = 2; + ram attribute clusterRevision default = 3; handle command PowerAdjustRequest; handle command CancelPowerAdjustRequest; @@ -8023,6 +8055,7 @@ endpoint 1 { handle command ResumeRequest; handle command ModifyForecastRequest; handle command RequestConstraintBasedForecast; + handle command CancelRequest; } server cluster EnergyEvse { diff --git a/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap b/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap index 1d0d2054ba71fa..21b74ffd223f5e 100644 --- a/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap +++ b/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap @@ -17,12 +17,6 @@ } ], "package": [ - { - "pathRelativity": "relativeToZap", - "path": "../../../src/app/zap-templates/app-templates.json", - "type": "gen-templates-json", - "version": "chip-v1" - }, { "pathRelativity": "relativeToZap", "path": "../../../src/app/zap-templates/zcl/zcl-with-test-extensions.json", @@ -30,6 +24,12 @@ "category": "matter", "version": 1, "description": "Matter SDK ZCL data with some extensions" + }, + { + "pathRelativity": "relativeToZap", + "path": "../../../src/app/zap-templates/app-templates.json", + "type": "gen-templates-json", + "version": "chip-v1" } ], "endpointTypes": [ @@ -8150,7 +8150,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -8166,7 +8166,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -8182,7 +8182,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -8198,7 +8198,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -8214,7 +8214,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -8230,7 +8230,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -8246,7 +8246,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -8262,7 +8262,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -8278,7 +8278,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -12899,6 +12899,14 @@ "source": "client", "isIncoming": 1, "isEnabled": 1 + }, + { + "name": "CancelRequest", + "code": 7, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 } ], "attributes": [ @@ -13014,6 +13022,22 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "OptOutState", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "OptOutStateEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "GeneratedCommandList", "code": 65528, @@ -13056,7 +13080,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": null, + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -13104,7 +13128,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "2", + "defaultValue": "3", "reportable": 1, "minInterval": 1, "maxInterval": 65534, diff --git a/examples/all-clusters-app/all-clusters-common/src/device-energy-management-stub.cpp b/examples/all-clusters-app/all-clusters-common/src/device-energy-management-stub.cpp index 385c1cfa43c8ee..190702c61af464 100644 --- a/examples/all-clusters-app/all-clusters-common/src/device-energy-management-stub.cpp +++ b/examples/all-clusters-app/all-clusters-common/src/device-energy-management-stub.cpp @@ -50,10 +50,10 @@ void emberAfDeviceEnergyManagementClusterInitCallback(chip::EndpointId endpointI gInstance = std::make_unique( endpointId, *gDelegate, BitMask( - DeviceEnergyManagement::Feature::kPowerForecastReporting, DeviceEnergyManagement::Feature::kStateForecastReporting, - DeviceEnergyManagement::Feature::kPowerAdjustment, DeviceEnergyManagement::Feature::kForecastAdjustment), - BitMask(OptionalCommands::kSupportsModifyForecastRequest, - OptionalCommands::kSupportsRequestConstraintBasedForecast)); + DeviceEnergyManagement::Feature::kPowerAdjustment, DeviceEnergyManagement::Feature::kPowerForecastReporting, + DeviceEnergyManagement::Feature::kStateForecastReporting, DeviceEnergyManagement::Feature::kStartTimeAdjustment, + DeviceEnergyManagement::Feature::kPausable, DeviceEnergyManagement::Feature::kForecastAdjustment, + DeviceEnergyManagement::Feature::kConstraintBasedAdjustment)); if (!gInstance) { diff --git a/examples/energy-management-app/energy-management-common/energy-management-app.matter b/examples/energy-management-app/energy-management-common/energy-management-app.matter index 6fff020aa05417..56e288bc712b9b 100644 --- a/examples/energy-management-app/energy-management-common/energy-management-app.matter +++ b/examples/energy-management-app/energy-management-common/energy-management-app.matter @@ -902,13 +902,19 @@ cluster GroupKeyManagement = 63 { /** This cluster allows a client to manage the power draw of a device. An example of such a client could be an Energy Management System (EMS) which controls an Energy Smart Appliance (ESA). */ provisional cluster DeviceEnergyManagement = 152 { - revision 2; + revision 3; + + enum AdjustmentCauseEnum : enum8 { + kLocalOptimization = 0; + kGridOptimization = 1; + } enum CauseEnum : enum8 { kNormalCompletion = 0; kOffline = 1; kFault = 2; kUserOptOut = 3; + kCancelled = 4; } enum CostTypeEnum : enum8 { @@ -922,9 +928,8 @@ provisional cluster DeviceEnergyManagement = 152 { kOffline = 0; kOnline = 1; kFault = 2; - kUserOptOut = 3; - kPowerAdjustActive = 4; - kPaused = 5; + kPowerAdjustActive = 3; + kPaused = 4; } enum ESATypeEnum : enum8 { @@ -945,11 +950,27 @@ provisional cluster DeviceEnergyManagement = 152 { kOther = 255; } + enum ForecastUpdateReasonEnum : enum8 { + kInternalOptimization = 0; + kLocalOptimization = 1; + kGridOptimization = 2; + } + + enum OptOutStateEnum : enum8 { + kNoOptOut = 0; + kLocalOptOut = 1; + kGridOptOut = 2; + kOptOut = 3; + } + bitmap Feature : bitmap32 { kPowerAdjustment = 0x1; kPowerForecastReporting = 0x2; kStateForecastReporting = 0x4; - kForecastAdjustment = 0x8; + kStartTimeAdjustment = 0x8; + kPausable = 0x10; + kForecastAdjustment = 0x20; + kConstraintBasedAdjustment = 0x40; } struct CostStruct { @@ -965,9 +986,9 @@ provisional cluster DeviceEnergyManagement = 152 { elapsed_s defaultDuration = 2; elapsed_s elapsedSlotTime = 3; elapsed_s remainingSlotTime = 4; - boolean slotIsPauseable = 5; - elapsed_s minPauseDuration = 6; - elapsed_s maxPauseDuration = 7; + optional boolean slotIsPauseable = 5; + optional elapsed_s minPauseDuration = 6; + optional elapsed_s maxPauseDuration = 7; optional int16u manufacturerESAState = 8; optional power_mw nominalPower = 9; optional power_mw minPower = 10; @@ -989,6 +1010,7 @@ provisional cluster DeviceEnergyManagement = 152 { optional epoch_s latestEndTime = 5; boolean isPauseable = 6; SlotStruct slots[] = 7; + ForecastUpdateReasonEnum forecastUpdateReason = 8; } struct ConstraintsStruct { @@ -1025,6 +1047,7 @@ provisional cluster DeviceEnergyManagement = 152 { } info event Resumed = 3 { + CauseEnum cause = 0; } readonly attribute ESATypeEnum ESAType = 0; @@ -1034,6 +1057,7 @@ provisional cluster DeviceEnergyManagement = 152 { readonly attribute power_mw absMaxPower = 4; readonly attribute optional nullable PowerAdjustStruct powerAdjustmentCapability[] = 5; readonly attribute optional nullable ForecastStruct forecast = 6; + readonly attribute optional OptOutStateEnum optOutState = 7; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1044,23 +1068,28 @@ provisional cluster DeviceEnergyManagement = 152 { request struct PowerAdjustRequestRequest { power_mw power = 0; elapsed_s duration = 1; + AdjustmentCauseEnum cause = 2; } request struct StartTimeAdjustRequestRequest { epoch_s requestedStartTime = 0; + AdjustmentCauseEnum cause = 1; } request struct PauseRequestRequest { elapsed_s duration = 0; + AdjustmentCauseEnum cause = 1; } request struct ModifyForecastRequestRequest { int32u forecastId = 0; SlotAdjustmentStruct slotAdjustments[] = 1; + AdjustmentCauseEnum cause = 2; } request struct RequestConstraintBasedForecastRequest { ConstraintsStruct constraints[] = 0; + AdjustmentCauseEnum cause = 1; } /** Allows a client to request an adjustment in the power consumption of an ESA for a specified duration. */ @@ -1077,6 +1106,8 @@ provisional cluster DeviceEnergyManagement = 152 { command ModifyForecastRequest(ModifyForecastRequestRequest): DefaultSuccess = 5; /** Allows a client to ask the ESA to recompute its Forecast based on power and time constraints. */ command RequestConstraintBasedForecast(RequestConstraintBasedForecastRequest): DefaultSuccess = 6; + /** Allows a client to request cancellation of a previous adjustment request in a StartTimeAdjustRequest, ModifyForecastRequest or RequestConstraintBasedForecast command */ + command CancelRequest(): DefaultSuccess = 7; } /** Electric Vehicle Supply Equipment (EVSE) is equipment used to charge an Electric Vehicle (EV) or Plug-In Hybrid Electric Vehicle. This cluster provides an interface to the functionality of Electric Vehicle Supply Equipment (EVSE) management. */ @@ -1478,12 +1509,13 @@ endpoint 1 { callback attribute absMaxPower; callback attribute powerAdjustmentCapability; callback attribute forecast; + callback attribute optOutState; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute eventList; callback attribute attributeList; callback attribute featureMap; - ram attribute clusterRevision default = 2; + ram attribute clusterRevision default = 3; handle command PowerAdjustRequest; handle command CancelPowerAdjustRequest; @@ -1492,6 +1524,7 @@ endpoint 1 { handle command ResumeRequest; handle command ModifyForecastRequest; handle command RequestConstraintBasedForecast; + handle command CancelRequest; } server cluster EnergyEvse { diff --git a/examples/energy-management-app/energy-management-common/energy-management-app.zap b/examples/energy-management-app/energy-management-common/energy-management-app.zap index 92430d761980ab..d00270b2ed5717 100644 --- a/examples/energy-management-app/energy-management-common/energy-management-app.zap +++ b/examples/energy-management-app/energy-management-common/energy-management-app.zap @@ -2581,6 +2581,14 @@ "source": "client", "isIncoming": 1, "isEnabled": 1 + }, + { + "name": "CancelRequest", + "code": 7, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 } ], "attributes": [ @@ -2696,6 +2704,22 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "OptOutState", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "OptOutStateEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "GeneratedCommandList", "code": 65528, @@ -2786,7 +2810,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "2", + "defaultValue": "3", "reportable": 1, "minInterval": 1, "maxInterval": 65534, diff --git a/examples/energy-management-app/energy-management-common/include/DeviceEnergyManagementDelegateImpl.h b/examples/energy-management-app/energy-management-common/include/DeviceEnergyManagementDelegateImpl.h index 464a683510b3d7..973e1e622576a4 100644 --- a/examples/energy-management-app/energy-management-common/include/DeviceEnergyManagementDelegateImpl.h +++ b/examples/energy-management-app/energy-management-common/include/DeviceEnergyManagementDelegateImpl.h @@ -36,16 +36,19 @@ namespace DeviceEnergyManagement { class DeviceEnergyManagementDelegate : public DeviceEnergyManagement::Delegate { public: - virtual Status PowerAdjustRequest(const int64_t power, const uint32_t duration) override; + virtual Status PowerAdjustRequest(const int64_t power, const uint32_t duration, AdjustmentCauseEnum cause) override; virtual Status CancelPowerAdjustRequest() override; - virtual Status StartTimeAdjustRequest(const uint32_t requestedStartTime) override; - virtual Status PauseRequest(const uint32_t duration) override; + virtual Status StartTimeAdjustRequest(const uint32_t requestedStartTime, AdjustmentCauseEnum cause) override; + virtual Status PauseRequest(const uint32_t duration, AdjustmentCauseEnum cause) override; virtual Status ResumeRequest() override; virtual Status ModifyForecastRequest(const uint32_t forecastId, - const DataModel::DecodableList & slotAdjustments) override; - virtual Status RequestConstraintBasedForecast( - const DataModel::DecodableList & constraints) override; + const DataModel::DecodableList & slotAdjustments, + AdjustmentCauseEnum cause) override; + virtual Status + RequestConstraintBasedForecast(const DataModel::DecodableList & constraints, + AdjustmentCauseEnum cause) override; + virtual Status CancelRequest() override; // ------------------------------------------------------------------ // Get attribute methods @@ -56,6 +59,7 @@ class DeviceEnergyManagementDelegate : public DeviceEnergyManagement::Delegate virtual int64_t GetAbsMaxPower() override; virtual Attributes::PowerAdjustmentCapability::TypeInfo::Type GetPowerAdjustmentCapability() override; virtual DataModel::Nullable GetForecast() override; + virtual OptOutStateEnum GetOptOutState() override; // ------------------------------------------------------------------ // Set attribute methods @@ -75,6 +79,8 @@ class DeviceEnergyManagementDelegate : public DeviceEnergyManagement::Delegate int64_t mAbsMaxPower; Attributes::PowerAdjustmentCapability::TypeInfo::Type mPowerAdjustmentCapability; DataModel::Nullable mForecast; + // Default to NoOptOut + OptOutStateEnum mOptOutState = OptOutStateEnum::kNoOptOut; }; } // namespace DeviceEnergyManagement diff --git a/examples/energy-management-app/energy-management-common/include/DeviceEnergyManagementManager.h b/examples/energy-management-app/energy-management-common/include/DeviceEnergyManagementManager.h index 6d131dd4ae90fa..aec875ff0d1f99 100644 --- a/examples/energy-management-app/energy-management-common/include/DeviceEnergyManagementManager.h +++ b/examples/energy-management-app/energy-management-common/include/DeviceEnergyManagementManager.h @@ -31,9 +31,8 @@ using namespace chip::app::Clusters::DeviceEnergyManagement; class DeviceEnergyManagementManager : public Instance { public: - DeviceEnergyManagementManager(EndpointId aEndpointId, DeviceEnergyManagementDelegate & aDelegate, Feature aFeature, - OptionalCommands aOptionalCmds) : - DeviceEnergyManagement::Instance(aEndpointId, aDelegate, aFeature, aOptionalCmds) + DeviceEnergyManagementManager(EndpointId aEndpointId, DeviceEnergyManagementDelegate & aDelegate, Feature aFeature) : + DeviceEnergyManagement::Instance(aEndpointId, aDelegate, aFeature) { mDelegate = &aDelegate; } diff --git a/examples/energy-management-app/energy-management-common/src/DeviceEnergyManagementDelegateImpl.cpp b/examples/energy-management-app/energy-management-common/src/DeviceEnergyManagementDelegateImpl.cpp index 4d4d9bf05bbdbb..28c6b8942ff493 100644 --- a/examples/energy-management-app/energy-management-common/src/DeviceEnergyManagementDelegateImpl.cpp +++ b/examples/energy-management-app/energy-management-common/src/DeviceEnergyManagementDelegateImpl.cpp @@ -49,7 +49,7 @@ using CostsList = DataModel::List; * 6) generate a PowerAdjustEnd event with cause NormalCompletion * 7) if necessary, update the forecast with new expected end time */ -Status DeviceEnergyManagementDelegate::PowerAdjustRequest(const int64_t power, const uint32_t duration) +Status DeviceEnergyManagementDelegate::PowerAdjustRequest(const int64_t power, const uint32_t duration, AdjustmentCauseEnum cause) { Status status = Status::UnsupportedCommand; // Status::Success; @@ -98,7 +98,7 @@ Status DeviceEnergyManagementDelegate::CancelPowerAdjustRequest() * 1) update the forecast attribute with the revised start time * 2) send a callback notification to the appliance so it can refresh its internal schedule */ -Status DeviceEnergyManagementDelegate::StartTimeAdjustRequest(const uint32_t requestedStartTime) +Status DeviceEnergyManagementDelegate::StartTimeAdjustRequest(const uint32_t requestedStartTime, AdjustmentCauseEnum cause) { DataModel::Nullable forecast = GetForecast(); @@ -136,7 +136,7 @@ Status DeviceEnergyManagementDelegate::StartTimeAdjustRequest(const uint32_t req * 6) generate a Resumed event * 7) if necessary, update the forecast with new expected end time */ -Status DeviceEnergyManagementDelegate::PauseRequest(const uint32_t duration) +Status DeviceEnergyManagementDelegate::PauseRequest(const uint32_t duration, AdjustmentCauseEnum cause) { Status status = Status::UnsupportedCommand; // Status::Success; // TODO: implement the behaviour above @@ -181,7 +181,8 @@ Status DeviceEnergyManagementDelegate::ResumeRequest() * 3) notify the appliance to follow the revised schedule */ Status DeviceEnergyManagementDelegate::ModifyForecastRequest( - const uint32_t forecastId, const DataModel::DecodableList & slotAdjustments) + const uint32_t forecastId, const DataModel::DecodableList & slotAdjustments, + AdjustmentCauseEnum cause) { Status status = Status::UnsupportedCommand; // Status::Success; @@ -202,7 +203,25 @@ Status DeviceEnergyManagementDelegate::ModifyForecastRequest( * 3) notify the appliance to follow the revised schedule */ Status DeviceEnergyManagementDelegate::RequestConstraintBasedForecast( - const DataModel::DecodableList & constraints) + const DataModel::DecodableList & constraints, AdjustmentCauseEnum cause) +{ + Status status = Status::UnsupportedCommand; // Status::Success; + // TODO: implement the behaviour above + return status; +} + +/** + * @brief Delegate handler for CancelRequest + * + * Note: This is a more complex use-case and requires higher-level work by the delegate. + * + * It SHALL: + * 1) Check if the forecastUpdateReason was already InternalOptimization (and reject the command) + * 2) Update its forecast (based on its optimization strategy) ignoring previous requests + * 3) Update its Forecast attribute to match its new intended operation, and update the + * ForecastStruct.ForecastUpdateReason to `Internal Optimization`. + */ +Status DeviceEnergyManagementDelegate::CancelRequest() { Status status = Status::UnsupportedCommand; // Status::Success; // TODO: implement the behaviour above @@ -246,6 +265,11 @@ DataModel::Nullable DeviceEnergyManagementDelegat return mForecast; } +OptOutStateEnum DeviceEnergyManagementDelegate::GetOptOutState() +{ + return mOptOutState; +} + // ------------------------------------------------------------------ // Set attribute methods diff --git a/examples/energy-management-app/linux/main.cpp b/examples/energy-management-app/linux/main.cpp index 23ec97e267f45d..df544484975f4f 100644 --- a/examples/energy-management-app/linux/main.cpp +++ b/examples/energy-management-app/linux/main.cpp @@ -73,11 +73,10 @@ CHIP_ERROR DeviceEnergyManagementInit() gDEMInstance = std::make_unique( EndpointId(ENERGY_EVSE_ENDPOINT), *gDEMDelegate, BitMask( - DeviceEnergyManagement::Feature::kPowerForecastReporting, DeviceEnergyManagement::Feature::kStateForecastReporting, - DeviceEnergyManagement::Feature::kPowerAdjustment, DeviceEnergyManagement::Feature::kForecastAdjustment), - BitMask( - DeviceEnergyManagement::OptionalCommands::kSupportsModifyForecastRequest, - DeviceEnergyManagement::OptionalCommands::kSupportsRequestConstraintBasedForecast)); + DeviceEnergyManagement::Feature::kPowerAdjustment, DeviceEnergyManagement::Feature::kPowerForecastReporting, + DeviceEnergyManagement::Feature::kStateForecastReporting, DeviceEnergyManagement::Feature::kStartTimeAdjustment, + DeviceEnergyManagement::Feature::kPausable, DeviceEnergyManagement::Feature::kForecastAdjustment, + DeviceEnergyManagement::Feature::kConstraintBasedAdjustment)); if (!gDEMInstance) { diff --git a/src/app/clusters/device-energy-management-server/device-energy-management-server.cpp b/src/app/clusters/device-energy-management-server/device-energy-management-server.cpp index bfe3cac5f2e89e..7836e91295412f 100644 --- a/src/app/clusters/device-energy-management-server/device-energy-management-server.cpp +++ b/src/app/clusters/device-energy-management-server/device-energy-management-server.cpp @@ -53,11 +53,6 @@ bool Instance::HasFeature(Feature aFeature) const return mFeature.Has(aFeature); } -bool Instance::SupportsOptCmd(OptionalCommands aOptionalCmds) const -{ - return mOptionalCmds.Has(aOptionalCmds); -} - // AttributeAccessInterface CHIP_ERROR Instance::Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) { @@ -87,6 +82,16 @@ CHIP_ERROR Instance::Read(const ConcreteReadAttributePath & aPath, AttributeValu return CHIP_IM_GLOBAL_STATUS(UnsupportedAttribute); } return aEncoder.Encode(mDelegate.GetForecast()); + case OptOutState::Id: + /* PA | STA | PAU | FA | CON */ + if (!HasFeature(Feature::kPowerAdjustment) && !HasFeature(Feature::kStartTimeAdjustment) && + !HasFeature(Feature::kPausable) && !HasFeature(Feature::kForecastAdjustment) && + !HasFeature(Feature::kConstraintBasedAdjustment)) + { + return CHIP_IM_GLOBAL_STATUS(UnsupportedAttribute); + } + return aEncoder.Encode(mDelegate.GetOptOutState()); + /* FeatureMap - is held locally */ case FeatureMap::Id: return aEncoder.Encode(mFeature); @@ -112,28 +117,33 @@ CHIP_ERROR Instance::EnumerateAcceptedCommands(const ConcreteClusterPath & clust } } - if (HasFeature(Feature::kForecastAdjustment)) + if (HasFeature(Feature::kStartTimeAdjustment)) { - for (auto && cmd : { - StartTimeAdjustRequest::Id, - PauseRequest::Id, - ResumeRequest::Id, - }) - { - VerifyOrExit(callback(cmd, context) == Loop::Continue, /**/); - } + VerifyOrExit(callback(StartTimeAdjustRequest::Id, context) == Loop::Continue, /**/); + } + + if (HasFeature(Feature::kPausable)) + { + VerifyOrExit(callback(PauseRequest::Id, context) == Loop::Continue, /**/); + VerifyOrExit(callback(ResumeRequest::Id, context) == Loop::Continue, /**/); } - if (SupportsOptCmd(OptionalCommands::kSupportsModifyForecastRequest)) + if (HasFeature(Feature::kForecastAdjustment)) { VerifyOrExit(callback(ModifyForecastRequest::Id, context) == Loop::Continue, /**/); } - if (SupportsOptCmd(OptionalCommands::kSupportsRequestConstraintBasedForecast)) + if (HasFeature(Feature::kConstraintBasedAdjustment)) { VerifyOrExit(callback(RequestConstraintBasedForecast::Id, context) == Loop::Continue, /**/); } + if (HasFeature(Feature::kStartTimeAdjustment) || HasFeature(Feature::kForecastAdjustment) || + HasFeature(Feature::kConstraintBasedAdjustment)) + { + VerifyOrExit(callback(CancelRequest::Id, context) == Loop::Continue, /**/); + } + exit: return CHIP_NO_ERROR; } @@ -169,7 +179,7 @@ void Instance::InvokeCommand(HandlerContext & handlerContext) } return; case StartTimeAdjustRequest::Id: - if (!HasFeature(Feature::kForecastAdjustment)) + if (!HasFeature(Feature::kStartTimeAdjustment)) { handlerContext.mCommandHandler.AddStatus(handlerContext.mRequestPath, Status::UnsupportedCommand); } @@ -181,7 +191,7 @@ void Instance::InvokeCommand(HandlerContext & handlerContext) } return; case PauseRequest::Id: - if (!HasFeature(Feature::kForecastAdjustment)) + if (!HasFeature(Feature::kPausable)) { handlerContext.mCommandHandler.AddStatus(handlerContext.mRequestPath, Status::UnsupportedCommand); } @@ -192,7 +202,7 @@ void Instance::InvokeCommand(HandlerContext & handlerContext) } return; case ResumeRequest::Id: - if (!HasFeature(Feature::kForecastAdjustment)) + if (!HasFeature(Feature::kPausable)) { handlerContext.mCommandHandler.AddStatus(handlerContext.mRequestPath, Status::UnsupportedCommand); } @@ -203,7 +213,7 @@ void Instance::InvokeCommand(HandlerContext & handlerContext) } return; case ModifyForecastRequest::Id: - if (!SupportsOptCmd(OptionalCommands::kSupportsModifyForecastRequest)) + if (!HasFeature(Feature::kForecastAdjustment)) { handlerContext.mCommandHandler.AddStatus(handlerContext.mRequestPath, Status::UnsupportedCommand); } @@ -215,7 +225,7 @@ void Instance::InvokeCommand(HandlerContext & handlerContext) } return; case RequestConstraintBasedForecast::Id: - if (!SupportsOptCmd(OptionalCommands::kSupportsRequestConstraintBasedForecast)) + if (!HasFeature(Feature::kConstraintBasedAdjustment)) { handlerContext.mCommandHandler.AddStatus(handlerContext.mRequestPath, Status::UnsupportedCommand); } @@ -226,19 +236,88 @@ void Instance::InvokeCommand(HandlerContext & handlerContext) [this](HandlerContext & ctx, const auto & commandData) { HandleRequestConstraintBasedForecast(ctx, commandData); }); } return; + case CancelRequest::Id: + if (!HasFeature(Feature::kStartTimeAdjustment) && !HasFeature(Feature::kForecastAdjustment) && + !HasFeature(Feature::kConstraintBasedAdjustment)) + { + handlerContext.mCommandHandler.AddStatus(handlerContext.mRequestPath, Status::UnsupportedCommand); + } + else + { + HandleCommand( + handlerContext, [this](HandlerContext & ctx, const auto & commandData) { HandleCancelRequest(ctx, commandData); }); + } + return; } } -void Instance::HandlePowerAdjustRequest(HandlerContext & ctx, const Commands::PowerAdjustRequest::DecodableType & commandData) +Status Instance::CheckOptOutAllowsRequest(AdjustmentCauseEnum adjustmentCause) { - int64_t power = commandData.power; - uint32_t durationSec = commandData.duration; - bool validArgs = false; - Status status = Status::Success; + OptOutStateEnum optOutState = mDelegate.GetOptOutState(); + + if (adjustmentCause == AdjustmentCauseEnum::kUnknownEnumValue) + { + ChipLogError(Zcl, "DEM: adjustment cause is invalid (%d)", static_cast(adjustmentCause)); + return Status::InvalidValue; + } + + switch (optOutState) + { + case OptOutStateEnum::kNoOptOut: /* User has NOT opted out so allow it */ + ChipLogProgress(Zcl, "DEM: OptOutState = kNoOptOut"); + return Status::Success; + + case OptOutStateEnum::kLocalOptOut: /* User has opted out from Local only*/ + ChipLogProgress(Zcl, "DEM: OptOutState = kLocalOptOut"); + switch (adjustmentCause) + { + case AdjustmentCauseEnum::kGridOptimization: + return Status::Success; + case AdjustmentCauseEnum::kLocalOptimization: + default: + return Status::Failure; + } + + case OptOutStateEnum::kGridOptOut: /* User has opted out from Grid only */ + ChipLogProgress(Zcl, "DEM: OptOutState = kGridOptOut"); + switch (adjustmentCause) + { + case AdjustmentCauseEnum::kLocalOptimization: + return Status::Success; + case AdjustmentCauseEnum::kGridOptimization: + default: + return Status::Failure; + } + + case OptOutStateEnum::kOptOut: /* User has opted out from both local and grid */ + ChipLogProgress(Zcl, "DEM: OptOutState = kOptOut"); + return Status::Failure; + default: + ChipLogError(Zcl, "DEM: invalid optOutState %d", static_cast(optOutState)); + return Status::InvalidValue; + } +} + +void Instance::HandlePowerAdjustRequest(HandlerContext & ctx, const Commands::PowerAdjustRequest::DecodableType & commandData) +{ + Status status; + bool validArgs = false; PowerAdjustmentCapability::TypeInfo::Type powerAdjustmentCapability; - powerAdjustmentCapability = mDelegate.GetPowerAdjustmentCapability(); + int64_t power = commandData.power; + uint32_t durationSec = commandData.duration; + AdjustmentCauseEnum adjustmentCause = commandData.cause; + + status = CheckOptOutAllowsRequest(adjustmentCause); + if (status != Status::Success) + { + ChipLogError(Zcl, "DEM: PowerAdjustRequest command rejected"); + ctx.mCommandHandler.AddStatus(ctx.mRequestPath, status); + return; + } + + powerAdjustmentCapability = mDelegate.GetPowerAdjustmentCapability(); if (powerAdjustmentCapability.IsNull()) { ChipLogError(Zcl, "DEM: powerAdjustmentCapability IsNull"); @@ -267,7 +346,7 @@ void Instance::HandlePowerAdjustRequest(HandlerContext & ctx, const Commands::Po ChipLogProgress(Zcl, "DEM: Good PowerAdjustRequest() args."); - status = mDelegate.PowerAdjustRequest(power, durationSec); + status = mDelegate.PowerAdjustRequest(power, durationSec, adjustmentCause); ctx.mCommandHandler.AddStatus(ctx.mRequestPath, status); if (status != Status::Success) { @@ -278,11 +357,10 @@ void Instance::HandlePowerAdjustRequest(HandlerContext & ctx, const Commands::Po void Instance::HandleCancelPowerAdjustRequest(HandlerContext & ctx, const Commands::CancelPowerAdjustRequest::DecodableType & commandData) { - Status status = Status::Success; - ESAStateEnum esaStatus; + Status status; /* Check that the ESA state is PowerAdjustActive */ - esaStatus = mDelegate.GetESAState(); + ESAStateEnum esaStatus = mDelegate.GetESAState(); if (ESAStateEnum::kPowerAdjustActive != esaStatus) { ChipLogError(Zcl, "DEM: kPowerAdjustActive != esaStatus"); @@ -302,24 +380,27 @@ void Instance::HandleCancelPowerAdjustRequest(HandlerContext & ctx, void Instance::HandleStartTimeAdjustRequest(HandlerContext & ctx, const Commands::StartTimeAdjustRequest::DecodableType & commandData) { - Status status = Status::Success; - uint32_t earliestStartTimeEpoch = 0; - uint32_t latestEndTimeEpoch = 0; - uint32_t requestedStartTimeEpoch = commandData.requestedStartTime; + Status status; + uint32_t earliestStartTimeEpoch = 0; + uint32_t latestEndTimeEpoch = 0; uint32_t duration; - DataModel::Nullable forecastNullable = mDelegate.GetForecast(); + uint32_t requestedStartTimeEpoch = commandData.requestedStartTime; + AdjustmentCauseEnum adjustmentCause = commandData.cause; - if (forecastNullable.IsNull()) + status = CheckOptOutAllowsRequest(adjustmentCause); + if (status != Status::Success) { - ChipLogError(Zcl, "DEM: Forecast is Null"); - ctx.mCommandHandler.AddStatus(ctx.mRequestPath, Status::Failure); + ChipLogError(Zcl, "DEM: StartTimeAdjustRequest command rejected"); + ctx.mCommandHandler.AddStatus(ctx.mRequestPath, status); return; } - if (ESAStateEnum::kUserOptOut == mDelegate.GetESAState()) + DataModel::Nullable forecastNullable = mDelegate.GetForecast(); + + if (forecastNullable.IsNull()) { - ChipLogError(Zcl, "DEM: ESAState = kUserOptOut"); + ChipLogError(Zcl, "DEM: Forecast is Null"); ctx.mCommandHandler.AddStatus(ctx.mRequestPath, Status::Failure); return; } @@ -395,7 +476,7 @@ void Instance::HandleStartTimeAdjustRequest(HandlerContext & ctx, } ChipLogProgress(Zcl, "DEM: Good requestedStartTimeEpoch %ld.", static_cast(requestedStartTimeEpoch)); - status = mDelegate.StartTimeAdjustRequest(requestedStartTimeEpoch); + status = mDelegate.StartTimeAdjustRequest(requestedStartTimeEpoch, adjustmentCause); ctx.mCommandHandler.AddStatus(ctx.mRequestPath, status); if (status != Status::Success) { @@ -410,18 +491,20 @@ void Instance::HandlePauseRequest(HandlerContext & ctx, const Commands::PauseReq CHIP_ERROR err = CHIP_NO_ERROR; DataModel::Nullable forecast = mDelegate.GetForecast(); - uint32_t duration = commandData.duration; + uint32_t duration = commandData.duration; + AdjustmentCauseEnum adjustmentCause = commandData.cause; - if (forecast.IsNull()) + status = CheckOptOutAllowsRequest(adjustmentCause); + if (status != Status::Success) { - ChipLogError(Zcl, "DEM: Forecast is Null"); - ctx.mCommandHandler.AddStatus(ctx.mRequestPath, Status::Failure); + ChipLogError(Zcl, "DEM: PauseRequest command rejected"); + ctx.mCommandHandler.AddStatus(ctx.mRequestPath, status); return; } - if (ESAStateEnum::kUserOptOut == mDelegate.GetESAState()) + if (forecast.IsNull()) { - ChipLogError(Zcl, "DEM: ESAState = kUserOptOut"); + ChipLogError(Zcl, "DEM: Forecast is Null"); ctx.mCommandHandler.AddStatus(ctx.mRequestPath, Status::Failure); return; } @@ -446,15 +529,37 @@ void Instance::HandlePauseRequest(HandlerContext & ctx, const Commands::PauseReq return; } - if (!forecast.Value().slots[activeSlotNumber].slotIsPauseable) + /* We expect that there should be a slotIsPauseable entry (but it is optional) */ + if (!forecast.Value().slots[activeSlotNumber].slotIsPauseable.HasValue()) + { + ChipLogError(Zcl, "DEM: activeSlotNumber %d does not include slotIsPauseable.", activeSlotNumber); + ctx.mCommandHandler.AddStatus(ctx.mRequestPath, Status::Failure); + return; + } + + if (!forecast.Value().slots[activeSlotNumber].minPauseDuration.HasValue()) + { + ChipLogError(Zcl, "DEM: activeSlotNumber %d does not include minPauseDuration.", activeSlotNumber); + ctx.mCommandHandler.AddStatus(ctx.mRequestPath, Status::Failure); + return; + } + + if (!forecast.Value().slots[activeSlotNumber].maxPauseDuration.HasValue()) + { + ChipLogError(Zcl, "DEM: activeSlotNumber %d does not include minPauseDuration.", activeSlotNumber); + ctx.mCommandHandler.AddStatus(ctx.mRequestPath, Status::Failure); + return; + } + + if (!forecast.Value().slots[activeSlotNumber].slotIsPauseable.Value()) { ChipLogError(Zcl, "DEM: activeSlotNumber %d is NOT pauseable.", activeSlotNumber); ctx.mCommandHandler.AddStatus(ctx.mRequestPath, Status::ConstraintError); return; } - if ((duration < forecast.Value().slots[activeSlotNumber].minPauseDuration) && - (duration > forecast.Value().slots[activeSlotNumber].maxPauseDuration)) + if ((duration < forecast.Value().slots[activeSlotNumber].minPauseDuration.Value()) && + (duration > forecast.Value().slots[activeSlotNumber].maxPauseDuration.Value())) { ChipLogError(Zcl, "DEM: out of range pause duration %ld", static_cast(duration)); ctx.mCommandHandler.AddStatus(ctx.mRequestPath, Status::ConstraintError); @@ -469,19 +574,18 @@ void Instance::HandlePauseRequest(HandlerContext & ctx, const Commands::PauseReq return; } - status = mDelegate.PauseRequest(duration); - ctx.mCommandHandler.AddStatus(ctx.mRequestPath, Status::Failure); + status = mDelegate.PauseRequest(duration, adjustmentCause); + ctx.mCommandHandler.AddStatus(ctx.mRequestPath, status); if (status != Status::Success) { - ChipLogError(Zcl, "DEM: mDelegate.PauseRequest(%ld) FAILURE", static_cast(duration)); + ChipLogError(Zcl, "DEM: PauseRequest(%ld) FAILURE", static_cast(duration)); return; } } void Instance::HandleResumeRequest(HandlerContext & ctx, const Commands::ResumeRequest::DecodableType & commandData) { - Status status = Status::Success; - DataModel::Nullable forecast = mDelegate.GetForecast(); + Status status; if (ESAStateEnum::kPaused != mDelegate.GetESAState()) { @@ -491,24 +595,28 @@ void Instance::HandleResumeRequest(HandlerContext & ctx, const Commands::ResumeR } status = mDelegate.ResumeRequest(); - ctx.mCommandHandler.AddStatus(ctx.mRequestPath, Status::Failure); + ctx.mCommandHandler.AddStatus(ctx.mRequestPath, status); if (status != Status::Success) { - ChipLogError(Zcl, "DEM: mDelegate.ResumeRequest() FAILURE"); + ChipLogError(Zcl, "DEM: ResumeRequest FAILURE"); return; } } void Instance::HandleModifyForecastRequest(HandlerContext & ctx, const Commands::ModifyForecastRequest::DecodableType & commandData) { - Status status = Status::Success; - uint32_t forecastId = commandData.forecastId; + Status status; DataModel::Nullable forecast; - if (ESAStateEnum::kUserOptOut == mDelegate.GetESAState()) + uint32_t forecastId = commandData.forecastId; + DataModel::DecodableList slotAdjustments = commandData.slotAdjustments; + AdjustmentCauseEnum adjustmentCause = commandData.cause; + + status = CheckOptOutAllowsRequest(adjustmentCause); + if (status != Status::Success) { - ChipLogError(Zcl, "DEM: ESAState = kUserOptOut"); - ctx.mCommandHandler.AddStatus(ctx.mRequestPath, Status::Failure); + ChipLogError(Zcl, "DEM: ModifyForecastRequest command rejected"); + ctx.mCommandHandler.AddStatus(ctx.mRequestPath, status); return; } @@ -520,12 +628,11 @@ void Instance::HandleModifyForecastRequest(HandlerContext & ctx, const Commands: return; } - DataModel::DecodableList slotAdjustments = commandData.slotAdjustments; - status = mDelegate.ModifyForecastRequest(forecastId, slotAdjustments); + status = mDelegate.ModifyForecastRequest(forecastId, slotAdjustments, adjustmentCause); + ctx.mCommandHandler.AddStatus(ctx.mRequestPath, status); if (status != Status::Success) { - ChipLogError(Zcl, "DEM: mDelegate.ModifyForecastRequest() FAILURE"); - ctx.mCommandHandler.AddStatus(ctx.mRequestPath, Status::Failure); + ChipLogError(Zcl, "DEM: ModifyForecastRequest FAILURE"); return; } } @@ -533,20 +640,37 @@ void Instance::HandleModifyForecastRequest(HandlerContext & ctx, const Commands: void Instance::HandleRequestConstraintBasedForecast(HandlerContext & ctx, const Commands::RequestConstraintBasedForecast::DecodableType & commandData) { - Status status = Status::Success; + Status status; - if (ESAStateEnum::kUserOptOut == mDelegate.GetESAState()) + DataModel::DecodableList constraints = commandData.constraints; + AdjustmentCauseEnum adjustmentCause = commandData.cause; + + status = CheckOptOutAllowsRequest(adjustmentCause); + if (status != Status::Success) { - ChipLogError(Zcl, "DEM: ESAState = kUserOptOut"); - ctx.mCommandHandler.AddStatus(ctx.mRequestPath, Status::Failure); + ChipLogError(Zcl, "DEM: RequestConstraintBasedForecast command rejected"); + ctx.mCommandHandler.AddStatus(ctx.mRequestPath, status); return; } - status = mDelegate.RequestConstraintBasedForecast(commandData.constraints); + status = mDelegate.RequestConstraintBasedForecast(constraints, adjustmentCause); + ctx.mCommandHandler.AddStatus(ctx.mRequestPath, status); if (status != Status::Success) { - ChipLogError(Zcl, "DEM: mDelegate.commandData.constraints() FAILURE"); - ctx.mCommandHandler.AddStatus(ctx.mRequestPath, Status::Failure); + ChipLogError(Zcl, "DEM: RequestConstraintBasedForecast FAILURE"); + return; + } +} + +void Instance::HandleCancelRequest(HandlerContext & ctx, const Commands::CancelRequest::DecodableType & commandData) +{ + Status status; + + status = mDelegate.CancelRequest(); + ctx.mCommandHandler.AddStatus(ctx.mRequestPath, status); + if (status != Status::Success) + { + ChipLogError(Zcl, "DEM: CancelRequest FAILURE"); return; } } diff --git a/src/app/clusters/device-energy-management-server/device-energy-management-server.h b/src/app/clusters/device-energy-management-server/device-energy-management-server.h index 7ab6a8aa60f306..3620379d4ed8e2 100644 --- a/src/app/clusters/device-energy-management-server/device-energy-management-server.h +++ b/src/app/clusters/device-energy-management-server/device-energy-management-server.h @@ -52,7 +52,7 @@ class Delegate * @param duration The duration that the ESA SHALL maintain the requested power for. * @return Success if the adjustment is accepted; otherwise the command SHALL be rejected with appropriate error. */ - virtual Status PowerAdjustRequest(const int64_t power, const uint32_t duration) = 0; + virtual Status PowerAdjustRequest(const int64_t power, const uint32_t duration, AdjustmentCauseEnum cause) = 0; /** * @brief Delegate SHALL make the ESA end the active power adjustment session & return to normal (or idle) power levels. @@ -76,7 +76,7 @@ class Delegate * @return Success if the StartTime in the Forecast is updated, otherwise the command SHALL be rejected with appropriate * IM_Status. */ - virtual Status StartTimeAdjustRequest(const uint32_t requestedStartTime) = 0; + virtual Status StartTimeAdjustRequest(const uint32_t requestedStartTime, AdjustmentCauseEnum cause) = 0; /** * @brief Delegate handler for PauseRequest command @@ -91,7 +91,7 @@ class Delegate * @param duration Duration that the ESA SHALL be paused for. * @return Success if the ESA is paused, otherwise returns other IM_Status. */ - virtual Status PauseRequest(const uint32_t duration) = 0; + virtual Status PauseRequest(const uint32_t duration, AdjustmentCauseEnum cause) = 0; /** * @brief Delegate handler for ResumeRequest command @@ -119,7 +119,8 @@ class Delegate * SHALL be rejected returning other IM_Status. */ virtual Status ModifyForecastRequest(const uint32_t forecastId, - const DataModel::DecodableList & slotAdjustments) = 0; + const DataModel::DecodableList & slotAdjustments, + AdjustmentCauseEnum cause) = 0; /** * @brief Delegate handler for RequestConstraintBasedForecast @@ -132,8 +133,27 @@ class Delegate * @param constraints Sequence of turn up/down power requests that the ESA is being asked to constrain its operation within. * @return Success if successful, otherwise the command SHALL be rejected returning other IM_Status. */ - virtual Status - RequestConstraintBasedForecast(const DataModel::DecodableList & constraints) = 0; + virtual Status RequestConstraintBasedForecast(const DataModel::DecodableList & constraints, + AdjustmentCauseEnum cause) = 0; + + /** + * @brief Delegate handler for CancelRequest + * + * The ESA SHALL attempt to cancel the effects of any previous adjustment request commands, and re-evaluate its + * forecast for intended operation ignoring those previous requests. + * + * If the ESA ForecastStruct ForecastUpdateReason was already `Internal Optimization`, then the command SHALL + * be rejected with FAILURE. + * + * If the command is accepted, the ESA SHALL update its ESAState if required, and the command status returned + * SHALL be SUCCESS. + * + * The ESA SHALL update its Forecast attribute to match its new intended operation, and update the + * ForecastStruct.ForecastUpdateReason to `Internal Optimization` + * + * @return Success if successful, otherwise the command SHALL be rejected returning other IM_Status. + */ + virtual Status CancelRequest() = 0; // ------------------------------------------------------------------ // Get attribute methods @@ -144,6 +164,7 @@ class Delegate virtual int64_t GetAbsMaxPower() = 0; virtual PowerAdjustmentCapability::TypeInfo::Type GetPowerAdjustmentCapability() = 0; virtual DataModel::Nullable GetForecast() = 0; + virtual OptOutStateEnum GetOptOutState() = 0; // ------------------------------------------------------------------ // Set attribute methods @@ -159,18 +180,12 @@ class Delegate EndpointId mEndpointId = 0; }; -enum class OptionalCommands : uint32_t -{ - kSupportsModifyForecastRequest = 0x1, - kSupportsRequestConstraintBasedForecast = 0x2 -}; - class Instance : public AttributeAccessInterface, public CommandHandlerInterface { public: - Instance(EndpointId aEndpointId, Delegate & aDelegate, Feature aFeature, OptionalCommands aOptionalCmds) : + Instance(EndpointId aEndpointId, Delegate & aDelegate, Feature aFeature) : AttributeAccessInterface(MakeOptional(aEndpointId), Id), CommandHandlerInterface(MakeOptional(aEndpointId), Id), - mDelegate(aDelegate), mFeature(aFeature), mOptionalCmds(aOptionalCmds) + mDelegate(aDelegate), mFeature(aFeature) { /* set the base class delegates endpointId */ mDelegate.SetEndpointId(aEndpointId); @@ -182,12 +197,10 @@ class Instance : public AttributeAccessInterface, public CommandHandlerInterface void Shutdown(); bool HasFeature(Feature aFeature) const; - bool SupportsOptCmd(OptionalCommands aOptionalCmds) const; private: Delegate & mDelegate; BitMask mFeature; - BitMask mOptionalCmds; // AttributeAccessInterface CHIP_ERROR Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) override; @@ -197,6 +210,7 @@ class Instance : public AttributeAccessInterface, public CommandHandlerInterface void InvokeCommand(HandlerContext & handlerContext) override; CHIP_ERROR EnumerateAcceptedCommands(const ConcreteClusterPath & cluster, CommandIdCallback callback, void * context) override; + Status CheckOptOutAllowsRequest(AdjustmentCauseEnum adjustmentCause); void HandlePowerAdjustRequest(HandlerContext & ctx, const Commands::PowerAdjustRequest::DecodableType & commandData); void HandleCancelPowerAdjustRequest(HandlerContext & ctx, const Commands::CancelPowerAdjustRequest::DecodableType & commandData); @@ -206,6 +220,7 @@ class Instance : public AttributeAccessInterface, public CommandHandlerInterface void HandleModifyForecastRequest(HandlerContext & ctx, const Commands::ModifyForecastRequest::DecodableType & commandData); void HandleRequestConstraintBasedForecast(HandlerContext & ctx, const Commands::RequestConstraintBasedForecast::DecodableType & commandData); + void HandleCancelRequest(HandlerContext & ctx, const Commands::CancelRequest::DecodableType & commandData); }; } // namespace DeviceEnergyManagement diff --git a/src/app/zap-templates/zcl/data-model/chip/device-energy-management-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/device-energy-management-cluster.xml index 1d98820d274442..01aef8e7bc06ae 100644 --- a/src/app/zap-templates/zcl/data-model/chip/device-energy-management-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/device-energy-management-cluster.xml @@ -18,11 +18,15 @@ limitations under the License. - - - - + + + + + + + + Device Energy Management Energy Management @@ -31,53 +35,61 @@ limitations under the License. true true This cluster allows a client to manage the power draw of a device. An example of such a client could be an Energy Management System (EMS) which controls an Energy Smart Appliance (ESA). - - + - ESAType - ESACanGenerate - ESAState + ESAType + ESACanGenerate + ESAState AbsMinPower AbsMaxPower - PowerAdjustmentCapability + PowerAdjustmentCapability Forecast - + OptOutState + + Allows a client to request an adjustment in the power consumption of an ESA for a specified duration. - Allows a client to request an adjustment in the power consumption of an ESA for a specified duration. + - + Allows a client to cancel an ongoing PowerAdjustmentRequest operation. - - + Allows a client to adjust the start time of a Forecast sequence that has not yet started operation (i.e. where the current Forecast StartTime is in the future). + + - - + Allows a client to temporarily pause an operation and reduce the ESAs energy demand. + + - + Allows a client to cancel the PauseRequest command and enable earlier resumption of operation. - - - + Allows a client to modify a Forecast within the limits allowed by the ESA. + + + - - + Allows a client to ask the ESA to recompute its Forecast based on power and time constraints. + + + + + Allows a client to request cancellation of a previous adjustment request in a StartTimeAdjustRequest, ModifyForecastRequest or RequestConstraintBasedForecast command PowerAdjustStart PowerAdjustEnd - + @@ -86,6 +98,7 @@ limitations under the License. Resumed + @@ -95,6 +108,7 @@ limitations under the License. + @@ -113,47 +127,75 @@ limitations under the License. + - - - + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - + + + + + - - - + + + + - - + + - + - + + + @@ -161,26 +203,28 @@ limitations under the License. - - - + + + - + + + @@ -189,4 +233,5 @@ limitations under the License. + diff --git a/src/app/zap-templates/zcl/zcl-with-test-extensions.json b/src/app/zap-templates/zcl/zcl-with-test-extensions.json index b071fd42c77cb8..7cf25d5e4c4795 100644 --- a/src/app/zap-templates/zcl/zcl-with-test-extensions.json +++ b/src/app/zap-templates/zcl/zcl-with-test-extensions.json @@ -186,6 +186,7 @@ "AbsMaxPower", "PowerAdjustmentCapability", "Forecast", + "OptOutState", "FeatureMap" ], "Energy EVSE": [ diff --git a/src/app/zap-templates/zcl/zcl.json b/src/app/zap-templates/zcl/zcl.json index c645c66e91fc5c..addb14b89f25ba 100644 --- a/src/app/zap-templates/zcl/zcl.json +++ b/src/app/zap-templates/zcl/zcl.json @@ -184,6 +184,7 @@ "AbsMaxPower", "PowerAdjustmentCapability", "Forecast", + "OptOutState", "FeatureMap" ], "Energy EVSE": [ diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter index 0a2bc772a5bbf9..ea24f74daa5e4c 100644 --- a/src/controller/data_model/controller-clusters.matter +++ b/src/controller/data_model/controller-clusters.matter @@ -4421,13 +4421,19 @@ provisional cluster DemandResponseLoadControl = 150 { /** This cluster allows a client to manage the power draw of a device. An example of such a client could be an Energy Management System (EMS) which controls an Energy Smart Appliance (ESA). */ provisional cluster DeviceEnergyManagement = 152 { - revision 2; + revision 3; + + enum AdjustmentCauseEnum : enum8 { + kLocalOptimization = 0; + kGridOptimization = 1; + } enum CauseEnum : enum8 { kNormalCompletion = 0; kOffline = 1; kFault = 2; kUserOptOut = 3; + kCancelled = 4; } enum CostTypeEnum : enum8 { @@ -4441,9 +4447,8 @@ provisional cluster DeviceEnergyManagement = 152 { kOffline = 0; kOnline = 1; kFault = 2; - kUserOptOut = 3; - kPowerAdjustActive = 4; - kPaused = 5; + kPowerAdjustActive = 3; + kPaused = 4; } enum ESATypeEnum : enum8 { @@ -4464,11 +4469,27 @@ provisional cluster DeviceEnergyManagement = 152 { kOther = 255; } + enum ForecastUpdateReasonEnum : enum8 { + kInternalOptimization = 0; + kLocalOptimization = 1; + kGridOptimization = 2; + } + + enum OptOutStateEnum : enum8 { + kNoOptOut = 0; + kLocalOptOut = 1; + kGridOptOut = 2; + kOptOut = 3; + } + bitmap Feature : bitmap32 { kPowerAdjustment = 0x1; kPowerForecastReporting = 0x2; kStateForecastReporting = 0x4; - kForecastAdjustment = 0x8; + kStartTimeAdjustment = 0x8; + kPausable = 0x10; + kForecastAdjustment = 0x20; + kConstraintBasedAdjustment = 0x40; } struct CostStruct { @@ -4484,9 +4505,9 @@ provisional cluster DeviceEnergyManagement = 152 { elapsed_s defaultDuration = 2; elapsed_s elapsedSlotTime = 3; elapsed_s remainingSlotTime = 4; - boolean slotIsPauseable = 5; - elapsed_s minPauseDuration = 6; - elapsed_s maxPauseDuration = 7; + optional boolean slotIsPauseable = 5; + optional elapsed_s minPauseDuration = 6; + optional elapsed_s maxPauseDuration = 7; optional int16u manufacturerESAState = 8; optional power_mw nominalPower = 9; optional power_mw minPower = 10; @@ -4508,6 +4529,7 @@ provisional cluster DeviceEnergyManagement = 152 { optional epoch_s latestEndTime = 5; boolean isPauseable = 6; SlotStruct slots[] = 7; + ForecastUpdateReasonEnum forecastUpdateReason = 8; } struct ConstraintsStruct { @@ -4544,6 +4566,7 @@ provisional cluster DeviceEnergyManagement = 152 { } info event Resumed = 3 { + CauseEnum cause = 0; } readonly attribute ESATypeEnum ESAType = 0; @@ -4553,6 +4576,7 @@ provisional cluster DeviceEnergyManagement = 152 { readonly attribute power_mw absMaxPower = 4; readonly attribute optional nullable PowerAdjustStruct powerAdjustmentCapability[] = 5; readonly attribute optional nullable ForecastStruct forecast = 6; + readonly attribute optional OptOutStateEnum optOutState = 7; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -4563,23 +4587,28 @@ provisional cluster DeviceEnergyManagement = 152 { request struct PowerAdjustRequestRequest { power_mw power = 0; elapsed_s duration = 1; + AdjustmentCauseEnum cause = 2; } request struct StartTimeAdjustRequestRequest { epoch_s requestedStartTime = 0; + AdjustmentCauseEnum cause = 1; } request struct PauseRequestRequest { elapsed_s duration = 0; + AdjustmentCauseEnum cause = 1; } request struct ModifyForecastRequestRequest { int32u forecastId = 0; SlotAdjustmentStruct slotAdjustments[] = 1; + AdjustmentCauseEnum cause = 2; } request struct RequestConstraintBasedForecastRequest { ConstraintsStruct constraints[] = 0; + AdjustmentCauseEnum cause = 1; } /** Allows a client to request an adjustment in the power consumption of an ESA for a specified duration. */ @@ -4596,6 +4625,8 @@ provisional cluster DeviceEnergyManagement = 152 { command ModifyForecastRequest(ModifyForecastRequestRequest): DefaultSuccess = 5; /** Allows a client to ask the ESA to recompute its Forecast based on power and time constraints. */ command RequestConstraintBasedForecast(RequestConstraintBasedForecastRequest): DefaultSuccess = 6; + /** Allows a client to request cancellation of a previous adjustment request in a StartTimeAdjustRequest, ModifyForecastRequest or RequestConstraintBasedForecast command */ + command CancelRequest(): DefaultSuccess = 7; } /** Electric Vehicle Supply Equipment (EVSE) is equipment used to charge an Electric Vehicle (EV) or Plug-In Hybrid Electric Vehicle. This cluster provides an interface to the functionality of Electric Vehicle Supply Equipment (EVSE) management. */ diff --git a/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java b/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java index 0bbc57d9698c34..1e3f65f09fec06 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java @@ -29463,6 +29463,7 @@ public static class DeviceEnergyManagementCluster extends BaseChipCluster { private static final long ABS_MAX_POWER_ATTRIBUTE_ID = 4L; private static final long POWER_ADJUSTMENT_CAPABILITY_ATTRIBUTE_ID = 5L; private static final long FORECAST_ATTRIBUTE_ID = 6L; + private static final long OPT_OUT_STATE_ATTRIBUTE_ID = 7L; private static final long GENERATED_COMMAND_LIST_ATTRIBUTE_ID = 65528L; private static final long ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID = 65529L; private static final long EVENT_LIST_ATTRIBUTE_ID = 65530L; @@ -29480,11 +29481,11 @@ public long initWithDevice(long devicePtr, int endpointId) { return 0L; } - public void powerAdjustRequest(DefaultClusterCallback callback, Long power, Long duration) { - powerAdjustRequest(callback, power, duration, 0); + public void powerAdjustRequest(DefaultClusterCallback callback, Long power, Long duration, Integer cause) { + powerAdjustRequest(callback, power, duration, cause, 0); } - public void powerAdjustRequest(DefaultClusterCallback callback, Long power, Long duration, int timedInvokeTimeoutMs) { + public void powerAdjustRequest(DefaultClusterCallback callback, Long power, Long duration, Integer cause, int timedInvokeTimeoutMs) { final long commandId = 0L; ArrayList elements = new ArrayList<>(); @@ -29496,6 +29497,10 @@ public void powerAdjustRequest(DefaultClusterCallback callback, Long power, Long BaseTLVType durationtlvValue = new UIntType(duration); elements.add(new StructElement(durationFieldID, durationtlvValue)); + final long causeFieldID = 2L; + BaseTLVType causetlvValue = new UIntType(cause); + elements.add(new StructElement(causeFieldID, causetlvValue)); + StructType value = new StructType(elements); invoke(new InvokeCallbackImpl(callback) { @Override @@ -29520,11 +29525,11 @@ public void onResponse(StructType invokeStructValue) { }}, commandId, value, timedInvokeTimeoutMs); } - public void startTimeAdjustRequest(DefaultClusterCallback callback, Long requestedStartTime) { - startTimeAdjustRequest(callback, requestedStartTime, 0); + public void startTimeAdjustRequest(DefaultClusterCallback callback, Long requestedStartTime, Integer cause) { + startTimeAdjustRequest(callback, requestedStartTime, cause, 0); } - public void startTimeAdjustRequest(DefaultClusterCallback callback, Long requestedStartTime, int timedInvokeTimeoutMs) { + public void startTimeAdjustRequest(DefaultClusterCallback callback, Long requestedStartTime, Integer cause, int timedInvokeTimeoutMs) { final long commandId = 2L; ArrayList elements = new ArrayList<>(); @@ -29532,6 +29537,10 @@ public void startTimeAdjustRequest(DefaultClusterCallback callback, Long request BaseTLVType requestedStartTimetlvValue = new UIntType(requestedStartTime); elements.add(new StructElement(requestedStartTimeFieldID, requestedStartTimetlvValue)); + final long causeFieldID = 1L; + BaseTLVType causetlvValue = new UIntType(cause); + elements.add(new StructElement(causeFieldID, causetlvValue)); + StructType value = new StructType(elements); invoke(new InvokeCallbackImpl(callback) { @Override @@ -29540,11 +29549,11 @@ public void onResponse(StructType invokeStructValue) { }}, commandId, value, timedInvokeTimeoutMs); } - public void pauseRequest(DefaultClusterCallback callback, Long duration) { - pauseRequest(callback, duration, 0); + public void pauseRequest(DefaultClusterCallback callback, Long duration, Integer cause) { + pauseRequest(callback, duration, cause, 0); } - public void pauseRequest(DefaultClusterCallback callback, Long duration, int timedInvokeTimeoutMs) { + public void pauseRequest(DefaultClusterCallback callback, Long duration, Integer cause, int timedInvokeTimeoutMs) { final long commandId = 3L; ArrayList elements = new ArrayList<>(); @@ -29552,6 +29561,10 @@ public void pauseRequest(DefaultClusterCallback callback, Long duration, int tim BaseTLVType durationtlvValue = new UIntType(duration); elements.add(new StructElement(durationFieldID, durationtlvValue)); + final long causeFieldID = 1L; + BaseTLVType causetlvValue = new UIntType(cause); + elements.add(new StructElement(causeFieldID, causetlvValue)); + StructType value = new StructType(elements); invoke(new InvokeCallbackImpl(callback) { @Override @@ -29576,11 +29589,11 @@ public void onResponse(StructType invokeStructValue) { }}, commandId, value, timedInvokeTimeoutMs); } - public void modifyForecastRequest(DefaultClusterCallback callback, Long forecastId, ArrayList slotAdjustments) { - modifyForecastRequest(callback, forecastId, slotAdjustments, 0); + public void modifyForecastRequest(DefaultClusterCallback callback, Long forecastId, ArrayList slotAdjustments, Integer cause) { + modifyForecastRequest(callback, forecastId, slotAdjustments, cause, 0); } - public void modifyForecastRequest(DefaultClusterCallback callback, Long forecastId, ArrayList slotAdjustments, int timedInvokeTimeoutMs) { + public void modifyForecastRequest(DefaultClusterCallback callback, Long forecastId, ArrayList slotAdjustments, Integer cause, int timedInvokeTimeoutMs) { final long commandId = 5L; ArrayList elements = new ArrayList<>(); @@ -29592,6 +29605,10 @@ public void modifyForecastRequest(DefaultClusterCallback callback, Long forecast BaseTLVType slotAdjustmentstlvValue = ArrayType.generateArrayType(slotAdjustments, (elementslotAdjustments) -> elementslotAdjustments.encodeTlv()); elements.add(new StructElement(slotAdjustmentsFieldID, slotAdjustmentstlvValue)); + final long causeFieldID = 2L; + BaseTLVType causetlvValue = new UIntType(cause); + elements.add(new StructElement(causeFieldID, causetlvValue)); + StructType value = new StructType(elements); invoke(new InvokeCallbackImpl(callback) { @Override @@ -29600,11 +29617,11 @@ public void onResponse(StructType invokeStructValue) { }}, commandId, value, timedInvokeTimeoutMs); } - public void requestConstraintBasedForecast(DefaultClusterCallback callback, ArrayList constraints) { - requestConstraintBasedForecast(callback, constraints, 0); + public void requestConstraintBasedForecast(DefaultClusterCallback callback, ArrayList constraints, Integer cause) { + requestConstraintBasedForecast(callback, constraints, cause, 0); } - public void requestConstraintBasedForecast(DefaultClusterCallback callback, ArrayList constraints, int timedInvokeTimeoutMs) { + public void requestConstraintBasedForecast(DefaultClusterCallback callback, ArrayList constraints, Integer cause, int timedInvokeTimeoutMs) { final long commandId = 6L; ArrayList elements = new ArrayList<>(); @@ -29612,6 +29629,26 @@ public void requestConstraintBasedForecast(DefaultClusterCallback callback, Arra BaseTLVType constraintstlvValue = ArrayType.generateArrayType(constraints, (elementconstraints) -> elementconstraints.encodeTlv()); elements.add(new StructElement(constraintsFieldID, constraintstlvValue)); + final long causeFieldID = 1L; + BaseTLVType causetlvValue = new UIntType(cause); + elements.add(new StructElement(causeFieldID, causetlvValue)); + + StructType value = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + callback.onSuccess(); + }}, commandId, value, timedInvokeTimeoutMs); + } + + public void cancelRequest(DefaultClusterCallback callback) { + cancelRequest(callback, 0); + } + + public void cancelRequest(DefaultClusterCallback callback, int timedInvokeTimeoutMs) { + final long commandId = 7L; + + ArrayList elements = new ArrayList<>(); StructType value = new StructType(elements); invoke(new InvokeCallbackImpl(callback) { @Override @@ -29819,6 +29856,31 @@ public void onSuccess(byte[] tlv) { }, FORECAST_ATTRIBUTE_ID, minInterval, maxInterval); } + public void readOptOutStateAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, OPT_OUT_STATE_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, OPT_OUT_STATE_ATTRIBUTE_ID, true); + } + + public void subscribeOptOutStateAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, OPT_OUT_STATE_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, OPT_OUT_STATE_ATTRIBUTE_ID, minInterval, maxInterval); + } + public void readGeneratedCommandListAttribute( GeneratedCommandListAttributeCallback callback) { ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GENERATED_COMMAND_LIST_ATTRIBUTE_ID); diff --git a/src/controller/java/generated/java/chip/devicecontroller/ChipEventStructs.java b/src/controller/java/generated/java/chip/devicecontroller/ChipEventStructs.java index 9f5c25260c131b..c1d134f2735191 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ChipEventStructs.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ChipEventStructs.java @@ -3921,13 +3921,18 @@ public String toString() { } } public static class DeviceEnergyManagementClusterResumedEvent { + public Integer cause; + private static final long CAUSE_ID = 0L; public DeviceEnergyManagementClusterResumedEvent( + Integer cause ) { + this.cause = cause; } public StructType encodeTlv() { ArrayList values = new ArrayList<>(); + values.add(new StructElement(CAUSE_ID, new UIntType(cause))); return new StructType(values); } @@ -3936,7 +3941,17 @@ public static DeviceEnergyManagementClusterResumedEvent decodeTlv(BaseTLVType tl if (tlvValue == null || tlvValue.type() != TLVType.Struct) { return null; } + Integer cause = null; + for (StructElement element: ((StructType)tlvValue).value()) { + if (element.contextTagNum() == CAUSE_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + cause = castingValue.value(Integer.class); + } + } + } return new DeviceEnergyManagementClusterResumedEvent( + cause ); } @@ -3944,6 +3959,9 @@ public static DeviceEnergyManagementClusterResumedEvent decodeTlv(BaseTLVType tl public String toString() { StringBuilder output = new StringBuilder(); output.append("DeviceEnergyManagementClusterResumedEvent {\n"); + output.append("\tcause: "); + output.append(cause); + output.append("\n"); output.append("}\n"); return output.toString(); } diff --git a/src/controller/java/generated/java/chip/devicecontroller/ChipStructs.java b/src/controller/java/generated/java/chip/devicecontroller/ChipStructs.java index c676d026aa2597..6aa20f9a2f796c 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ChipStructs.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ChipStructs.java @@ -6556,9 +6556,9 @@ public static class DeviceEnergyManagementClusterSlotStruct { public Long defaultDuration; public Long elapsedSlotTime; public Long remainingSlotTime; - public Boolean slotIsPauseable; - public Long minPauseDuration; - public Long maxPauseDuration; + public Optional slotIsPauseable; + public Optional minPauseDuration; + public Optional maxPauseDuration; public Optional manufacturerESAState; public Optional nominalPower; public Optional minPower; @@ -6594,9 +6594,9 @@ public DeviceEnergyManagementClusterSlotStruct( Long defaultDuration, Long elapsedSlotTime, Long remainingSlotTime, - Boolean slotIsPauseable, - Long minPauseDuration, - Long maxPauseDuration, + Optional slotIsPauseable, + Optional minPauseDuration, + Optional maxPauseDuration, Optional manufacturerESAState, Optional nominalPower, Optional minPower, @@ -6635,9 +6635,9 @@ public StructType encodeTlv() { values.add(new StructElement(DEFAULT_DURATION_ID, new UIntType(defaultDuration))); values.add(new StructElement(ELAPSED_SLOT_TIME_ID, new UIntType(elapsedSlotTime))); values.add(new StructElement(REMAINING_SLOT_TIME_ID, new UIntType(remainingSlotTime))); - values.add(new StructElement(SLOT_IS_PAUSEABLE_ID, new BooleanType(slotIsPauseable))); - values.add(new StructElement(MIN_PAUSE_DURATION_ID, new UIntType(minPauseDuration))); - values.add(new StructElement(MAX_PAUSE_DURATION_ID, new UIntType(maxPauseDuration))); + values.add(new StructElement(SLOT_IS_PAUSEABLE_ID, slotIsPauseable.map((nonOptionalslotIsPauseable) -> new BooleanType(nonOptionalslotIsPauseable)).orElse(new EmptyType()))); + values.add(new StructElement(MIN_PAUSE_DURATION_ID, minPauseDuration.map((nonOptionalminPauseDuration) -> new UIntType(nonOptionalminPauseDuration)).orElse(new EmptyType()))); + values.add(new StructElement(MAX_PAUSE_DURATION_ID, maxPauseDuration.map((nonOptionalmaxPauseDuration) -> new UIntType(nonOptionalmaxPauseDuration)).orElse(new EmptyType()))); values.add(new StructElement(MANUFACTURER_E_S_A_STATE_ID, manufacturerESAState.map((nonOptionalmanufacturerESAState) -> new UIntType(nonOptionalmanufacturerESAState)).orElse(new EmptyType()))); values.add(new StructElement(NOMINAL_POWER_ID, nominalPower.map((nonOptionalnominalPower) -> new IntType(nonOptionalnominalPower)).orElse(new EmptyType()))); values.add(new StructElement(MIN_POWER_ID, minPower.map((nonOptionalminPower) -> new IntType(nonOptionalminPower)).orElse(new EmptyType()))); @@ -6661,9 +6661,9 @@ public static DeviceEnergyManagementClusterSlotStruct decodeTlv(BaseTLVType tlvV Long defaultDuration = null; Long elapsedSlotTime = null; Long remainingSlotTime = null; - Boolean slotIsPauseable = null; - Long minPauseDuration = null; - Long maxPauseDuration = null; + Optional slotIsPauseable = Optional.empty(); + Optional minPauseDuration = Optional.empty(); + Optional maxPauseDuration = Optional.empty(); Optional manufacturerESAState = Optional.empty(); Optional nominalPower = Optional.empty(); Optional minPower = Optional.empty(); @@ -6703,17 +6703,17 @@ public static DeviceEnergyManagementClusterSlotStruct decodeTlv(BaseTLVType tlvV } else if (element.contextTagNum() == SLOT_IS_PAUSEABLE_ID) { if (element.value(BaseTLVType.class).type() == TLVType.Boolean) { BooleanType castingValue = element.value(BooleanType.class); - slotIsPauseable = castingValue.value(Boolean.class); + slotIsPauseable = Optional.of(castingValue.value(Boolean.class)); } } else if (element.contextTagNum() == MIN_PAUSE_DURATION_ID) { if (element.value(BaseTLVType.class).type() == TLVType.UInt) { UIntType castingValue = element.value(UIntType.class); - minPauseDuration = castingValue.value(Long.class); + minPauseDuration = Optional.of(castingValue.value(Long.class)); } } else if (element.contextTagNum() == MAX_PAUSE_DURATION_ID) { if (element.value(BaseTLVType.class).type() == TLVType.UInt) { UIntType castingValue = element.value(UIntType.class); - maxPauseDuration = castingValue.value(Long.class); + maxPauseDuration = Optional.of(castingValue.value(Long.class)); } } else if (element.contextTagNum() == MANUFACTURER_E_S_A_STATE_ID) { if (element.value(BaseTLVType.class).type() == TLVType.UInt) { @@ -6860,6 +6860,7 @@ public static class DeviceEnergyManagementClusterForecastStruct { public Optional latestEndTime; public Boolean isPauseable; public ArrayList slots; + public Integer forecastUpdateReason; private static final long FORECAST_ID_ID = 0L; private static final long ACTIVE_SLOT_NUMBER_ID = 1L; private static final long START_TIME_ID = 2L; @@ -6868,6 +6869,7 @@ public static class DeviceEnergyManagementClusterForecastStruct { private static final long LATEST_END_TIME_ID = 5L; private static final long IS_PAUSEABLE_ID = 6L; private static final long SLOTS_ID = 7L; + private static final long FORECAST_UPDATE_REASON_ID = 8L; public DeviceEnergyManagementClusterForecastStruct( Integer forecastId, @@ -6877,7 +6879,8 @@ public DeviceEnergyManagementClusterForecastStruct( @Nullable Optional earliestStartTime, Optional latestEndTime, Boolean isPauseable, - ArrayList slots + ArrayList slots, + Integer forecastUpdateReason ) { this.forecastId = forecastId; this.activeSlotNumber = activeSlotNumber; @@ -6887,6 +6890,7 @@ public DeviceEnergyManagementClusterForecastStruct( this.latestEndTime = latestEndTime; this.isPauseable = isPauseable; this.slots = slots; + this.forecastUpdateReason = forecastUpdateReason; } public StructType encodeTlv() { @@ -6899,6 +6903,7 @@ public StructType encodeTlv() { values.add(new StructElement(LATEST_END_TIME_ID, latestEndTime.map((nonOptionallatestEndTime) -> new UIntType(nonOptionallatestEndTime)).orElse(new EmptyType()))); values.add(new StructElement(IS_PAUSEABLE_ID, new BooleanType(isPauseable))); values.add(new StructElement(SLOTS_ID, ArrayType.generateArrayType(slots, (elementslots) -> elementslots.encodeTlv()))); + values.add(new StructElement(FORECAST_UPDATE_REASON_ID, new UIntType(forecastUpdateReason))); return new StructType(values); } @@ -6915,6 +6920,7 @@ public static DeviceEnergyManagementClusterForecastStruct decodeTlv(BaseTLVType Optional latestEndTime = Optional.empty(); Boolean isPauseable = null; ArrayList slots = null; + Integer forecastUpdateReason = null; for (StructElement element: ((StructType)tlvValue).value()) { if (element.contextTagNum() == FORECAST_ID_ID) { if (element.value(BaseTLVType.class).type() == TLVType.UInt) { @@ -6956,6 +6962,11 @@ public static DeviceEnergyManagementClusterForecastStruct decodeTlv(BaseTLVType ArrayType castingValue = element.value(ArrayType.class); slots = castingValue.map((elementcastingValue) -> ChipStructs.DeviceEnergyManagementClusterSlotStruct.decodeTlv(elementcastingValue)); } + } else if (element.contextTagNum() == FORECAST_UPDATE_REASON_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + forecastUpdateReason = castingValue.value(Integer.class); + } } } return new DeviceEnergyManagementClusterForecastStruct( @@ -6966,7 +6977,8 @@ public static DeviceEnergyManagementClusterForecastStruct decodeTlv(BaseTLVType earliestStartTime, latestEndTime, isPauseable, - slots + slots, + forecastUpdateReason ); } @@ -6998,6 +7010,9 @@ public String toString() { output.append("\tslots: "); output.append(slots); output.append("\n"); + output.append("\tforecastUpdateReason: "); + output.append(forecastUpdateReason); + output.append("\n"); output.append("}\n"); return output.toString(); } diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java index cb21688a2ec313..608a378fc281c1 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java @@ -9359,6 +9359,7 @@ public enum Attribute { AbsMaxPower(4L), PowerAdjustmentCapability(5L), Forecast(6L), + OptOutState(7L), GeneratedCommandList(65528L), AcceptedCommandList(65529L), EventList(65530L), @@ -9415,7 +9416,8 @@ public enum Command { PauseRequest(3L), ResumeRequest(4L), ModifyForecastRequest(5L), - RequestConstraintBasedForecast(6L),; + RequestConstraintBasedForecast(6L), + CancelRequest(7L),; private final long id; Command(long id) { this.id = id; @@ -9433,7 +9435,7 @@ public static Command value(long id) throws NoSuchFieldError { } throw new NoSuchFieldError(); } - }public enum PowerAdjustRequestCommandField {Power(0),Duration(1),; + }public enum PowerAdjustRequestCommandField {Power(0),Duration(1),Cause(2),; private final int id; PowerAdjustRequestCommandField(int id) { this.id = id; @@ -9450,7 +9452,7 @@ public static PowerAdjustRequestCommandField value(int id) throws NoSuchFieldErr } throw new NoSuchFieldError(); } - }public enum StartTimeAdjustRequestCommandField {RequestedStartTime(0),; + }public enum StartTimeAdjustRequestCommandField {RequestedStartTime(0),Cause(1),; private final int id; StartTimeAdjustRequestCommandField(int id) { this.id = id; @@ -9467,7 +9469,7 @@ public static StartTimeAdjustRequestCommandField value(int id) throws NoSuchFiel } throw new NoSuchFieldError(); } - }public enum PauseRequestCommandField {Duration(0),; + }public enum PauseRequestCommandField {Duration(0),Cause(1),; private final int id; PauseRequestCommandField(int id) { this.id = id; @@ -9484,7 +9486,7 @@ public static PauseRequestCommandField value(int id) throws NoSuchFieldError { } throw new NoSuchFieldError(); } - }public enum ModifyForecastRequestCommandField {ForecastId(0),SlotAdjustments(1),; + }public enum ModifyForecastRequestCommandField {ForecastId(0),SlotAdjustments(1),Cause(2),; private final int id; ModifyForecastRequestCommandField(int id) { this.id = id; @@ -9501,7 +9503,7 @@ public static ModifyForecastRequestCommandField value(int id) throws NoSuchField } throw new NoSuchFieldError(); } - }public enum RequestConstraintBasedForecastCommandField {Constraints(0),; + }public enum RequestConstraintBasedForecastCommandField {Constraints(0),Cause(1),; private final int id; RequestConstraintBasedForecastCommandField(int id) { this.id = id; diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java index a030b14c6b218b..342feb2ef08dc4 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java @@ -23346,6 +23346,9 @@ public Map> getCommandMap() { CommandParameterInfo deviceEnergyManagementpowerAdjustRequestdurationCommandParameterInfo = new CommandParameterInfo("duration", Long.class, Long.class); deviceEnergyManagementpowerAdjustRequestCommandParams.put("duration",deviceEnergyManagementpowerAdjustRequestdurationCommandParameterInfo); + + CommandParameterInfo deviceEnergyManagementpowerAdjustRequestcauseCommandParameterInfo = new CommandParameterInfo("cause", Integer.class, Integer.class); + deviceEnergyManagementpowerAdjustRequestCommandParams.put("cause",deviceEnergyManagementpowerAdjustRequestcauseCommandParameterInfo); InteractionInfo deviceEnergyManagementpowerAdjustRequestInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { ((ChipClusters.DeviceEnergyManagementCluster) cluster) @@ -23354,6 +23357,8 @@ public Map> getCommandMap() { commandArguments.get("power") , (Long) commandArguments.get("duration") + , (Integer) + commandArguments.get("cause") ); }, () -> new DelegatedDefaultClusterCallback(), @@ -23377,12 +23382,17 @@ public Map> getCommandMap() { CommandParameterInfo deviceEnergyManagementstartTimeAdjustRequestrequestedStartTimeCommandParameterInfo = new CommandParameterInfo("requestedStartTime", Long.class, Long.class); deviceEnergyManagementstartTimeAdjustRequestCommandParams.put("requestedStartTime",deviceEnergyManagementstartTimeAdjustRequestrequestedStartTimeCommandParameterInfo); + + CommandParameterInfo deviceEnergyManagementstartTimeAdjustRequestcauseCommandParameterInfo = new CommandParameterInfo("cause", Integer.class, Integer.class); + deviceEnergyManagementstartTimeAdjustRequestCommandParams.put("cause",deviceEnergyManagementstartTimeAdjustRequestcauseCommandParameterInfo); InteractionInfo deviceEnergyManagementstartTimeAdjustRequestInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { ((ChipClusters.DeviceEnergyManagementCluster) cluster) .startTimeAdjustRequest((DefaultClusterCallback) callback , (Long) commandArguments.get("requestedStartTime") + , (Integer) + commandArguments.get("cause") ); }, () -> new DelegatedDefaultClusterCallback(), @@ -23394,12 +23404,17 @@ public Map> getCommandMap() { CommandParameterInfo deviceEnergyManagementpauseRequestdurationCommandParameterInfo = new CommandParameterInfo("duration", Long.class, Long.class); deviceEnergyManagementpauseRequestCommandParams.put("duration",deviceEnergyManagementpauseRequestdurationCommandParameterInfo); + + CommandParameterInfo deviceEnergyManagementpauseRequestcauseCommandParameterInfo = new CommandParameterInfo("cause", Integer.class, Integer.class); + deviceEnergyManagementpauseRequestCommandParams.put("cause",deviceEnergyManagementpauseRequestcauseCommandParameterInfo); InteractionInfo deviceEnergyManagementpauseRequestInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { ((ChipClusters.DeviceEnergyManagementCluster) cluster) .pauseRequest((DefaultClusterCallback) callback , (Long) commandArguments.get("duration") + , (Integer) + commandArguments.get("cause") ); }, () -> new DelegatedDefaultClusterCallback(), @@ -23424,6 +23439,9 @@ public Map> getCommandMap() { CommandParameterInfo deviceEnergyManagementmodifyForecastRequestforecastIdCommandParameterInfo = new CommandParameterInfo("forecastId", Long.class, Long.class); deviceEnergyManagementmodifyForecastRequestCommandParams.put("forecastId",deviceEnergyManagementmodifyForecastRequestforecastIdCommandParameterInfo); + + CommandParameterInfo deviceEnergyManagementmodifyForecastRequestcauseCommandParameterInfo = new CommandParameterInfo("cause", Integer.class, Integer.class); + deviceEnergyManagementmodifyForecastRequestCommandParams.put("cause",deviceEnergyManagementmodifyForecastRequestcauseCommandParameterInfo); InteractionInfo deviceEnergyManagementmodifyForecastRequestInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { ((ChipClusters.DeviceEnergyManagementCluster) cluster) @@ -23432,6 +23450,8 @@ public Map> getCommandMap() { commandArguments.get("forecastId") , (ArrayList) commandArguments.get("slotAdjustments") + , (Integer) + commandArguments.get("cause") ); }, () -> new DelegatedDefaultClusterCallback(), @@ -23441,12 +23461,17 @@ public Map> getCommandMap() { Map deviceEnergyManagementrequestConstraintBasedForecastCommandParams = new LinkedHashMap(); + + CommandParameterInfo deviceEnergyManagementrequestConstraintBasedForecastcauseCommandParameterInfo = new CommandParameterInfo("cause", Integer.class, Integer.class); + deviceEnergyManagementrequestConstraintBasedForecastCommandParams.put("cause",deviceEnergyManagementrequestConstraintBasedForecastcauseCommandParameterInfo); InteractionInfo deviceEnergyManagementrequestConstraintBasedForecastInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { ((ChipClusters.DeviceEnergyManagementCluster) cluster) .requestConstraintBasedForecast((DefaultClusterCallback) callback , (ArrayList) commandArguments.get("constraints") + , (Integer) + commandArguments.get("cause") ); }, () -> new DelegatedDefaultClusterCallback(), @@ -23454,6 +23479,18 @@ public Map> getCommandMap() { ); deviceEnergyManagementClusterInteractionInfoMap.put("requestConstraintBasedForecast", deviceEnergyManagementrequestConstraintBasedForecastInteractionInfo); + Map deviceEnergyManagementcancelRequestCommandParams = new LinkedHashMap(); + InteractionInfo deviceEnergyManagementcancelRequestInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.DeviceEnergyManagementCluster) cluster) + .cancelRequest((DefaultClusterCallback) callback + ); + }, + () -> new DelegatedDefaultClusterCallback(), + deviceEnergyManagementcancelRequestCommandParams + ); + deviceEnergyManagementClusterInteractionInfoMap.put("cancelRequest", deviceEnergyManagementcancelRequestInteractionInfo); + commandMap.put("deviceEnergyManagement", deviceEnergyManagementClusterInteractionInfoMap); Map energyEvseClusterInteractionInfoMap = new LinkedHashMap<>(); diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java index 95880d5849ce0f..bbd205aaca8b22 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java @@ -9336,6 +9336,17 @@ private static Map readDeviceEnergyManagementInteractio readDeviceEnergyManagementPowerAdjustmentCapabilityCommandParams ); result.put("readPowerAdjustmentCapabilityAttribute", readDeviceEnergyManagementPowerAdjustmentCapabilityAttributeInteractionInfo); + Map readDeviceEnergyManagementOptOutStateCommandParams = new LinkedHashMap(); + InteractionInfo readDeviceEnergyManagementOptOutStateAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.DeviceEnergyManagementCluster) cluster).readOptOutStateAttribute( + (ChipClusters.IntegerAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readDeviceEnergyManagementOptOutStateCommandParams + ); + result.put("readOptOutStateAttribute", readDeviceEnergyManagementOptOutStateAttributeInteractionInfo); Map readDeviceEnergyManagementGeneratedCommandListCommandParams = new LinkedHashMap(); InteractionInfo readDeviceEnergyManagementGeneratedCommandListAttributeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DeviceEnergyManagementClusterResumedEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DeviceEnergyManagementClusterResumedEvent.kt new file mode 100644 index 00000000000000..5b4be5cfc2fd55 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DeviceEnergyManagementClusterResumedEvent.kt @@ -0,0 +1,52 @@ +/* + * + * Copyright (c) 2023 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. + */ +package chip.devicecontroller.cluster.eventstructs + +import chip.devicecontroller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class DeviceEnergyManagementClusterResumedEvent(val cause: UInt) { + override fun toString(): String = buildString { + append("DeviceEnergyManagementClusterResumedEvent {\n") + append("\tcause : $cause\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_CAUSE), cause) + endStructure() + } + } + + companion object { + private const val TAG_CAUSE = 0 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): DeviceEnergyManagementClusterResumedEvent { + tlvReader.enterStructure(tlvTag) + val cause = tlvReader.getUInt(ContextSpecificTag(TAG_CAUSE)) + + tlvReader.exitContainer() + + return DeviceEnergyManagementClusterResumedEvent(cause) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/files.gni b/src/controller/java/generated/java/chip/devicecontroller/cluster/files.gni index 57b30e5acdf821..dc97dce9da6268 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/files.gni +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/files.gni @@ -146,6 +146,7 @@ eventstructs_sources = [ "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BridgedDeviceBasicInformationClusterStartUpEvent.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DemandResponseLoadControlClusterLoadControlEventStatusChangeEvent.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DeviceEnergyManagementClusterPowerAdjustEndEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DeviceEnergyManagementClusterResumedEvent.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DishwasherAlarmClusterNotifyEvent.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterDoorLockAlarmEvent.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterDoorStateChangeEvent.kt", diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DeviceEnergyManagementClusterForecastStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DeviceEnergyManagementClusterForecastStruct.kt index 648d202043f9c5..17e45fa732ea47 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DeviceEnergyManagementClusterForecastStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DeviceEnergyManagementClusterForecastStruct.kt @@ -32,7 +32,8 @@ class DeviceEnergyManagementClusterForecastStruct( val earliestStartTime: Optional?, val latestEndTime: Optional, val isPauseable: Boolean, - val slots: List + val slots: List, + val forecastUpdateReason: UInt ) { override fun toString(): String = buildString { append("DeviceEnergyManagementClusterForecastStruct {\n") @@ -44,6 +45,7 @@ class DeviceEnergyManagementClusterForecastStruct( append("\tlatestEndTime : $latestEndTime\n") append("\tisPauseable : $isPauseable\n") append("\tslots : $slots\n") + append("\tforecastUpdateReason : $forecastUpdateReason\n") append("}\n") } @@ -76,6 +78,7 @@ class DeviceEnergyManagementClusterForecastStruct( item.toTlv(AnonymousTag, this) } endArray() + put(ContextSpecificTag(TAG_FORECAST_UPDATE_REASON), forecastUpdateReason) endStructure() } } @@ -89,6 +92,7 @@ class DeviceEnergyManagementClusterForecastStruct( private const val TAG_LATEST_END_TIME = 5 private const val TAG_IS_PAUSEABLE = 6 private const val TAG_SLOTS = 7 + private const val TAG_FORECAST_UPDATE_REASON = 8 fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): DeviceEnergyManagementClusterForecastStruct { tlvReader.enterStructure(tlvTag) @@ -128,6 +132,7 @@ class DeviceEnergyManagementClusterForecastStruct( } tlvReader.exitContainer() } + val forecastUpdateReason = tlvReader.getUInt(ContextSpecificTag(TAG_FORECAST_UPDATE_REASON)) tlvReader.exitContainer() @@ -139,7 +144,8 @@ class DeviceEnergyManagementClusterForecastStruct( earliestStartTime, latestEndTime, isPauseable, - slots + slots, + forecastUpdateReason ) } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DeviceEnergyManagementClusterSlotStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DeviceEnergyManagementClusterSlotStruct.kt index 736a81804244ce..18759432dc2ce4 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DeviceEnergyManagementClusterSlotStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DeviceEnergyManagementClusterSlotStruct.kt @@ -30,9 +30,9 @@ class DeviceEnergyManagementClusterSlotStruct( val defaultDuration: ULong, val elapsedSlotTime: ULong, val remainingSlotTime: ULong, - val slotIsPauseable: Boolean, - val minPauseDuration: ULong, - val maxPauseDuration: ULong, + val slotIsPauseable: Optional, + val minPauseDuration: Optional, + val maxPauseDuration: Optional, val manufacturerESAState: Optional, val nominalPower: Optional, val minPower: Optional, @@ -75,9 +75,18 @@ class DeviceEnergyManagementClusterSlotStruct( put(ContextSpecificTag(TAG_DEFAULT_DURATION), defaultDuration) put(ContextSpecificTag(TAG_ELAPSED_SLOT_TIME), elapsedSlotTime) put(ContextSpecificTag(TAG_REMAINING_SLOT_TIME), remainingSlotTime) - put(ContextSpecificTag(TAG_SLOT_IS_PAUSEABLE), slotIsPauseable) - put(ContextSpecificTag(TAG_MIN_PAUSE_DURATION), minPauseDuration) - put(ContextSpecificTag(TAG_MAX_PAUSE_DURATION), maxPauseDuration) + if (slotIsPauseable.isPresent) { + val optslotIsPauseable = slotIsPauseable.get() + put(ContextSpecificTag(TAG_SLOT_IS_PAUSEABLE), optslotIsPauseable) + } + if (minPauseDuration.isPresent) { + val optminPauseDuration = minPauseDuration.get() + put(ContextSpecificTag(TAG_MIN_PAUSE_DURATION), optminPauseDuration) + } + if (maxPauseDuration.isPresent) { + val optmaxPauseDuration = maxPauseDuration.get() + put(ContextSpecificTag(TAG_MAX_PAUSE_DURATION), optmaxPauseDuration) + } if (manufacturerESAState.isPresent) { val optmanufacturerESAState = manufacturerESAState.get() put(ContextSpecificTag(TAG_MANUFACTURER_E_S_A_STATE), optmanufacturerESAState) @@ -153,9 +162,24 @@ class DeviceEnergyManagementClusterSlotStruct( val defaultDuration = tlvReader.getULong(ContextSpecificTag(TAG_DEFAULT_DURATION)) val elapsedSlotTime = tlvReader.getULong(ContextSpecificTag(TAG_ELAPSED_SLOT_TIME)) val remainingSlotTime = tlvReader.getULong(ContextSpecificTag(TAG_REMAINING_SLOT_TIME)) - val slotIsPauseable = tlvReader.getBoolean(ContextSpecificTag(TAG_SLOT_IS_PAUSEABLE)) - val minPauseDuration = tlvReader.getULong(ContextSpecificTag(TAG_MIN_PAUSE_DURATION)) - val maxPauseDuration = tlvReader.getULong(ContextSpecificTag(TAG_MAX_PAUSE_DURATION)) + val slotIsPauseable = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_SLOT_IS_PAUSEABLE))) { + Optional.of(tlvReader.getBoolean(ContextSpecificTag(TAG_SLOT_IS_PAUSEABLE))) + } else { + Optional.empty() + } + val minPauseDuration = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_MIN_PAUSE_DURATION))) { + Optional.of(tlvReader.getULong(ContextSpecificTag(TAG_MIN_PAUSE_DURATION))) + } else { + Optional.empty() + } + val maxPauseDuration = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_MAX_PAUSE_DURATION))) { + Optional.of(tlvReader.getULong(ContextSpecificTag(TAG_MAX_PAUSE_DURATION))) + } else { + Optional.empty() + } val manufacturerESAState = if (tlvReader.isNextTag(ContextSpecificTag(TAG_MANUFACTURER_E_S_A_STATE))) { Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_MANUFACTURER_E_S_A_STATE))) diff --git a/src/controller/java/generated/java/matter/controller/cluster/clusters/DeviceEnergyManagementCluster.kt b/src/controller/java/generated/java/matter/controller/cluster/clusters/DeviceEnergyManagementCluster.kt index 8481bbf3ccf788..eb68ec47c75ee1 100644 --- a/src/controller/java/generated/java/matter/controller/cluster/clusters/DeviceEnergyManagementCluster.kt +++ b/src/controller/java/generated/java/matter/controller/cluster/clusters/DeviceEnergyManagementCluster.kt @@ -114,6 +114,7 @@ class DeviceEnergyManagementCluster( suspend fun powerAdjustRequest( power: Long, duration: UInt, + cause: UByte, timedInvokeTimeout: Duration? = null ) { val commandId: UInt = 0u @@ -126,6 +127,9 @@ class DeviceEnergyManagementCluster( val TAG_DURATION_REQ: Int = 1 tlvWriter.put(ContextSpecificTag(TAG_DURATION_REQ), duration) + + val TAG_CAUSE_REQ: Int = 2 + tlvWriter.put(ContextSpecificTag(TAG_CAUSE_REQ), cause) tlvWriter.endStructure() val request: InvokeRequest = @@ -159,6 +163,7 @@ class DeviceEnergyManagementCluster( suspend fun startTimeAdjustRequest( requestedStartTime: UInt, + cause: UByte, timedInvokeTimeout: Duration? = null ) { val commandId: UInt = 2u @@ -168,6 +173,9 @@ class DeviceEnergyManagementCluster( val TAG_REQUESTED_START_TIME_REQ: Int = 0 tlvWriter.put(ContextSpecificTag(TAG_REQUESTED_START_TIME_REQ), requestedStartTime) + + val TAG_CAUSE_REQ: Int = 1 + tlvWriter.put(ContextSpecificTag(TAG_CAUSE_REQ), cause) tlvWriter.endStructure() val request: InvokeRequest = @@ -181,7 +189,7 @@ class DeviceEnergyManagementCluster( logger.log(Level.FINE, "Invoke command succeeded: ${response}") } - suspend fun pauseRequest(duration: UInt, timedInvokeTimeout: Duration? = null) { + suspend fun pauseRequest(duration: UInt, cause: UByte, timedInvokeTimeout: Duration? = null) { val commandId: UInt = 3u val tlvWriter = TlvWriter() @@ -189,6 +197,9 @@ class DeviceEnergyManagementCluster( val TAG_DURATION_REQ: Int = 0 tlvWriter.put(ContextSpecificTag(TAG_DURATION_REQ), duration) + + val TAG_CAUSE_REQ: Int = 1 + tlvWriter.put(ContextSpecificTag(TAG_CAUSE_REQ), cause) tlvWriter.endStructure() val request: InvokeRequest = @@ -223,6 +234,7 @@ class DeviceEnergyManagementCluster( suspend fun modifyForecastRequest( forecastId: UInt, slotAdjustments: List, + cause: UByte, timedInvokeTimeout: Duration? = null ) { val commandId: UInt = 5u @@ -239,6 +251,9 @@ class DeviceEnergyManagementCluster( item.toTlv(AnonymousTag, tlvWriter) } tlvWriter.endArray() + + val TAG_CAUSE_REQ: Int = 2 + tlvWriter.put(ContextSpecificTag(TAG_CAUSE_REQ), cause) tlvWriter.endStructure() val request: InvokeRequest = @@ -254,6 +269,7 @@ class DeviceEnergyManagementCluster( suspend fun requestConstraintBasedForecast( constraints: List, + cause: UByte, timedInvokeTimeout: Duration? = null ) { val commandId: UInt = 6u @@ -267,6 +283,27 @@ class DeviceEnergyManagementCluster( item.toTlv(AnonymousTag, tlvWriter) } tlvWriter.endArray() + + val TAG_CAUSE_REQ: Int = 1 + tlvWriter.put(ContextSpecificTag(TAG_CAUSE_REQ), cause) + tlvWriter.endStructure() + + val request: InvokeRequest = + InvokeRequest( + CommandPath(endpointId, clusterId = CLUSTER_ID, commandId), + tlvPayload = tlvWriter.getEncoded(), + timedRequest = timedInvokeTimeout + ) + + val response: InvokeResponse = controller.invoke(request) + logger.log(Level.FINE, "Invoke command succeeded: ${response}") + } + + suspend fun cancelRequest(timedInvokeTimeout: Duration? = null) { + val commandId: UInt = 7u + + val tlvWriter = TlvWriter() + tlvWriter.startStructure(AnonymousTag) tlvWriter.endStructure() val request: InvokeRequest = @@ -910,6 +947,97 @@ class DeviceEnergyManagementCluster( } } + suspend fun readOptOutStateAttribute(): UByte? { + val ATTRIBUTE_ID: UInt = 7u + + val attributePath = + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + + val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath)) + + val response = controller.read(readRequest) + + if (response.successes.isEmpty()) { + logger.log(Level.WARNING, "Read command failed") + throw IllegalStateException("Read command failed with failures: ${response.failures}") + } + + logger.log(Level.FINE, "Read command succeeded") + + val attributeData = + response.successes.filterIsInstance().firstOrNull { + it.path.attributeId == ATTRIBUTE_ID + } + + requireNotNull(attributeData) { "Optoutstate attribute not found in response" } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: UByte? = + if (tlvReader.isNextTag(AnonymousTag)) { + tlvReader.getUByte(AnonymousTag) + } else { + null + } + + return decodedValue + } + + suspend fun subscribeOptOutStateAttribute( + minInterval: Int, + maxInterval: Int + ): Flow { + val ATTRIBUTE_ID: UInt = 7u + val attributePaths = + listOf( + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + ) + + val subscribeRequest: SubscribeRequest = + SubscribeRequest( + eventPaths = emptyList(), + attributePaths = attributePaths, + minInterval = Duration.ofSeconds(minInterval.toLong()), + maxInterval = Duration.ofSeconds(maxInterval.toLong()) + ) + + return controller.subscribe(subscribeRequest).transform { subscriptionState -> + when (subscriptionState) { + is SubscriptionState.SubscriptionErrorNotification -> { + emit( + UByteSubscriptionState.Error( + Exception( + "Subscription terminated with error code: ${subscriptionState.terminationCause}" + ) + ) + ) + } + is SubscriptionState.NodeStateUpdate -> { + val attributeData = + subscriptionState.updateState.successes + .filterIsInstance() + .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } + + requireNotNull(attributeData) { "Optoutstate attribute not found in Node State update" } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: UByte? = + if (tlvReader.isNextTag(AnonymousTag)) { + tlvReader.getUByte(AnonymousTag) + } else { + null + } + + decodedValue?.let { emit(UByteSubscriptionState.Success(it)) } + } + SubscriptionState.SubscriptionEstablished -> { + emit(UByteSubscriptionState.SubscriptionEstablished) + } + } + } + } + suspend fun readGeneratedCommandListAttribute(): GeneratedCommandListAttribute { val ATTRIBUTE_ID: UInt = 65528u diff --git a/src/controller/java/generated/java/matter/controller/cluster/eventstructs/DeviceEnergyManagementClusterResumedEvent.kt b/src/controller/java/generated/java/matter/controller/cluster/eventstructs/DeviceEnergyManagementClusterResumedEvent.kt new file mode 100644 index 00000000000000..db5219f72dba0e --- /dev/null +++ b/src/controller/java/generated/java/matter/controller/cluster/eventstructs/DeviceEnergyManagementClusterResumedEvent.kt @@ -0,0 +1,52 @@ +/* + * + * Copyright (c) 2023 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. + */ +package matter.controller.cluster.eventstructs + +import matter.controller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class DeviceEnergyManagementClusterResumedEvent(val cause: UByte) { + override fun toString(): String = buildString { + append("DeviceEnergyManagementClusterResumedEvent {\n") + append("\tcause : $cause\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_CAUSE), cause) + endStructure() + } + } + + companion object { + private const val TAG_CAUSE = 0 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): DeviceEnergyManagementClusterResumedEvent { + tlvReader.enterStructure(tlvTag) + val cause = tlvReader.getUByte(ContextSpecificTag(TAG_CAUSE)) + + tlvReader.exitContainer() + + return DeviceEnergyManagementClusterResumedEvent(cause) + } + } +} diff --git a/src/controller/java/generated/java/matter/controller/cluster/files.gni b/src/controller/java/generated/java/matter/controller/cluster/files.gni index 635cff6021ba99..42d42d93cbfbc8 100644 --- a/src/controller/java/generated/java/matter/controller/cluster/files.gni +++ b/src/controller/java/generated/java/matter/controller/cluster/files.gni @@ -146,6 +146,7 @@ matter_eventstructs_sources = [ "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/eventstructs/BridgedDeviceBasicInformationClusterStartUpEvent.kt", "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/eventstructs/DemandResponseLoadControlClusterLoadControlEventStatusChangeEvent.kt", "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/eventstructs/DeviceEnergyManagementClusterPowerAdjustEndEvent.kt", + "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/eventstructs/DeviceEnergyManagementClusterResumedEvent.kt", "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/eventstructs/DishwasherAlarmClusterNotifyEvent.kt", "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/eventstructs/DoorLockClusterDoorLockAlarmEvent.kt", "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/eventstructs/DoorLockClusterDoorStateChangeEvent.kt", diff --git a/src/controller/java/generated/java/matter/controller/cluster/structs/DeviceEnergyManagementClusterForecastStruct.kt b/src/controller/java/generated/java/matter/controller/cluster/structs/DeviceEnergyManagementClusterForecastStruct.kt index 6910c799cd8268..a83d26ee3815d0 100644 --- a/src/controller/java/generated/java/matter/controller/cluster/structs/DeviceEnergyManagementClusterForecastStruct.kt +++ b/src/controller/java/generated/java/matter/controller/cluster/structs/DeviceEnergyManagementClusterForecastStruct.kt @@ -32,7 +32,8 @@ class DeviceEnergyManagementClusterForecastStruct( val earliestStartTime: Optional?, val latestEndTime: Optional, val isPauseable: Boolean, - val slots: List + val slots: List, + val forecastUpdateReason: UByte ) { override fun toString(): String = buildString { append("DeviceEnergyManagementClusterForecastStruct {\n") @@ -44,6 +45,7 @@ class DeviceEnergyManagementClusterForecastStruct( append("\tlatestEndTime : $latestEndTime\n") append("\tisPauseable : $isPauseable\n") append("\tslots : $slots\n") + append("\tforecastUpdateReason : $forecastUpdateReason\n") append("}\n") } @@ -76,6 +78,7 @@ class DeviceEnergyManagementClusterForecastStruct( item.toTlv(AnonymousTag, this) } endArray() + put(ContextSpecificTag(TAG_FORECAST_UPDATE_REASON), forecastUpdateReason) endStructure() } } @@ -89,6 +92,7 @@ class DeviceEnergyManagementClusterForecastStruct( private const val TAG_LATEST_END_TIME = 5 private const val TAG_IS_PAUSEABLE = 6 private const val TAG_SLOTS = 7 + private const val TAG_FORECAST_UPDATE_REASON = 8 fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): DeviceEnergyManagementClusterForecastStruct { tlvReader.enterStructure(tlvTag) @@ -128,6 +132,7 @@ class DeviceEnergyManagementClusterForecastStruct( } tlvReader.exitContainer() } + val forecastUpdateReason = tlvReader.getUByte(ContextSpecificTag(TAG_FORECAST_UPDATE_REASON)) tlvReader.exitContainer() @@ -139,7 +144,8 @@ class DeviceEnergyManagementClusterForecastStruct( earliestStartTime, latestEndTime, isPauseable, - slots + slots, + forecastUpdateReason ) } } diff --git a/src/controller/java/generated/java/matter/controller/cluster/structs/DeviceEnergyManagementClusterSlotStruct.kt b/src/controller/java/generated/java/matter/controller/cluster/structs/DeviceEnergyManagementClusterSlotStruct.kt index d3121dc411a4de..992a41573e295e 100644 --- a/src/controller/java/generated/java/matter/controller/cluster/structs/DeviceEnergyManagementClusterSlotStruct.kt +++ b/src/controller/java/generated/java/matter/controller/cluster/structs/DeviceEnergyManagementClusterSlotStruct.kt @@ -30,9 +30,9 @@ class DeviceEnergyManagementClusterSlotStruct( val defaultDuration: UInt, val elapsedSlotTime: UInt, val remainingSlotTime: UInt, - val slotIsPauseable: Boolean, - val minPauseDuration: UInt, - val maxPauseDuration: UInt, + val slotIsPauseable: Optional, + val minPauseDuration: Optional, + val maxPauseDuration: Optional, val manufacturerESAState: Optional, val nominalPower: Optional, val minPower: Optional, @@ -75,9 +75,18 @@ class DeviceEnergyManagementClusterSlotStruct( put(ContextSpecificTag(TAG_DEFAULT_DURATION), defaultDuration) put(ContextSpecificTag(TAG_ELAPSED_SLOT_TIME), elapsedSlotTime) put(ContextSpecificTag(TAG_REMAINING_SLOT_TIME), remainingSlotTime) - put(ContextSpecificTag(TAG_SLOT_IS_PAUSEABLE), slotIsPauseable) - put(ContextSpecificTag(TAG_MIN_PAUSE_DURATION), minPauseDuration) - put(ContextSpecificTag(TAG_MAX_PAUSE_DURATION), maxPauseDuration) + if (slotIsPauseable.isPresent) { + val optslotIsPauseable = slotIsPauseable.get() + put(ContextSpecificTag(TAG_SLOT_IS_PAUSEABLE), optslotIsPauseable) + } + if (minPauseDuration.isPresent) { + val optminPauseDuration = minPauseDuration.get() + put(ContextSpecificTag(TAG_MIN_PAUSE_DURATION), optminPauseDuration) + } + if (maxPauseDuration.isPresent) { + val optmaxPauseDuration = maxPauseDuration.get() + put(ContextSpecificTag(TAG_MAX_PAUSE_DURATION), optmaxPauseDuration) + } if (manufacturerESAState.isPresent) { val optmanufacturerESAState = manufacturerESAState.get() put(ContextSpecificTag(TAG_MANUFACTURER_E_S_A_STATE), optmanufacturerESAState) @@ -153,9 +162,24 @@ class DeviceEnergyManagementClusterSlotStruct( val defaultDuration = tlvReader.getUInt(ContextSpecificTag(TAG_DEFAULT_DURATION)) val elapsedSlotTime = tlvReader.getUInt(ContextSpecificTag(TAG_ELAPSED_SLOT_TIME)) val remainingSlotTime = tlvReader.getUInt(ContextSpecificTag(TAG_REMAINING_SLOT_TIME)) - val slotIsPauseable = tlvReader.getBoolean(ContextSpecificTag(TAG_SLOT_IS_PAUSEABLE)) - val minPauseDuration = tlvReader.getUInt(ContextSpecificTag(TAG_MIN_PAUSE_DURATION)) - val maxPauseDuration = tlvReader.getUInt(ContextSpecificTag(TAG_MAX_PAUSE_DURATION)) + val slotIsPauseable = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_SLOT_IS_PAUSEABLE))) { + Optional.of(tlvReader.getBoolean(ContextSpecificTag(TAG_SLOT_IS_PAUSEABLE))) + } else { + Optional.empty() + } + val minPauseDuration = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_MIN_PAUSE_DURATION))) { + Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_MIN_PAUSE_DURATION))) + } else { + Optional.empty() + } + val maxPauseDuration = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_MAX_PAUSE_DURATION))) { + Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_MAX_PAUSE_DURATION))) + } else { + Optional.empty() + } val manufacturerESAState = if (tlvReader.isNextTag(ContextSpecificTag(TAG_MANUFACTURER_E_S_A_STATE))) { Optional.of(tlvReader.getUShort(ContextSpecificTag(TAG_MANUFACTURER_E_S_A_STATE))) diff --git a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp index 1ca2a96af986df..2778b037f8e694 100644 --- a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp +++ b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp @@ -22214,26 +22214,60 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR newElement_2_remainingSlotTimeClassName.c_str(), newElement_2_remainingSlotTimeCtorSignature.c_str(), jninewElement_2_remainingSlotTime, newElement_2_remainingSlotTime); jobject newElement_2_slotIsPauseable; - std::string newElement_2_slotIsPauseableClassName = "java/lang/Boolean"; - std::string newElement_2_slotIsPauseableCtorSignature = "(Z)V"; - jboolean jninewElement_2_slotIsPauseable = static_cast(entry_2.slotIsPauseable); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_2_slotIsPauseableClassName.c_str(), newElement_2_slotIsPauseableCtorSignature.c_str(), - jninewElement_2_slotIsPauseable, newElement_2_slotIsPauseable); + if (!entry_2.slotIsPauseable.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_slotIsPauseable); + } + else + { + jobject newElement_2_slotIsPauseableInsideOptional; + std::string newElement_2_slotIsPauseableInsideOptionalClassName = "java/lang/Boolean"; + std::string newElement_2_slotIsPauseableInsideOptionalCtorSignature = "(Z)V"; + jboolean jninewElement_2_slotIsPauseableInsideOptional = + static_cast(entry_2.slotIsPauseable.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_2_slotIsPauseableInsideOptionalClassName.c_str(), + newElement_2_slotIsPauseableInsideOptionalCtorSignature.c_str(), + jninewElement_2_slotIsPauseableInsideOptional, newElement_2_slotIsPauseableInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(newElement_2_slotIsPauseableInsideOptional, + newElement_2_slotIsPauseable); + } jobject newElement_2_minPauseDuration; - std::string newElement_2_minPauseDurationClassName = "java/lang/Long"; - std::string newElement_2_minPauseDurationCtorSignature = "(J)V"; - jlong jninewElement_2_minPauseDuration = static_cast(entry_2.minPauseDuration); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_2_minPauseDurationClassName.c_str(), newElement_2_minPauseDurationCtorSignature.c_str(), - jninewElement_2_minPauseDuration, newElement_2_minPauseDuration); + if (!entry_2.minPauseDuration.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_minPauseDuration); + } + else + { + jobject newElement_2_minPauseDurationInsideOptional; + std::string newElement_2_minPauseDurationInsideOptionalClassName = "java/lang/Long"; + std::string newElement_2_minPauseDurationInsideOptionalCtorSignature = "(J)V"; + jlong jninewElement_2_minPauseDurationInsideOptional = static_cast(entry_2.minPauseDuration.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_2_minPauseDurationInsideOptionalClassName.c_str(), + newElement_2_minPauseDurationInsideOptionalCtorSignature.c_str(), + jninewElement_2_minPauseDurationInsideOptional, newElement_2_minPauseDurationInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(newElement_2_minPauseDurationInsideOptional, + newElement_2_minPauseDuration); + } jobject newElement_2_maxPauseDuration; - std::string newElement_2_maxPauseDurationClassName = "java/lang/Long"; - std::string newElement_2_maxPauseDurationCtorSignature = "(J)V"; - jlong jninewElement_2_maxPauseDuration = static_cast(entry_2.maxPauseDuration); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_2_maxPauseDurationClassName.c_str(), newElement_2_maxPauseDurationCtorSignature.c_str(), - jninewElement_2_maxPauseDuration, newElement_2_maxPauseDuration); + if (!entry_2.maxPauseDuration.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_maxPauseDuration); + } + else + { + jobject newElement_2_maxPauseDurationInsideOptional; + std::string newElement_2_maxPauseDurationInsideOptionalClassName = "java/lang/Long"; + std::string newElement_2_maxPauseDurationInsideOptionalCtorSignature = "(J)V"; + jlong jninewElement_2_maxPauseDurationInsideOptional = static_cast(entry_2.maxPauseDuration.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_2_maxPauseDurationInsideOptionalClassName.c_str(), + newElement_2_maxPauseDurationInsideOptionalCtorSignature.c_str(), + jninewElement_2_maxPauseDurationInsideOptional, newElement_2_maxPauseDurationInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(newElement_2_maxPauseDurationInsideOptional, + newElement_2_maxPauseDuration); + } jobject newElement_2_manufacturerESAState; if (!entry_2.manufacturerESAState.HasValue()) { @@ -22496,10 +22530,10 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jmethodID slotStructStructCtor_3; err = chip::JniReferences::GetInstance().FindMethod( env, slotStructStructClass_3, "", - "(Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Boolean;Ljava/" - "lang/Long;Ljava/lang/Long;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/" + "(Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Long;Ljava/util/" + "Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/" "Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/" - "Optional;Ljava/util/Optional;)V", + "Optional;Ljava/util/Optional;Ljava/util/Optional;)V", &slotStructStructCtor_3); if (err != CHIP_NO_ERROR || slotStructStructCtor_3 == nullptr) { @@ -22516,6 +22550,13 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR newElement_2_maxPowerAdjustment, newElement_2_minDurationAdjustment, newElement_2_maxDurationAdjustment); chip::JniReferences::GetInstance().AddToList(value_slots, newElement_2); } + jobject value_forecastUpdateReason; + std::string value_forecastUpdateReasonClassName = "java/lang/Integer"; + std::string value_forecastUpdateReasonCtorSignature = "(I)V"; + jint jnivalue_forecastUpdateReason = static_cast(cppValue.Value().forecastUpdateReason); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_forecastUpdateReasonClassName.c_str(), value_forecastUpdateReasonCtorSignature.c_str(), + jnivalue_forecastUpdateReason, value_forecastUpdateReason); jclass forecastStructStructClass_1; err = chip::JniReferences::GetInstance().GetClassRef( @@ -22531,7 +22572,7 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR err = chip::JniReferences::GetInstance().FindMethod( env, forecastStructStructClass_1, "", "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Long;Ljava/lang/Long;Ljava/util/Optional;Ljava/util/" - "Optional;Ljava/lang/Boolean;Ljava/util/ArrayList;)V", + "Optional;Ljava/lang/Boolean;Ljava/util/ArrayList;Ljava/lang/Integer;)V", &forecastStructStructCtor_1); if (err != CHIP_NO_ERROR || forecastStructStructCtor_1 == nullptr) { @@ -22541,8 +22582,24 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR value = env->NewObject(forecastStructStructClass_1, forecastStructStructCtor_1, value_forecastId, value_activeSlotNumber, value_startTime, value_endTime, value_earliestStartTime, - value_latestEndTime, value_isPauseable, value_slots); + value_latestEndTime, value_isPauseable, value_slots, value_forecastUpdateReason); + } + return value; + } + case Attributes::OptOutState::Id: { + using TypeInfo = Attributes::OptOutState::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; } + jobject value; + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::GeneratedCommandList::Id: { diff --git a/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp b/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp index 2dc5ac3303b7df..d7e0a8debab4ae 100644 --- a/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp +++ b/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp @@ -5282,6 +5282,13 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & { return nullptr; } + jobject value_cause; + std::string value_causeClassName = "java/lang/Integer"; + std::string value_causeCtorSignature = "(I)V"; + jint jnivalue_cause = static_cast(cppValue.cause); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_causeClassName.c_str(), value_causeCtorSignature.c_str(), jnivalue_cause, value_cause); + jclass resumedStructClass; err = chip::JniReferences::GetInstance().GetClassRef( env, "chip/devicecontroller/ChipEventStructs$DeviceEnergyManagementClusterResumedEvent", resumedStructClass); @@ -5292,14 +5299,15 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & } jmethodID resumedStructCtor; - err = chip::JniReferences::GetInstance().FindMethod(env, resumedStructClass, "", "()V", &resumedStructCtor); + err = chip::JniReferences::GetInstance().FindMethod(env, resumedStructClass, "", "(Ljava/lang/Integer;)V", + &resumedStructCtor); if (err != CHIP_NO_ERROR || resumedStructCtor == nullptr) { ChipLogError(Zcl, "Could not find ChipEventStructs$DeviceEnergyManagementClusterResumedEvent constructor"); return nullptr; } - jobject value = env->NewObject(resumedStructClass, resumedStructCtor); + jobject value = env->NewObject(resumedStructClass, resumedStructCtor, value_cause); return value; } diff --git a/src/controller/python/chip/clusters/CHIPClusters.py b/src/controller/python/chip/clusters/CHIPClusters.py index d599bd7f46f730..eddfbd257eb58f 100644 --- a/src/controller/python/chip/clusters/CHIPClusters.py +++ b/src/controller/python/chip/clusters/CHIPClusters.py @@ -6619,6 +6619,7 @@ class ChipClusters: "args": { "power": "int", "duration": "int", + "cause": "int", }, }, 0x00000001: { @@ -6632,6 +6633,7 @@ class ChipClusters: "commandName": "StartTimeAdjustRequest", "args": { "requestedStartTime": "int", + "cause": "int", }, }, 0x00000003: { @@ -6639,6 +6641,7 @@ class ChipClusters: "commandName": "PauseRequest", "args": { "duration": "int", + "cause": "int", }, }, 0x00000004: { @@ -6653,6 +6656,7 @@ class ChipClusters: "args": { "forecastId": "int", "slotAdjustments": "SlotAdjustmentStruct", + "cause": "int", }, }, 0x00000006: { @@ -6660,6 +6664,13 @@ class ChipClusters: "commandName": "RequestConstraintBasedForecast", "args": { "constraints": "ConstraintsStruct", + "cause": "int", + }, + }, + 0x00000007: { + "commandId": 0x00000007, + "commandName": "CancelRequest", + "args": { }, }, }, @@ -6706,6 +6717,12 @@ class ChipClusters: "type": "", "reportable": True, }, + 0x00000007: { + "attributeName": "OptOutState", + "attributeId": 0x00000007, + "type": "int", + "reportable": True, + }, 0x0000FFF8: { "attributeName": "GeneratedCommandList", "attributeId": 0x0000FFF8, diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py index 6a2d53df035fe1..4887280c0f91c6 100644 --- a/src/controller/python/chip/clusters/Objects.py +++ b/src/controller/python/chip/clusters/Objects.py @@ -23371,6 +23371,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="absMaxPower", Tag=0x00000004, Type=int), ClusterObjectFieldDescriptor(Label="powerAdjustmentCapability", Tag=0x00000005, Type=typing.Union[None, Nullable, typing.List[DeviceEnergyManagement.Structs.PowerAdjustStruct]]), ClusterObjectFieldDescriptor(Label="forecast", Tag=0x00000006, Type=typing.Union[None, Nullable, DeviceEnergyManagement.Structs.ForecastStruct]), + ClusterObjectFieldDescriptor(Label="optOutState", Tag=0x00000007, Type=typing.Optional[DeviceEnergyManagement.Enums.OptOutStateEnum]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), @@ -23386,6 +23387,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: absMaxPower: 'int' = None powerAdjustmentCapability: 'typing.Union[None, Nullable, typing.List[DeviceEnergyManagement.Structs.PowerAdjustStruct]]' = None forecast: 'typing.Union[None, Nullable, DeviceEnergyManagement.Structs.ForecastStruct]' = None + optOutState: 'typing.Optional[DeviceEnergyManagement.Enums.OptOutStateEnum]' = None generatedCommandList: 'typing.List[uint]' = None acceptedCommandList: 'typing.List[uint]' = None eventList: 'typing.List[uint]' = None @@ -23394,16 +23396,26 @@ def descriptor(cls) -> ClusterObjectDescriptor: clusterRevision: 'uint' = None class Enums: + class AdjustmentCauseEnum(MatterIntEnum): + kLocalOptimization = 0x00 + kGridOptimization = 0x01 + # All received enum values that are not listed above will be mapped + # to kUnknownEnumValue. This is a helper enum value that should only + # be used by code to process how it handles receiving and unknown + # enum value. This specific should never be transmitted. + kUnknownEnumValue = 2, + class CauseEnum(MatterIntEnum): kNormalCompletion = 0x00 kOffline = 0x01 kFault = 0x02 kUserOptOut = 0x03 + kCancelled = 0x04 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving and unknown # enum value. This specific should never be transmitted. - kUnknownEnumValue = 4, + kUnknownEnumValue = 5, class CostTypeEnum(MatterIntEnum): kFinancial = 0x00 @@ -23420,14 +23432,13 @@ class ESAStateEnum(MatterIntEnum): kOffline = 0x00 kOnline = 0x01 kFault = 0x02 - kUserOptOut = 0x03 - kPowerAdjustActive = 0x04 - kPaused = 0x05 + kPowerAdjustActive = 0x03 + kPaused = 0x04 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving and unknown # enum value. This specific should never be transmitted. - kUnknownEnumValue = 6, + kUnknownEnumValue = 5, class ESATypeEnum(MatterIntEnum): kEvse = 0x00 @@ -23451,12 +23462,36 @@ class ESATypeEnum(MatterIntEnum): # enum value. This specific should never be transmitted. kUnknownEnumValue = 14, + class ForecastUpdateReasonEnum(MatterIntEnum): + kInternalOptimization = 0x00 + kLocalOptimization = 0x01 + kGridOptimization = 0x02 + # All received enum values that are not listed above will be mapped + # to kUnknownEnumValue. This is a helper enum value that should only + # be used by code to process how it handles receiving and unknown + # enum value. This specific should never be transmitted. + kUnknownEnumValue = 3, + + class OptOutStateEnum(MatterIntEnum): + kNoOptOut = 0x00 + kLocalOptOut = 0x01 + kGridOptOut = 0x02 + kOptOut = 0x03 + # All received enum values that are not listed above will be mapped + # to kUnknownEnumValue. This is a helper enum value that should only + # be used by code to process how it handles receiving and unknown + # enum value. This specific should never be transmitted. + kUnknownEnumValue = 4, + class Bitmaps: class Feature(IntFlag): kPowerAdjustment = 0x1 kPowerForecastReporting = 0x2 kStateForecastReporting = 0x4 - kForecastAdjustment = 0x8 + kStartTimeAdjustment = 0x8 + kPausable = 0x10 + kForecastAdjustment = 0x20 + kConstraintBasedAdjustment = 0x40 class Structs: @dataclass @@ -23487,9 +23522,9 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="defaultDuration", Tag=2, Type=uint), ClusterObjectFieldDescriptor(Label="elapsedSlotTime", Tag=3, Type=uint), ClusterObjectFieldDescriptor(Label="remainingSlotTime", Tag=4, Type=uint), - ClusterObjectFieldDescriptor(Label="slotIsPauseable", Tag=5, Type=bool), - ClusterObjectFieldDescriptor(Label="minPauseDuration", Tag=6, Type=uint), - ClusterObjectFieldDescriptor(Label="maxPauseDuration", Tag=7, Type=uint), + ClusterObjectFieldDescriptor(Label="slotIsPauseable", Tag=5, Type=typing.Optional[bool]), + ClusterObjectFieldDescriptor(Label="minPauseDuration", Tag=6, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="maxPauseDuration", Tag=7, Type=typing.Optional[uint]), ClusterObjectFieldDescriptor(Label="manufacturerESAState", Tag=8, Type=typing.Optional[uint]), ClusterObjectFieldDescriptor(Label="nominalPower", Tag=9, Type=typing.Optional[int]), ClusterObjectFieldDescriptor(Label="minPower", Tag=10, Type=typing.Optional[int]), @@ -23507,9 +23542,9 @@ def descriptor(cls) -> ClusterObjectDescriptor: defaultDuration: 'uint' = 0 elapsedSlotTime: 'uint' = 0 remainingSlotTime: 'uint' = 0 - slotIsPauseable: 'bool' = False - minPauseDuration: 'uint' = 0 - maxPauseDuration: 'uint' = 0 + slotIsPauseable: 'typing.Optional[bool]' = None + minPauseDuration: 'typing.Optional[uint]' = None + maxPauseDuration: 'typing.Optional[uint]' = None manufacturerESAState: 'typing.Optional[uint]' = None nominalPower: 'typing.Optional[int]' = None minPower: 'typing.Optional[int]' = None @@ -23535,6 +23570,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="latestEndTime", Tag=5, Type=typing.Optional[uint]), ClusterObjectFieldDescriptor(Label="isPauseable", Tag=6, Type=bool), ClusterObjectFieldDescriptor(Label="slots", Tag=7, Type=typing.List[DeviceEnergyManagement.Structs.SlotStruct]), + ClusterObjectFieldDescriptor(Label="forecastUpdateReason", Tag=8, Type=DeviceEnergyManagement.Enums.ForecastUpdateReasonEnum), ]) forecastId: 'uint' = 0 @@ -23545,6 +23581,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: latestEndTime: 'typing.Optional[uint]' = None isPauseable: 'bool' = False slots: 'typing.List[DeviceEnergyManagement.Structs.SlotStruct]' = field(default_factory=lambda: []) + forecastUpdateReason: 'DeviceEnergyManagement.Enums.ForecastUpdateReasonEnum' = 0 @dataclass class ConstraintsStruct(ClusterObject): @@ -23611,10 +23648,12 @@ def descriptor(cls) -> ClusterObjectDescriptor: Fields=[ ClusterObjectFieldDescriptor(Label="power", Tag=0, Type=int), ClusterObjectFieldDescriptor(Label="duration", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="cause", Tag=2, Type=DeviceEnergyManagement.Enums.AdjustmentCauseEnum), ]) power: 'int' = 0 duration: 'uint' = 0 + cause: 'DeviceEnergyManagement.Enums.AdjustmentCauseEnum' = 0 @dataclass class CancelPowerAdjustRequest(ClusterCommand): @@ -23641,9 +23680,11 @@ def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ ClusterObjectFieldDescriptor(Label="requestedStartTime", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="cause", Tag=1, Type=DeviceEnergyManagement.Enums.AdjustmentCauseEnum), ]) requestedStartTime: 'uint' = 0 + cause: 'DeviceEnergyManagement.Enums.AdjustmentCauseEnum' = 0 @dataclass class PauseRequest(ClusterCommand): @@ -23657,9 +23698,11 @@ def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ ClusterObjectFieldDescriptor(Label="duration", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="cause", Tag=1, Type=DeviceEnergyManagement.Enums.AdjustmentCauseEnum), ]) duration: 'uint' = 0 + cause: 'DeviceEnergyManagement.Enums.AdjustmentCauseEnum' = 0 @dataclass class ResumeRequest(ClusterCommand): @@ -23687,10 +23730,12 @@ def descriptor(cls) -> ClusterObjectDescriptor: Fields=[ ClusterObjectFieldDescriptor(Label="forecastId", Tag=0, Type=uint), ClusterObjectFieldDescriptor(Label="slotAdjustments", Tag=1, Type=typing.List[DeviceEnergyManagement.Structs.SlotAdjustmentStruct]), + ClusterObjectFieldDescriptor(Label="cause", Tag=2, Type=DeviceEnergyManagement.Enums.AdjustmentCauseEnum), ]) forecastId: 'uint' = 0 slotAdjustments: 'typing.List[DeviceEnergyManagement.Structs.SlotAdjustmentStruct]' = field(default_factory=lambda: []) + cause: 'DeviceEnergyManagement.Enums.AdjustmentCauseEnum' = 0 @dataclass class RequestConstraintBasedForecast(ClusterCommand): @@ -23704,9 +23749,24 @@ def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ ClusterObjectFieldDescriptor(Label="constraints", Tag=0, Type=typing.List[DeviceEnergyManagement.Structs.ConstraintsStruct]), + ClusterObjectFieldDescriptor(Label="cause", Tag=1, Type=DeviceEnergyManagement.Enums.AdjustmentCauseEnum), ]) constraints: 'typing.List[DeviceEnergyManagement.Structs.ConstraintsStruct]' = field(default_factory=lambda: []) + cause: 'DeviceEnergyManagement.Enums.AdjustmentCauseEnum' = 0 + + @dataclass + class CancelRequest(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000098 + command_id: typing.ClassVar[int] = 0x00000007 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ]) class Attributes: @dataclass @@ -23821,6 +23881,22 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Union[None, Nullable, DeviceEnergyManagement.Structs.ForecastStruct]' = None + @dataclass + class OptOutState(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000098 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000007 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[DeviceEnergyManagement.Enums.OptOutStateEnum]) + + value: 'typing.Optional[DeviceEnergyManagement.Enums.OptOutStateEnum]' = None + @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty @@ -23987,8 +24063,11 @@ def event_id(cls) -> int: def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ + ClusterObjectFieldDescriptor(Label="cause", Tag=0, Type=DeviceEnergyManagement.Enums.CauseEnum), ]) + cause: 'DeviceEnergyManagement.Enums.CauseEnum' = 0 + @dataclass class EnergyEvse(Cluster): diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm index d7d9849a4f9c57..a63147b8a9eedf 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm @@ -3063,6 +3063,9 @@ static BOOL AttributeIsSpecifiedInDeviceEnergyManagementCluster(AttributeId aAtt case Attributes::Forecast::Id: { return YES; } + case Attributes::OptOutState::Id: { + return YES; + } case Attributes::GeneratedCommandList::Id: { return YES; } diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm index acf77070414712..eb5827496fc0d5 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm @@ -8446,9 +8446,21 @@ static id _Nullable DecodeAttributeValueForDeviceEnergyManagementCluster(Attribu newElement_2.defaultDuration = [NSNumber numberWithUnsignedInt:entry_2.defaultDuration]; newElement_2.elapsedSlotTime = [NSNumber numberWithUnsignedInt:entry_2.elapsedSlotTime]; newElement_2.remainingSlotTime = [NSNumber numberWithUnsignedInt:entry_2.remainingSlotTime]; - newElement_2.slotIsPauseable = [NSNumber numberWithBool:entry_2.slotIsPauseable]; - newElement_2.minPauseDuration = [NSNumber numberWithUnsignedInt:entry_2.minPauseDuration]; - newElement_2.maxPauseDuration = [NSNumber numberWithUnsignedInt:entry_2.maxPauseDuration]; + if (entry_2.slotIsPauseable.HasValue()) { + newElement_2.slotIsPauseable = [NSNumber numberWithBool:entry_2.slotIsPauseable.Value()]; + } else { + newElement_2.slotIsPauseable = nil; + } + if (entry_2.minPauseDuration.HasValue()) { + newElement_2.minPauseDuration = [NSNumber numberWithUnsignedInt:entry_2.minPauseDuration.Value()]; + } else { + newElement_2.minPauseDuration = nil; + } + if (entry_2.maxPauseDuration.HasValue()) { + newElement_2.maxPauseDuration = [NSNumber numberWithUnsignedInt:entry_2.maxPauseDuration.Value()]; + } else { + newElement_2.maxPauseDuration = nil; + } if (entry_2.manufacturerESAState.HasValue()) { newElement_2.manufacturerESAState = [NSNumber numberWithUnsignedShort:entry_2.manufacturerESAState.Value()]; } else { @@ -8531,9 +8543,21 @@ static id _Nullable DecodeAttributeValueForDeviceEnergyManagementCluster(Attribu } value.slots = array_2; } + value.forecastUpdateReason = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue.Value().forecastUpdateReason)]; } return value; } + case Attributes::OptOutState::Id: { + using TypeInfo = Attributes::OptOutState::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; + return value; + } default: { break; } diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h index f484ada4d19774..f30370c30b409a 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h @@ -7591,6 +7591,14 @@ MTR_PROVISIONALLY_AVAILABLE * Allows a client to ask the ESA to recompute its Forecast based on power and time constraints. */ - (void)requestConstraintBasedForecastWithParams:(MTRDeviceEnergyManagementClusterRequestConstraintBasedForecastParams *)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +/** + * Command CancelRequest + * + * Allows a client to request cancellation of a previous adjustment request in a StartTimeAdjustRequest, ModifyForecastRequest or RequestConstraintBasedForecast command + */ +- (void)cancelRequestWithParams:(MTRDeviceEnergyManagementClusterCancelRequestParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)cancelRequestWithCompletion:(MTRStatusCompletion)completion + MTR_PROVISIONALLY_AVAILABLE; - (void)readAttributeESATypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - (void)subscribeAttributeESATypeWithParams:(MTRSubscribeParams *)params @@ -7634,6 +7642,12 @@ MTR_PROVISIONALLY_AVAILABLE reportHandler:(void (^)(MTRDeviceEnergyManagementClusterForecastStruct * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; + (void)readAttributeForecastWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTRDeviceEnergyManagementClusterForecastStruct * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeOptOutStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeOptOutStateWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeOptOutStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -17357,11 +17371,17 @@ typedef NS_OPTIONS(uint32_t, MTRDemandResponseLoadControlFeature) { MTRDemandResponseLoadControlFeatureHeatingSource MTR_PROVISIONALLY_AVAILABLE = 0x40, } MTR_PROVISIONALLY_AVAILABLE; +typedef NS_ENUM(uint8_t, MTRDeviceEnergyManagementAdjustmentCause) { + MTRDeviceEnergyManagementAdjustmentCauseLocalOptimization MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTRDeviceEnergyManagementAdjustmentCauseGridOptimization MTR_PROVISIONALLY_AVAILABLE = 0x01, +} MTR_PROVISIONALLY_AVAILABLE; + typedef NS_ENUM(uint8_t, MTRDeviceEnergyManagementCause) { MTRDeviceEnergyManagementCauseNormalCompletion MTR_PROVISIONALLY_AVAILABLE = 0x00, MTRDeviceEnergyManagementCauseOffline MTR_PROVISIONALLY_AVAILABLE = 0x01, MTRDeviceEnergyManagementCauseFault MTR_PROVISIONALLY_AVAILABLE = 0x02, MTRDeviceEnergyManagementCauseUserOptOut MTR_PROVISIONALLY_AVAILABLE = 0x03, + MTRDeviceEnergyManagementCauseCancelled MTR_PROVISIONALLY_AVAILABLE = 0x04, } MTR_PROVISIONALLY_AVAILABLE; typedef NS_ENUM(uint8_t, MTRDeviceEnergyManagementCostType) { @@ -17375,9 +17395,8 @@ typedef NS_ENUM(uint8_t, MTRDeviceEnergyManagementESAState) { MTRDeviceEnergyManagementESAStateOffline MTR_PROVISIONALLY_AVAILABLE = 0x00, MTRDeviceEnergyManagementESAStateOnline MTR_PROVISIONALLY_AVAILABLE = 0x01, MTRDeviceEnergyManagementESAStateFault MTR_PROVISIONALLY_AVAILABLE = 0x02, - MTRDeviceEnergyManagementESAStateUserOptOut MTR_PROVISIONALLY_AVAILABLE = 0x03, - MTRDeviceEnergyManagementESAStatePowerAdjustActive MTR_PROVISIONALLY_AVAILABLE = 0x04, - MTRDeviceEnergyManagementESAStatePaused MTR_PROVISIONALLY_AVAILABLE = 0x05, + MTRDeviceEnergyManagementESAStatePowerAdjustActive MTR_PROVISIONALLY_AVAILABLE = 0x03, + MTRDeviceEnergyManagementESAStatePaused MTR_PROVISIONALLY_AVAILABLE = 0x04, } MTR_PROVISIONALLY_AVAILABLE; typedef NS_ENUM(uint8_t, MTRDeviceEnergyManagementESAType) { @@ -17398,11 +17417,27 @@ typedef NS_ENUM(uint8_t, MTRDeviceEnergyManagementESAType) { MTRDeviceEnergyManagementESATypeOther MTR_PROVISIONALLY_AVAILABLE = 0xFF, } MTR_PROVISIONALLY_AVAILABLE; +typedef NS_ENUM(uint8_t, MTRDeviceEnergyManagementForecastUpdateReason) { + MTRDeviceEnergyManagementForecastUpdateReasonInternalOptimization MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTRDeviceEnergyManagementForecastUpdateReasonLocalOptimization MTR_PROVISIONALLY_AVAILABLE = 0x01, + MTRDeviceEnergyManagementForecastUpdateReasonGridOptimization MTR_PROVISIONALLY_AVAILABLE = 0x02, +} MTR_PROVISIONALLY_AVAILABLE; + +typedef NS_ENUM(uint8_t, MTRDeviceEnergyManagementOptOutState) { + MTRDeviceEnergyManagementOptOutStateNoOptOut MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTRDeviceEnergyManagementOptOutStateLocalOptOut MTR_PROVISIONALLY_AVAILABLE = 0x01, + MTRDeviceEnergyManagementOptOutStateGridOptOut MTR_PROVISIONALLY_AVAILABLE = 0x02, + MTRDeviceEnergyManagementOptOutStateOptOut MTR_PROVISIONALLY_AVAILABLE = 0x03, +} MTR_PROVISIONALLY_AVAILABLE; + typedef NS_OPTIONS(uint32_t, MTRDeviceEnergyManagementFeature) { MTRDeviceEnergyManagementFeaturePowerAdjustment MTR_PROVISIONALLY_AVAILABLE = 0x1, MTRDeviceEnergyManagementFeaturePowerForecastReporting MTR_PROVISIONALLY_AVAILABLE = 0x2, MTRDeviceEnergyManagementFeatureStateForecastReporting MTR_PROVISIONALLY_AVAILABLE = 0x4, - MTRDeviceEnergyManagementFeatureForecastAdjustment MTR_PROVISIONALLY_AVAILABLE = 0x8, + MTRDeviceEnergyManagementFeatureStartTimeAdjustment MTR_PROVISIONALLY_AVAILABLE = 0x8, + MTRDeviceEnergyManagementFeaturePausable MTR_PROVISIONALLY_AVAILABLE = 0x10, + MTRDeviceEnergyManagementFeatureForecastAdjustment MTR_PROVISIONALLY_AVAILABLE = 0x20, + MTRDeviceEnergyManagementFeatureConstraintBasedAdjustment MTR_PROVISIONALLY_AVAILABLE = 0x40, } MTR_PROVISIONALLY_AVAILABLE; typedef NS_ENUM(uint8_t, MTREnergyEVSEEnergyTransferStoppedReason) { diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm index aa248a596e44b3..2b8f1dbfc61eec 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm @@ -51414,6 +51414,34 @@ - (void)requestConstraintBasedForecastWithParams:(MTRDeviceEnergyManagementClust queue:self.callbackQueue completion:responseHandler]; } +- (void)cancelRequestWithCompletion:(MTRStatusCompletion)completion +{ + [self cancelRequestWithParams:nil completion:completion]; +} +- (void)cancelRequestWithParams:(MTRDeviceEnergyManagementClusterCancelRequestParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRDeviceEnergyManagementClusterCancelRequestParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = DeviceEnergyManagement::Commands::CancelRequest::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} - (void)readAttributeESATypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { @@ -51667,6 +51695,42 @@ + (void)readAttributeForecastWithClusterStateCache:(MTRClusterStateCacheContaine completion:completion]; } +- (void)readAttributeOptOutStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DeviceEnergyManagement::Attributes::OptOutState::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeOptOutStateWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = DeviceEnergyManagement::Attributes::OptOutState::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeOptOutStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DeviceEnergyManagement::Attributes::OptOutState::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = DeviceEnergyManagement::Attributes::GeneratedCommandList::TypeInfo; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h b/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h index fedd4aa13d0628..f598a052c31fb4 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h @@ -2618,6 +2618,7 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterDeviceEnergyManagementAttributeAbsMaxPowerID MTR_PROVISIONALLY_AVAILABLE = 0x00000004, MTRAttributeIDTypeClusterDeviceEnergyManagementAttributePowerAdjustmentCapabilityID MTR_PROVISIONALLY_AVAILABLE = 0x00000005, MTRAttributeIDTypeClusterDeviceEnergyManagementAttributeForecastID MTR_PROVISIONALLY_AVAILABLE = 0x00000006, + MTRAttributeIDTypeClusterDeviceEnergyManagementAttributeOptOutStateID MTR_PROVISIONALLY_AVAILABLE = 0x00000007, MTRAttributeIDTypeClusterDeviceEnergyManagementAttributeGeneratedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterDeviceEnergyManagementAttributeAcceptedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, MTRAttributeIDTypeClusterDeviceEnergyManagementAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, @@ -6220,6 +6221,7 @@ typedef NS_ENUM(uint32_t, MTRCommandIDType) { MTRCommandIDTypeClusterDeviceEnergyManagementCommandResumeRequestID MTR_PROVISIONALLY_AVAILABLE = 0x00000004, MTRCommandIDTypeClusterDeviceEnergyManagementCommandModifyForecastRequestID MTR_PROVISIONALLY_AVAILABLE = 0x00000005, MTRCommandIDTypeClusterDeviceEnergyManagementCommandRequestConstraintBasedForecastID MTR_PROVISIONALLY_AVAILABLE = 0x00000006, + MTRCommandIDTypeClusterDeviceEnergyManagementCommandCancelRequestID MTR_PROVISIONALLY_AVAILABLE = 0x00000007, // Cluster EnergyEVSE commands MTRCommandIDTypeClusterEnergyEVSECommandGetTargetsResponseID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h index a102f158d5b0a4..38d6ca3aba518e 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h @@ -3583,6 +3583,9 @@ MTR_PROVISIONALLY_AVAILABLE MTR_PROVISIONALLY_AVAILABLE; - (void)modifyForecastRequestWithParams:(MTRDeviceEnergyManagementClusterModifyForecastRequestParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; - (void)requestConstraintBasedForecastWithParams:(MTRDeviceEnergyManagementClusterRequestConstraintBasedForecastParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)cancelRequestWithParams:(MTRDeviceEnergyManagementClusterCancelRequestParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)cancelRequestWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion + MTR_PROVISIONALLY_AVAILABLE; - (NSDictionary * _Nullable)readAttributeESATypeWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; @@ -3598,6 +3601,8 @@ MTR_PROVISIONALLY_AVAILABLE - (NSDictionary * _Nullable)readAttributeForecastWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeOptOutStateWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm index 11ca8e1ab2e8eb..b9373e99317821 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm @@ -9735,6 +9735,37 @@ - (void)requestConstraintBasedForecastWithParams:(MTRDeviceEnergyManagementClust completion:responseHandler]; } +- (void)cancelRequestWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +{ + [self cancelRequestWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; +} +- (void)cancelRequestWithParams:(MTRDeviceEnergyManagementClusterCancelRequestParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRDeviceEnergyManagementClusterCancelRequestParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = DeviceEnergyManagement::Commands::CancelRequest::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + expectedValues:expectedValues + expectedValueInterval:expectedValueIntervalMs + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} + - (NSDictionary * _Nullable)readAttributeESATypeWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDeviceEnergyManagementID) attributeID:@(MTRAttributeIDTypeClusterDeviceEnergyManagementAttributeESATypeID) params:params]; @@ -9770,6 +9801,11 @@ - (void)requestConstraintBasedForecastWithParams:(MTRDeviceEnergyManagementClust return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDeviceEnergyManagementID) attributeID:@(MTRAttributeIDTypeClusterDeviceEnergyManagementAttributeForecastID) params:params]; } +- (NSDictionary * _Nullable)readAttributeOptOutStateWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDeviceEnergyManagementID) attributeID:@(MTRAttributeIDTypeClusterDeviceEnergyManagementAttributeOptOutStateID) params:params]; +} + - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDeviceEnergyManagementID) attributeID:@(MTRAttributeIDTypeClusterDeviceEnergyManagementAttributeGeneratedCommandListID) params:params]; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h index 1656beb4969d85..968322f3f3ff47 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h @@ -5639,6 +5639,8 @@ MTR_PROVISIONALLY_AVAILABLE @property (nonatomic, copy) NSNumber * _Nonnull power MTR_PROVISIONALLY_AVAILABLE; @property (nonatomic, copy) NSNumber * _Nonnull duration MTR_PROVISIONALLY_AVAILABLE; + +@property (nonatomic, copy) NSNumber * _Nonnull cause MTR_PROVISIONALLY_AVAILABLE; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -5697,6 +5699,8 @@ MTR_PROVISIONALLY_AVAILABLE @interface MTRDeviceEnergyManagementClusterStartTimeAdjustRequestParams : NSObject @property (nonatomic, copy) NSNumber * _Nonnull requestedStartTime MTR_PROVISIONALLY_AVAILABLE; + +@property (nonatomic, copy) NSNumber * _Nonnull cause MTR_PROVISIONALLY_AVAILABLE; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -5727,6 +5731,8 @@ MTR_PROVISIONALLY_AVAILABLE @interface MTRDeviceEnergyManagementClusterPauseRequestParams : NSObject @property (nonatomic, copy) NSNumber * _Nonnull duration MTR_PROVISIONALLY_AVAILABLE; + +@property (nonatomic, copy) NSNumber * _Nonnull cause MTR_PROVISIONALLY_AVAILABLE; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -5787,6 +5793,8 @@ MTR_PROVISIONALLY_AVAILABLE @property (nonatomic, copy) NSNumber * _Nonnull forecastId MTR_PROVISIONALLY_AVAILABLE; @property (nonatomic, copy) NSArray * _Nonnull slotAdjustments MTR_PROVISIONALLY_AVAILABLE; + +@property (nonatomic, copy) NSNumber * _Nonnull cause MTR_PROVISIONALLY_AVAILABLE; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -5817,6 +5825,36 @@ MTR_PROVISIONALLY_AVAILABLE @interface MTRDeviceEnergyManagementClusterRequestConstraintBasedForecastParams : NSObject @property (nonatomic, copy) NSArray * _Nonnull constraints MTR_PROVISIONALLY_AVAILABLE; + +@property (nonatomic, copy) NSNumber * _Nonnull cause MTR_PROVISIONALLY_AVAILABLE; +/** + * Controls whether the command is a timed command (using Timed Invoke). + * + * If nil (the default value), a regular invoke is done for commands that do + * not require a timed invoke and a timed invoke with some default timed request + * timeout is done for commands that require a timed invoke. + * + * If not nil, a timed invoke is done, with the provided value used as the timed + * request timeout. The value should be chosen small enough to provide the + * desired security properties but large enough that it will allow a round-trip + * from the sever to the client (for the status response and actual invoke + * request) within the timeout window. + * + */ +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; + +/** + * Controls how much time, in seconds, we will allow for the server to process the command. + * + * The command will then time out if that much time, plus an allowance for retransmits due to network failures, passes. + * + * If nil, the framework will try to select an appropriate timeout value itself. + */ +@property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; +@end + +MTR_PROVISIONALLY_AVAILABLE +@interface MTRDeviceEnergyManagementClusterCancelRequestParams : NSObject /** * Controls whether the command is a timed command (using Timed Invoke). * diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm index a1e41d3407a968..e19b1ee4477e4d 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm @@ -15903,6 +15903,8 @@ - (instancetype)init _power = @(0); _duration = @(0); + + _cause = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -15915,6 +15917,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.power = self.power; other.duration = self.duration; + other.cause = self.cause; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -15923,7 +15926,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: power:%@; duration:%@; >", NSStringFromClass([self class]), _power, _duration]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: power:%@; duration:%@; cause:%@; >", NSStringFromClass([self class]), _power, _duration, _cause]; return descriptionString; } @@ -15941,6 +15944,9 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { encodableStruct.duration = self.duration.unsignedIntValue; } + { + encodableStruct.cause = static_cast>(self.cause.unsignedCharValue); + } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { @@ -16059,6 +16065,8 @@ - (instancetype)init if (self = [super init]) { _requestedStartTime = @(0); + + _cause = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -16070,6 +16078,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; auto other = [[MTRDeviceEnergyManagementClusterStartTimeAdjustRequestParams alloc] init]; other.requestedStartTime = self.requestedStartTime; + other.cause = self.cause; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -16078,7 +16087,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: requestedStartTime:%@; >", NSStringFromClass([self class]), _requestedStartTime]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: requestedStartTime:%@; cause:%@; >", NSStringFromClass([self class]), _requestedStartTime, _cause]; return descriptionString; } @@ -16093,6 +16102,9 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { encodableStruct.requestedStartTime = self.requestedStartTime.unsignedIntValue; } + { + encodableStruct.cause = static_cast>(self.cause.unsignedCharValue); + } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { @@ -16138,6 +16150,8 @@ - (instancetype)init if (self = [super init]) { _duration = @(0); + + _cause = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -16149,6 +16163,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; auto other = [[MTRDeviceEnergyManagementClusterPauseRequestParams alloc] init]; other.duration = self.duration; + other.cause = self.cause; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -16157,7 +16172,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: duration:%@; >", NSStringFromClass([self class]), _duration]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: duration:%@; cause:%@; >", NSStringFromClass([self class]), _duration, _cause]; return descriptionString; } @@ -16172,6 +16187,9 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { encodableStruct.duration = self.duration.unsignedIntValue; } + { + encodableStruct.cause = static_cast>(self.cause.unsignedCharValue); + } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { @@ -16292,6 +16310,8 @@ - (instancetype)init _forecastId = @(0); _slotAdjustments = [NSArray array]; + + _cause = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -16304,6 +16324,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.forecastId = self.forecastId; other.slotAdjustments = self.slotAdjustments; + other.cause = self.cause; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -16312,7 +16333,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: forecastId:%@; slotAdjustments:%@; >", NSStringFromClass([self class]), _forecastId, _slotAdjustments]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: forecastId:%@; slotAdjustments:%@; cause:%@; >", NSStringFromClass([self class]), _forecastId, _slotAdjustments, _cause]; return descriptionString; } @@ -16353,6 +16374,9 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } } } + { + encodableStruct.cause = static_cast>(self.cause.unsignedCharValue); + } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { @@ -16398,6 +16422,8 @@ - (instancetype)init if (self = [super init]) { _constraints = [NSArray array]; + + _cause = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -16409,6 +16435,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; auto other = [[MTRDeviceEnergyManagementClusterRequestConstraintBasedForecastParams alloc] init]; other.constraints = self.constraints; + other.cause = self.cause; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -16417,7 +16444,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: constraints:%@; >", NSStringFromClass([self class]), _constraints]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: constraints:%@; cause:%@; >", NSStringFromClass([self class]), _constraints, _cause]; return descriptionString; } @@ -16466,6 +16493,82 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } } } + { + encodableStruct.cause = static_cast>(self.cause.unsignedCharValue); + } + + auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); + if (buffer.IsNull()) { + return CHIP_ERROR_NO_MEMORY; + } + + chip::System::PacketBufferTLVWriter writer; + // Commands never need chained buffers, since they cannot be chunked. + writer.Init(std::move(buffer), /* useChainedBuffers = */ false); + + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::AnonymousTag(), encodableStruct)); + + ReturnErrorOnFailure(writer.Finalize(&buffer)); + + reader.Init(std::move(buffer)); + return reader.Next(chip::TLV::kTLVType_Structure, chip::TLV::AnonymousTag()); +} + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error +{ + chip::System::PacketBufferTLVReader reader; + CHIP_ERROR err = [self _encodeToTLVReader:reader]; + if (err != CHIP_NO_ERROR) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:err]; + } + return nil; + } + + auto decodedObj = MTRDecodeDataValueDictionaryFromCHIPTLV(&reader); + if (decodedObj == nil) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]; + } + } + return decodedObj; +} +@end + +@implementation MTRDeviceEnergyManagementClusterCancelRequestParams +- (instancetype)init +{ + if (self = [super init]) { + _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTRDeviceEnergyManagementClusterCancelRequestParams alloc] init]; + + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; + return descriptionString; +} + +@end + +@implementation MTRDeviceEnergyManagementClusterCancelRequestParams (InternalMethods) + +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +{ + chip::app::Clusters::DeviceEnergyManagement::Commands::CancelRequest::Type encodableStruct; + ListFreer listFreer; auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloads_Internal.h b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloads_Internal.h index 7b33d80c72c54b..8f2f5b835c45f2 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloads_Internal.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloads_Internal.h @@ -1096,6 +1096,12 @@ NS_ASSUME_NONNULL_BEGIN @end +@interface MTRDeviceEnergyManagementClusterCancelRequestParams (InternalMethods) + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; + +@end + @interface MTREnergyEVSEClusterGetTargetsResponseParams (InternalMethods) - (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::EnergyEvse::Commands::GetTargetsResponse::DecodableType &)decodableStruct; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTREventTLVValueDecoder.mm b/src/darwin/Framework/CHIP/zap-generated/MTREventTLVValueDecoder.mm index 119031161f5195..bd2e8e5b3470b5 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTREventTLVValueDecoder.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTREventTLVValueDecoder.mm @@ -2863,6 +2863,12 @@ static id _Nullable DecodeEventPayloadForDeviceEnergyManagementCluster(EventId a __auto_type * value = [MTRDeviceEnergyManagementClusterResumedEvent new]; + do { + NSNumber * _Nonnull memberValue; + memberValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue.cause)]; + value.cause = memberValue; + } while (0); + return value; } default: { diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h index d57f138fa53256..0244d93dcea469 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h @@ -1206,9 +1206,9 @@ MTR_PROVISIONALLY_AVAILABLE @property (nonatomic, copy) NSNumber * _Nonnull defaultDuration MTR_PROVISIONALLY_AVAILABLE; @property (nonatomic, copy) NSNumber * _Nonnull elapsedSlotTime MTR_PROVISIONALLY_AVAILABLE; @property (nonatomic, copy) NSNumber * _Nonnull remainingSlotTime MTR_PROVISIONALLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull slotIsPauseable MTR_PROVISIONALLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull minPauseDuration MTR_PROVISIONALLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull maxPauseDuration MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable slotIsPauseable MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable minPauseDuration MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable maxPauseDuration MTR_PROVISIONALLY_AVAILABLE; @property (nonatomic, copy) NSNumber * _Nullable manufacturerESAState MTR_PROVISIONALLY_AVAILABLE; @property (nonatomic, copy) NSNumber * _Nullable nominalPower MTR_PROVISIONALLY_AVAILABLE; @property (nonatomic, copy) NSNumber * _Nullable minPower MTR_PROVISIONALLY_AVAILABLE; @@ -1231,6 +1231,7 @@ MTR_PROVISIONALLY_AVAILABLE @property (nonatomic, copy) NSNumber * _Nullable latestEndTime MTR_PROVISIONALLY_AVAILABLE; @property (nonatomic, copy) NSNumber * _Nonnull isPauseable MTR_PROVISIONALLY_AVAILABLE; @property (nonatomic, copy) NSArray * _Nonnull slots MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull forecastUpdateReason MTR_PROVISIONALLY_AVAILABLE; @end MTR_PROVISIONALLY_AVAILABLE @@ -1274,6 +1275,7 @@ MTR_PROVISIONALLY_AVAILABLE MTR_PROVISIONALLY_AVAILABLE @interface MTRDeviceEnergyManagementClusterResumedEvent : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull cause MTR_PROVISIONALLY_AVAILABLE; @end MTR_PROVISIONALLY_AVAILABLE diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm index 810e778412f5c8..22ee409b968bf3 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm @@ -4887,11 +4887,11 @@ - (instancetype)init _remainingSlotTime = @(0); - _slotIsPauseable = @(0); + _slotIsPauseable = nil; - _minPauseDuration = @(0); + _minPauseDuration = nil; - _maxPauseDuration = @(0); + _maxPauseDuration = nil; _manufacturerESAState = nil; @@ -4970,6 +4970,8 @@ - (instancetype)init _isPauseable = @(0); _slots = [NSArray array]; + + _forecastUpdateReason = @(0); } return self; } @@ -4986,13 +4988,14 @@ - (id)copyWithZone:(NSZone * _Nullable)zone other.latestEndTime = self.latestEndTime; other.isPauseable = self.isPauseable; other.slots = self.slots; + other.forecastUpdateReason = self.forecastUpdateReason; return other; } - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: forecastId:%@; activeSlotNumber:%@; startTime:%@; endTime:%@; earliestStartTime:%@; latestEndTime:%@; isPauseable:%@; slots:%@; >", NSStringFromClass([self class]), _forecastId, _activeSlotNumber, _startTime, _endTime, _earliestStartTime, _latestEndTime, _isPauseable, _slots]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: forecastId:%@; activeSlotNumber:%@; startTime:%@; endTime:%@; earliestStartTime:%@; latestEndTime:%@; isPauseable:%@; slots:%@; forecastUpdateReason:%@; >", NSStringFromClass([self class]), _forecastId, _activeSlotNumber, _startTime, _endTime, _earliestStartTime, _latestEndTime, _isPauseable, _slots, _forecastUpdateReason]; return descriptionString; } @@ -5189,6 +5192,8 @@ @implementation MTRDeviceEnergyManagementClusterResumedEvent - (instancetype)init { if (self = [super init]) { + + _cause = @(0); } return self; } @@ -5197,12 +5202,14 @@ - (id)copyWithZone:(NSZone * _Nullable)zone { auto other = [[MTRDeviceEnergyManagementClusterResumedEvent alloc] init]; + other.cause = self.cause; + return other; } - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: cause:%@; >", NSStringFromClass([self class]), _cause]; return descriptionString; } diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-enums-check.h b/zzz_generated/app-common/app-common/zap-generated/cluster-enums-check.h index fa83804118b175..97ea4eeb3ce0ac 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-enums-check.h +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-enums-check.h @@ -1641,6 +1641,18 @@ static auto __attribute__((unused)) EnsureKnownEnumValue(DemandResponseLoadContr } } +static auto __attribute__((unused)) EnsureKnownEnumValue(DeviceEnergyManagement::AdjustmentCauseEnum val) +{ + using EnumType = DeviceEnergyManagement::AdjustmentCauseEnum; + switch (val) + { + case EnumType::kLocalOptimization: + case EnumType::kGridOptimization: + return val; + default: + return static_cast(2); + } +} static auto __attribute__((unused)) EnsureKnownEnumValue(DeviceEnergyManagement::CauseEnum val) { using EnumType = DeviceEnergyManagement::CauseEnum; @@ -1650,9 +1662,10 @@ static auto __attribute__((unused)) EnsureKnownEnumValue(DeviceEnergyManagement: case EnumType::kOffline: case EnumType::kFault: case EnumType::kUserOptOut: + case EnumType::kCancelled: return val; default: - return static_cast(4); + return static_cast(5); } } static auto __attribute__((unused)) EnsureKnownEnumValue(DeviceEnergyManagement::CostTypeEnum val) @@ -1677,12 +1690,11 @@ static auto __attribute__((unused)) EnsureKnownEnumValue(DeviceEnergyManagement: case EnumType::kOffline: case EnumType::kOnline: case EnumType::kFault: - case EnumType::kUserOptOut: case EnumType::kPowerAdjustActive: case EnumType::kPaused: return val; default: - return static_cast(6); + return static_cast(5); } } static auto __attribute__((unused)) EnsureKnownEnumValue(DeviceEnergyManagement::ESATypeEnum val) @@ -1710,6 +1722,33 @@ static auto __attribute__((unused)) EnsureKnownEnumValue(DeviceEnergyManagement: return static_cast(14); } } +static auto __attribute__((unused)) EnsureKnownEnumValue(DeviceEnergyManagement::ForecastUpdateReasonEnum val) +{ + using EnumType = DeviceEnergyManagement::ForecastUpdateReasonEnum; + switch (val) + { + case EnumType::kInternalOptimization: + case EnumType::kLocalOptimization: + case EnumType::kGridOptimization: + return val; + default: + return static_cast(3); + } +} +static auto __attribute__((unused)) EnsureKnownEnumValue(DeviceEnergyManagement::OptOutStateEnum val) +{ + using EnumType = DeviceEnergyManagement::OptOutStateEnum; + switch (val) + { + case EnumType::kNoOptOut: + case EnumType::kLocalOptOut: + case EnumType::kGridOptOut: + case EnumType::kOptOut: + return val; + default: + return static_cast(4); + } +} static auto __attribute__((unused)) EnsureKnownEnumValue(EnergyEvse::EnergyTransferStoppedReasonEnum val) { diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h b/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h index 49b66ec661f0eb..4dd5c7f4db2735 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h @@ -2380,6 +2380,18 @@ enum class Feature : uint32_t namespace DeviceEnergyManagement { +// Enum for AdjustmentCauseEnum +enum class AdjustmentCauseEnum : uint8_t +{ + kLocalOptimization = 0x00, + kGridOptimization = 0x01, + // All received enum values that are not listed above will be mapped + // to kUnknownEnumValue. This is a helper enum value that should only + // be used by code to process how it handles receiving and unknown + // enum value. This specific should never be transmitted. + kUnknownEnumValue = 2, +}; + // Enum for CauseEnum enum class CauseEnum : uint8_t { @@ -2387,11 +2399,12 @@ enum class CauseEnum : uint8_t kOffline = 0x01, kFault = 0x02, kUserOptOut = 0x03, + kCancelled = 0x04, // All received enum values that are not listed above will be mapped // to kUnknownEnumValue. This is a helper enum value that should only // be used by code to process how it handles receiving and unknown // enum value. This specific should never be transmitted. - kUnknownEnumValue = 4, + kUnknownEnumValue = 5, }; // Enum for CostTypeEnum @@ -2414,14 +2427,13 @@ enum class ESAStateEnum : uint8_t kOffline = 0x00, kOnline = 0x01, kFault = 0x02, - kUserOptOut = 0x03, - kPowerAdjustActive = 0x04, - kPaused = 0x05, + kPowerAdjustActive = 0x03, + kPaused = 0x04, // All received enum values that are not listed above will be mapped // to kUnknownEnumValue. This is a helper enum value that should only // be used by code to process how it handles receiving and unknown // enum value. This specific should never be transmitted. - kUnknownEnumValue = 6, + kUnknownEnumValue = 5, }; // Enum for ESATypeEnum @@ -2449,13 +2461,43 @@ enum class ESATypeEnum : uint8_t kUnknownEnumValue = 14, }; +// Enum for ForecastUpdateReasonEnum +enum class ForecastUpdateReasonEnum : uint8_t +{ + kInternalOptimization = 0x00, + kLocalOptimization = 0x01, + kGridOptimization = 0x02, + // All received enum values that are not listed above will be mapped + // to kUnknownEnumValue. This is a helper enum value that should only + // be used by code to process how it handles receiving and unknown + // enum value. This specific should never be transmitted. + kUnknownEnumValue = 3, +}; + +// Enum for OptOutStateEnum +enum class OptOutStateEnum : uint8_t +{ + kNoOptOut = 0x00, + kLocalOptOut = 0x01, + kGridOptOut = 0x02, + kOptOut = 0x03, + // All received enum values that are not listed above will be mapped + // to kUnknownEnumValue. This is a helper enum value that should only + // be used by code to process how it handles receiving and unknown + // enum value. This specific should never be transmitted. + kUnknownEnumValue = 4, +}; + // Bitmap for Feature enum class Feature : uint32_t { - kPowerAdjustment = 0x1, - kPowerForecastReporting = 0x2, - kStateForecastReporting = 0x4, - kForecastAdjustment = 0x8, + kPowerAdjustment = 0x1, + kPowerForecastReporting = 0x2, + kStateForecastReporting = 0x4, + kStartTimeAdjustment = 0x8, + kPausable = 0x10, + kForecastAdjustment = 0x20, + kConstraintBasedAdjustment = 0x40, }; } // namespace DeviceEnergyManagement diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp index a0d28f1a74cb05..7d617579e01e93 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp @@ -15262,6 +15262,7 @@ CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const encoder.Encode(to_underlying(Fields::kLatestEndTime), latestEndTime); encoder.Encode(to_underlying(Fields::kIsPauseable), isPauseable); encoder.Encode(to_underlying(Fields::kSlots), slots); + encoder.Encode(to_underlying(Fields::kForecastUpdateReason), forecastUpdateReason); return encoder.Finalize(); } @@ -15311,6 +15312,10 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) { err = DataModel::Decode(reader, slots); } + else if (__context_tag == to_underlying(Fields::kForecastUpdateReason)) + { + err = DataModel::Decode(reader, forecastUpdateReason); + } else { } @@ -15482,6 +15487,7 @@ CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; encoder.Encode(to_underlying(Fields::kPower), power); encoder.Encode(to_underlying(Fields::kDuration), duration); + encoder.Encode(to_underlying(Fields::kCause), cause); return encoder.Finalize(); } @@ -15507,6 +15513,10 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) { err = DataModel::Decode(reader, duration); } + else if (__context_tag == to_underlying(Fields::kCause)) + { + err = DataModel::Decode(reader, cause); + } else { } @@ -15540,6 +15550,7 @@ CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; encoder.Encode(to_underlying(Fields::kRequestedStartTime), requestedStartTime); + encoder.Encode(to_underlying(Fields::kCause), cause); return encoder.Finalize(); } @@ -15561,6 +15572,10 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) { err = DataModel::Decode(reader, requestedStartTime); } + else if (__context_tag == to_underlying(Fields::kCause)) + { + err = DataModel::Decode(reader, cause); + } else { } @@ -15574,6 +15589,7 @@ CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; encoder.Encode(to_underlying(Fields::kDuration), duration); + encoder.Encode(to_underlying(Fields::kCause), cause); return encoder.Finalize(); } @@ -15595,6 +15611,10 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) { err = DataModel::Decode(reader, duration); } + else if (__context_tag == to_underlying(Fields::kCause)) + { + err = DataModel::Decode(reader, cause); + } else { } @@ -15629,6 +15649,7 @@ CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; encoder.Encode(to_underlying(Fields::kForecastId), forecastId); encoder.Encode(to_underlying(Fields::kSlotAdjustments), slotAdjustments); + encoder.Encode(to_underlying(Fields::kCause), cause); return encoder.Finalize(); } @@ -15654,6 +15675,10 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) { err = DataModel::Decode(reader, slotAdjustments); } + else if (__context_tag == to_underlying(Fields::kCause)) + { + err = DataModel::Decode(reader, cause); + } else { } @@ -15667,6 +15692,7 @@ CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; encoder.Encode(to_underlying(Fields::kConstraints), constraints); + encoder.Encode(to_underlying(Fields::kCause), cause); return encoder.Finalize(); } @@ -15688,6 +15714,10 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) { err = DataModel::Decode(reader, constraints); } + else if (__context_tag == to_underlying(Fields::kCause)) + { + err = DataModel::Decode(reader, cause); + } else { } @@ -15696,6 +15726,26 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } } // namespace RequestConstraintBasedForecast. +namespace CancelRequest { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + return encoder.Finalize(); +} + +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +{ + detail::StructDecodeIterator __iterator(reader); + while (true) + { + auto __element = __iterator.Next(); + if (std::holds_alternative(__element)) + { + return std::get(__element); + } + } +} +} // namespace CancelRequest. } // namespace Commands namespace Attributes { @@ -15717,6 +15767,8 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre return DataModel::Decode(reader, powerAdjustmentCapability); case Attributes::Forecast::TypeInfo::GetAttributeId(): return DataModel::Decode(reader, forecast); + case Attributes::OptOutState::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, optOutState); case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): return DataModel::Decode(reader, generatedCommandList); case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): @@ -15828,6 +15880,7 @@ CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kCause), cause)); return aWriter.EndContainer(outer); } @@ -15841,6 +15894,19 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) { return std::get(__element); } + + CHIP_ERROR err = CHIP_NO_ERROR; + const uint8_t __context_tag = std::get(__element); + + if (__context_tag == to_underlying(Fields::kCause)) + { + err = DataModel::Decode(reader, cause); + } + else + { + } + + ReturnErrorOnFailure(err); } } } // namespace Resumed. diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h index f85e0335903656..aa3effd58f758e 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h @@ -21346,9 +21346,9 @@ struct Type uint32_t defaultDuration = static_cast(0); uint32_t elapsedSlotTime = static_cast(0); uint32_t remainingSlotTime = static_cast(0); - bool slotIsPauseable = static_cast(0); - uint32_t minPauseDuration = static_cast(0); - uint32_t maxPauseDuration = static_cast(0); + Optional slotIsPauseable; + Optional minPauseDuration; + Optional maxPauseDuration; Optional manufacturerESAState; Optional nominalPower; Optional minPower; @@ -21373,9 +21373,9 @@ struct DecodableType uint32_t defaultDuration = static_cast(0); uint32_t elapsedSlotTime = static_cast(0); uint32_t remainingSlotTime = static_cast(0); - bool slotIsPauseable = static_cast(0); - uint32_t minPauseDuration = static_cast(0); - uint32_t maxPauseDuration = static_cast(0); + Optional slotIsPauseable; + Optional minPauseDuration; + Optional maxPauseDuration; Optional manufacturerESAState; Optional nominalPower; Optional minPower; @@ -21396,14 +21396,15 @@ struct DecodableType namespace ForecastStruct { enum class Fields : uint8_t { - kForecastId = 0, - kActiveSlotNumber = 1, - kStartTime = 2, - kEndTime = 3, - kEarliestStartTime = 4, - kLatestEndTime = 5, - kIsPauseable = 6, - kSlots = 7, + kForecastId = 0, + kActiveSlotNumber = 1, + kStartTime = 2, + kEndTime = 3, + kEarliestStartTime = 4, + kLatestEndTime = 5, + kIsPauseable = 6, + kSlots = 7, + kForecastUpdateReason = 8, }; struct Type @@ -21417,6 +21418,7 @@ struct Type Optional latestEndTime; bool isPauseable = static_cast(0); DataModel::List slots; + ForecastUpdateReasonEnum forecastUpdateReason = static_cast(0); static constexpr bool kIsFabricScoped = false; @@ -21434,6 +21436,7 @@ struct DecodableType Optional latestEndTime; bool isPauseable = static_cast(0); DataModel::DecodableList slots; + ForecastUpdateReasonEnum forecastUpdateReason = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); @@ -21562,6 +21565,11 @@ struct Type; struct DecodableType; } // namespace RequestConstraintBasedForecast +namespace CancelRequest { +struct Type; +struct DecodableType; +} // namespace CancelRequest + } // namespace Commands namespace Commands { @@ -21570,6 +21578,7 @@ enum class Fields : uint8_t { kPower = 0, kDuration = 1, + kCause = 2, }; struct Type @@ -21579,8 +21588,9 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::PowerAdjustRequest::Id; } static constexpr ClusterId GetClusterId() { return Clusters::DeviceEnergyManagement::Id; } - int64_t power = static_cast(0); - uint32_t duration = static_cast(0); + int64_t power = static_cast(0); + uint32_t duration = static_cast(0); + AdjustmentCauseEnum cause = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; @@ -21595,8 +21605,9 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::PowerAdjustRequest::Id; } static constexpr ClusterId GetClusterId() { return Clusters::DeviceEnergyManagement::Id; } - int64_t power = static_cast(0); - uint32_t duration = static_cast(0); + int64_t power = static_cast(0); + uint32_t duration = static_cast(0); + AdjustmentCauseEnum cause = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace PowerAdjustRequest @@ -21632,6 +21643,7 @@ namespace StartTimeAdjustRequest { enum class Fields : uint8_t { kRequestedStartTime = 0, + kCause = 1, }; struct Type @@ -21642,6 +21654,7 @@ struct Type static constexpr ClusterId GetClusterId() { return Clusters::DeviceEnergyManagement::Id; } uint32_t requestedStartTime = static_cast(0); + AdjustmentCauseEnum cause = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; @@ -21657,6 +21670,7 @@ struct DecodableType static constexpr ClusterId GetClusterId() { return Clusters::DeviceEnergyManagement::Id; } uint32_t requestedStartTime = static_cast(0); + AdjustmentCauseEnum cause = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace StartTimeAdjustRequest @@ -21664,6 +21678,7 @@ namespace PauseRequest { enum class Fields : uint8_t { kDuration = 0, + kCause = 1, }; struct Type @@ -21673,7 +21688,8 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::PauseRequest::Id; } static constexpr ClusterId GetClusterId() { return Clusters::DeviceEnergyManagement::Id; } - uint32_t duration = static_cast(0); + uint32_t duration = static_cast(0); + AdjustmentCauseEnum cause = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; @@ -21688,7 +21704,8 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::PauseRequest::Id; } static constexpr ClusterId GetClusterId() { return Clusters::DeviceEnergyManagement::Id; } - uint32_t duration = static_cast(0); + uint32_t duration = static_cast(0); + AdjustmentCauseEnum cause = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace PauseRequest @@ -21725,6 +21742,7 @@ enum class Fields : uint8_t { kForecastId = 0, kSlotAdjustments = 1, + kCause = 2, }; struct Type @@ -21736,6 +21754,7 @@ struct Type uint32_t forecastId = static_cast(0); DataModel::List slotAdjustments; + AdjustmentCauseEnum cause = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; @@ -21752,6 +21771,7 @@ struct DecodableType uint32_t forecastId = static_cast(0); DataModel::DecodableList slotAdjustments; + AdjustmentCauseEnum cause = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace ModifyForecastRequest @@ -21759,6 +21779,7 @@ namespace RequestConstraintBasedForecast { enum class Fields : uint8_t { kConstraints = 0, + kCause = 1, }; struct Type @@ -21769,6 +21790,7 @@ struct Type static constexpr ClusterId GetClusterId() { return Clusters::DeviceEnergyManagement::Id; } DataModel::List constraints; + AdjustmentCauseEnum cause = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; @@ -21784,9 +21806,38 @@ struct DecodableType static constexpr ClusterId GetClusterId() { return Clusters::DeviceEnergyManagement::Id; } DataModel::DecodableList constraints; + AdjustmentCauseEnum cause = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace RequestConstraintBasedForecast +namespace CancelRequest { +enum class Fields : uint8_t +{ +}; + +struct Type +{ +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::CancelRequest::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DeviceEnergyManagement::Id; } + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = DataModel::NullObjectType; + + static constexpr bool MustUseTimedInvoke() { return false; } +}; + +struct DecodableType +{ +public: + static constexpr CommandId GetCommandId() { return Commands::CancelRequest::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DeviceEnergyManagement::Id; } + + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace CancelRequest } // namespace Commands namespace Attributes { @@ -21880,6 +21931,18 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace Forecast +namespace OptOutState { +struct TypeInfo +{ + using Type = chip::app::Clusters::DeviceEnergyManagement::OptOutStateEnum; + using DecodableType = chip::app::Clusters::DeviceEnergyManagement::OptOutStateEnum; + using DecodableArgType = chip::app::Clusters::DeviceEnergyManagement::OptOutStateEnum; + + static constexpr ClusterId GetClusterId() { return Clusters::DeviceEnergyManagement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::OptOutState::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace OptOutState namespace GeneratedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo { @@ -21934,6 +21997,8 @@ struct TypeInfo Attributes::AbsMaxPower::TypeInfo::DecodableType absMaxPower = static_cast(0); Attributes::PowerAdjustmentCapability::TypeInfo::DecodableType powerAdjustmentCapability; Attributes::Forecast::TypeInfo::DecodableType forecast; + Attributes::OptOutState::TypeInfo::DecodableType optOutState = + static_cast(0); Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; Attributes::EventList::TypeInfo::DecodableType eventList; @@ -22044,6 +22109,7 @@ static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; enum class Fields : uint8_t { + kCause = 0, }; struct Type @@ -22054,6 +22120,8 @@ struct Type static constexpr ClusterId GetClusterId() { return Clusters::DeviceEnergyManagement::Id; } static constexpr bool kIsFabricScoped = false; + CauseEnum cause = static_cast(0); + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; @@ -22064,6 +22132,8 @@ struct DecodableType static constexpr EventId GetEventId() { return Events::Resumed::Id; } static constexpr ClusterId GetClusterId() { return Clusters::DeviceEnergyManagement::Id; } + CauseEnum cause = static_cast(0); + CHIP_ERROR Decode(TLV::TLVReader & reader); }; } // namespace Resumed diff --git a/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h b/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h index f2ce8f91f96885..1e237a2601cfd8 100644 --- a/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h +++ b/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h @@ -3812,6 +3812,10 @@ namespace Forecast { static constexpr AttributeId Id = 0x00000006; } // namespace Forecast +namespace OptOutState { +static constexpr AttributeId Id = 0x00000007; +} // namespace OptOutState + namespace GeneratedCommandList { static constexpr AttributeId Id = Globals::Attributes::GeneratedCommandList::Id; } // namespace GeneratedCommandList diff --git a/zzz_generated/app-common/app-common/zap-generated/ids/Commands.h b/zzz_generated/app-common/app-common/zap-generated/ids/Commands.h index 76ed4e215d1092..f5607a6ba0e910 100644 --- a/zzz_generated/app-common/app-common/zap-generated/ids/Commands.h +++ b/zzz_generated/app-common/app-common/zap-generated/ids/Commands.h @@ -1002,6 +1002,10 @@ namespace RequestConstraintBasedForecast { static constexpr CommandId Id = 0x00000006; } // namespace RequestConstraintBasedForecast +namespace CancelRequest { +static constexpr CommandId Id = 0x00000007; +} // namespace CancelRequest + } // namespace Commands } // namespace DeviceEnergyManagement diff --git a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h index 12c9198618fac5..2b03b673a1292a 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h @@ -6896,6 +6896,7 @@ class DemandResponseLoadControlClearLoadControlEventsRequest : public ClusterCom | * ResumeRequest | 0x04 | | * ModifyForecastRequest | 0x05 | | * RequestConstraintBasedForecast | 0x06 | +| * CancelRequest | 0x07 | |------------------------------------------------------------------------------| | Attributes: | | | * ESAType | 0x0000 | @@ -6905,6 +6906,7 @@ class DemandResponseLoadControlClearLoadControlEventsRequest : public ClusterCom | * AbsMaxPower | 0x0004 | | * PowerAdjustmentCapability | 0x0005 | | * Forecast | 0x0006 | +| * OptOutState | 0x0007 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -6930,6 +6932,7 @@ class DeviceEnergyManagementPowerAdjustRequest : public ClusterCommand { AddArgument("Power", INT64_MIN, INT64_MAX, &mRequest.power); AddArgument("Duration", 0, UINT32_MAX, &mRequest.duration); + AddArgument("Cause", 0, UINT8_MAX, &mRequest.cause); ClusterCommand::AddArguments(); } @@ -7005,6 +7008,7 @@ class DeviceEnergyManagementStartTimeAdjustRequest : public ClusterCommand ClusterCommand("start-time-adjust-request", credsIssuerConfig) { AddArgument("RequestedStartTime", 0, UINT32_MAX, &mRequest.requestedStartTime); + AddArgument("Cause", 0, UINT8_MAX, &mRequest.cause); ClusterCommand::AddArguments(); } @@ -7043,6 +7047,7 @@ class DeviceEnergyManagementPauseRequest : public ClusterCommand ClusterCommand("pause-request", credsIssuerConfig) { AddArgument("Duration", 0, UINT32_MAX, &mRequest.duration); + AddArgument("Cause", 0, UINT8_MAX, &mRequest.cause); ClusterCommand::AddArguments(); } @@ -7119,6 +7124,7 @@ class DeviceEnergyManagementModifyForecastRequest : public ClusterCommand { AddArgument("ForecastId", 0, UINT32_MAX, &mRequest.forecastId); AddArgument("SlotAdjustments", &mComplex_SlotAdjustments); + AddArgument("Cause", 0, UINT8_MAX, &mRequest.cause); ClusterCommand::AddArguments(); } @@ -7160,6 +7166,7 @@ class DeviceEnergyManagementRequestConstraintBasedForecast : public ClusterComma ClusterCommand("request-constraint-based-forecast", credsIssuerConfig), mComplex_Constraints(&mRequest.constraints) { AddArgument("Constraints", &mComplex_Constraints); + AddArgument("Cause", 0, UINT8_MAX, &mRequest.cause); ClusterCommand::AddArguments(); } @@ -7193,6 +7200,43 @@ class DeviceEnergyManagementRequestConstraintBasedForecast : public ClusterComma mComplex_Constraints; }; +/* + * Command CancelRequest + */ +class DeviceEnergyManagementCancelRequest : public ClusterCommand +{ +public: + DeviceEnergyManagementCancelRequest(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("cancel-request", credsIssuerConfig) + { + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagement::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DeviceEnergyManagement::Commands::CancelRequest::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); + } + + CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagement::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DeviceEnergyManagement::Commands::CancelRequest::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); + } + +private: + chip::app::Clusters::DeviceEnergyManagement::Commands::CancelRequest::Type mRequest; +}; + /*----------------------------------------------------------------------------*\ | Cluster EnergyEvse | 0x0099 | |------------------------------------------------------------------------------| @@ -20135,6 +20179,7 @@ void registerClusterDeviceEnergyManagement(Commands & commands, CredentialIssuer make_unique(credsIssuerConfig), // make_unique(credsIssuerConfig), // make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // // // Attributes // @@ -20147,6 +20192,7 @@ void registerClusterDeviceEnergyManagement(Commands & commands, CredentialIssuer make_unique(Id, "power-adjustment-capability", Attributes::PowerAdjustmentCapability::Id, credsIssuerConfig), // make_unique(Id, "forecast", Attributes::Forecast::Id, credsIssuerConfig), // + make_unique(Id, "opt-out-state", Attributes::OptOutState::Id, credsIssuerConfig), // make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), // @@ -20171,6 +20217,8 @@ void registerClusterDeviceEnergyManagement(Commands & commands, CredentialIssuer make_unique>>( Id, "forecast", Attributes::Forecast::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>( + Id, "opt-out-state", 0, UINT8_MAX, Attributes::OptOutState::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>>( Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // @@ -20193,6 +20241,7 @@ void registerClusterDeviceEnergyManagement(Commands & commands, CredentialIssuer make_unique(Id, "power-adjustment-capability", Attributes::PowerAdjustmentCapability::Id, credsIssuerConfig), // make_unique(Id, "forecast", Attributes::Forecast::Id, credsIssuerConfig), // + make_unique(Id, "opt-out-state", Attributes::OptOutState::Id, credsIssuerConfig), // make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), // diff --git a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp index 2d016ac47c8996..302cafb0a0b37b 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp +++ b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp @@ -2853,12 +2853,6 @@ CHIP_ERROR ComplexArgumentParser::Setup(const char * label, value.isMember("elapsedSlotTime"))); ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("SlotStruct.remainingSlotTime", "remainingSlotTime", value.isMember("remainingSlotTime"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("SlotStruct.slotIsPauseable", "slotIsPauseable", - value.isMember("slotIsPauseable"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("SlotStruct.minPauseDuration", "minPauseDuration", - value.isMember("minPauseDuration"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("SlotStruct.maxPauseDuration", "maxPauseDuration", - value.isMember("maxPauseDuration"))); char labelWithMember[kMaxLabelLength]; snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "minDuration"); @@ -2881,16 +2875,25 @@ CHIP_ERROR ComplexArgumentParser::Setup(const char * label, ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.remainingSlotTime, value["remainingSlotTime"])); valueCopy.removeMember("remainingSlotTime"); - snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "slotIsPauseable"); - ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.slotIsPauseable, value["slotIsPauseable"])); + if (value.isMember("slotIsPauseable")) + { + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "slotIsPauseable"); + ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.slotIsPauseable, value["slotIsPauseable"])); + } valueCopy.removeMember("slotIsPauseable"); - snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "minPauseDuration"); - ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.minPauseDuration, value["minPauseDuration"])); + if (value.isMember("minPauseDuration")) + { + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "minPauseDuration"); + ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.minPauseDuration, value["minPauseDuration"])); + } valueCopy.removeMember("minPauseDuration"); - snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "maxPauseDuration"); - ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.maxPauseDuration, value["maxPauseDuration"])); + if (value.isMember("maxPauseDuration")) + { + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "maxPauseDuration"); + ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.maxPauseDuration, value["maxPauseDuration"])); + } valueCopy.removeMember("maxPauseDuration"); if (value.isMember("manufacturerESAState")) @@ -3012,6 +3015,8 @@ CHIP_ERROR ComplexArgumentParser::Setup(const char * label, ReturnErrorOnFailure( ComplexArgumentParser::EnsureMemberExist("ForecastStruct.isPauseable", "isPauseable", value.isMember("isPauseable"))); ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("ForecastStruct.slots", "slots", value.isMember("slots"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("ForecastStruct.forecastUpdateReason", "forecastUpdateReason", + value.isMember("forecastUpdateReason"))); char labelWithMember[kMaxLabelLength]; snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "forecastId"); @@ -3052,6 +3057,11 @@ CHIP_ERROR ComplexArgumentParser::Setup(const char * label, ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.slots, value["slots"])); valueCopy.removeMember("slots"); + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "forecastUpdateReason"); + ReturnErrorOnFailure( + ComplexArgumentParser::Setup(labelWithMember, request.forecastUpdateReason, value["forecastUpdateReason"])); + valueCopy.removeMember("forecastUpdateReason"); + return ComplexArgumentParser::EnsureNoMembersRemaining(label, valueCopy); } @@ -3065,6 +3075,7 @@ void ComplexArgumentParser::Finalize(chip::app::Clusters::DeviceEnergyManagement ComplexArgumentParser::Finalize(request.latestEndTime); ComplexArgumentParser::Finalize(request.isPauseable); ComplexArgumentParser::Finalize(request.slots); + ComplexArgumentParser::Finalize(request.forecastUpdateReason); } CHIP_ERROR ComplexArgumentParser::Setup(const char * label, diff --git a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp index 4026dc9e4e0dd3..9967c2f53d4203 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp +++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp @@ -2727,6 +2727,14 @@ DataModelLogger::LogValue(const char * label, size_t indent, return err; } } + { + CHIP_ERROR err = LogValue("ForecastUpdateReason", indent + 1, value.forecastUpdateReason); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'ForecastUpdateReason'"); + return err; + } + } DataModelLogger::LogString(indent, "}"); return CHIP_NO_ERROR; @@ -6071,6 +6079,14 @@ CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, const DeviceEnergyManagement::Events::Resumed::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); + { + CHIP_ERROR err = DataModelLogger::LogValue("Cause", indent + 1, value.cause); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'Cause'"); + return err; + } + } DataModelLogger::LogString(indent, "}"); return CHIP_NO_ERROR; @@ -12281,6 +12297,11 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("Forecast", 1, value); } + case DeviceEnergyManagement::Attributes::OptOutState::Id: { + chip::app::Clusters::DeviceEnergyManagement::OptOutStateEnum value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("OptOutState", 1, value); + } case DeviceEnergyManagement::Attributes::GeneratedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); diff --git a/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h b/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h index 85d892b9960f75..8029dc30320e82 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h @@ -79653,6 +79653,7 @@ class SubscribeAttributeDemandResponseLoadControlClusterRevision : public Subscr | * ResumeRequest | 0x04 | | * ModifyForecastRequest | 0x05 | | * RequestConstraintBasedForecast | 0x06 | +| * CancelRequest | 0x07 | |------------------------------------------------------------------------------| | Attributes: | | | * ESAType | 0x0000 | @@ -79662,6 +79663,7 @@ class SubscribeAttributeDemandResponseLoadControlClusterRevision : public Subscr | * AbsMaxPower | 0x0004 | | * PowerAdjustmentCapability | 0x0005 | | * Forecast | 0x0006 | +| * OptOutState | 0x0007 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -79690,6 +79692,9 @@ class DeviceEnergyManagementPowerAdjustRequest : public ClusterCommand { #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL AddArgument("Duration", 0, UINT32_MAX, &mRequest.duration); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("Cause", 0, UINT8_MAX, &mRequest.cause); #endif // MTR_ENABLE_PROVISIONAL ClusterCommand::AddArguments(); } @@ -79710,6 +79715,9 @@ class DeviceEnergyManagementPowerAdjustRequest : public ClusterCommand { #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL params.duration = [NSNumber numberWithUnsignedInt:mRequest.duration]; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + params.cause = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.cause)]; #endif // MTR_ENABLE_PROVISIONAL uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; @@ -79792,6 +79800,9 @@ class DeviceEnergyManagementStartTimeAdjustRequest : public ClusterCommand { { #if MTR_ENABLE_PROVISIONAL AddArgument("RequestedStartTime", 0, UINT32_MAX, &mRequest.requestedStartTime); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("Cause", 0, UINT8_MAX, &mRequest.cause); #endif // MTR_ENABLE_PROVISIONAL ClusterCommand::AddArguments(); } @@ -79809,6 +79820,9 @@ class DeviceEnergyManagementStartTimeAdjustRequest : public ClusterCommand { params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; #if MTR_ENABLE_PROVISIONAL params.requestedStartTime = [NSNumber numberWithUnsignedInt:mRequest.requestedStartTime]; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + params.cause = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.cause)]; #endif // MTR_ENABLE_PROVISIONAL uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; @@ -79845,6 +79859,9 @@ class DeviceEnergyManagementPauseRequest : public ClusterCommand { { #if MTR_ENABLE_PROVISIONAL AddArgument("Duration", 0, UINT32_MAX, &mRequest.duration); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("Cause", 0, UINT8_MAX, &mRequest.cause); #endif // MTR_ENABLE_PROVISIONAL ClusterCommand::AddArguments(); } @@ -79862,6 +79879,9 @@ class DeviceEnergyManagementPauseRequest : public ClusterCommand { params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; #if MTR_ENABLE_PROVISIONAL params.duration = [NSNumber numberWithUnsignedInt:mRequest.duration]; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + params.cause = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.cause)]; #endif // MTR_ENABLE_PROVISIONAL uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; @@ -79948,6 +79968,9 @@ class DeviceEnergyManagementModifyForecastRequest : public ClusterCommand { #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL AddArgument("SlotAdjustments", &mComplex_SlotAdjustments); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("Cause", 0, UINT8_MAX, &mRequest.cause); #endif // MTR_ENABLE_PROVISIONAL ClusterCommand::AddArguments(); } @@ -79979,6 +80002,9 @@ class DeviceEnergyManagementModifyForecastRequest : public ClusterCommand { } params.slotAdjustments = array_0; } +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + params.cause = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.cause)]; #endif // MTR_ENABLE_PROVISIONAL uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; @@ -80017,6 +80043,9 @@ class DeviceEnergyManagementRequestConstraintBasedForecast : public ClusterComma { #if MTR_ENABLE_PROVISIONAL AddArgument("Constraints", &mComplex_Constraints); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("Cause", 0, UINT8_MAX, &mRequest.cause); #endif // MTR_ENABLE_PROVISIONAL ClusterCommand::AddArguments(); } @@ -80059,6 +80088,9 @@ class DeviceEnergyManagementRequestConstraintBasedForecast : public ClusterComma } params.constraints = array_0; } +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + params.cause = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.cause)]; #endif // MTR_ENABLE_PROVISIONAL uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; @@ -80084,6 +80116,52 @@ class DeviceEnergyManagementRequestConstraintBasedForecast : public ClusterComma TypedComplexArgument> mComplex_Constraints; }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/* + * Command CancelRequest + */ +class DeviceEnergyManagementCancelRequest : public ClusterCommand { +public: + DeviceEnergyManagementCancelRequest() + : ClusterCommand("cancel-request") + { + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagement::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DeviceEnergyManagement::Commands::CancelRequest::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRDeviceEnergyManagementClusterCancelRequestParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster cancelRequestWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: +}; + #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL @@ -80683,6 +80761,91 @@ class SubscribeAttributeDeviceEnergyManagementForecast : public SubscribeAttribu #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL +/* + * Attribute OptOutState + */ +class ReadDeviceEnergyManagementOptOutState : public ReadAttribute { +public: + ReadDeviceEnergyManagementOptOutState() + : ReadAttribute("opt-out-state") + { + } + + ~ReadDeviceEnergyManagementOptOutState() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DeviceEnergyManagement::Attributes::OptOutState::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeOptOutStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DeviceEnergyManagement.OptOutState response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("DeviceEnergyManagement OptOutState read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeDeviceEnergyManagementOptOutState : public SubscribeAttribute { +public: + SubscribeAttributeDeviceEnergyManagementOptOutState() + : SubscribeAttribute("opt-out-state") + { + } + + ~SubscribeAttributeDeviceEnergyManagementOptOutState() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DeviceEnergyManagement::Attributes::OptOutState::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeOptOutStateWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DeviceEnergyManagement.OptOutState response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* * Attribute GeneratedCommandList */ @@ -181335,6 +181498,9 @@ void registerClusterDeviceEnergyManagement(Commands & commands) #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL make_unique(), // +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + make_unique(), // #endif // MTR_ENABLE_PROVISIONAL make_unique(Id), // make_unique(Id), // @@ -181367,6 +181533,10 @@ void registerClusterDeviceEnergyManagement(Commands & commands) make_unique(), // make_unique(), // #endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + make_unique(), // + make_unique(), // +#endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), // From 039cbab7aeb6387d56b6196249b45ea71350752a Mon Sep 17 00:00:00 2001 From: C Freeman Date: Thu, 18 Jan 2024 21:18:23 -0500 Subject: [PATCH 17/25] Access checker: Improve write check support (#31452) * check * Non-writeable attribute checks * Fixes to the spec parsing * support optinoally writeable attributes in test * add issue for global attr writes * Fix the optional write step, don't test unknown enum * Remove workaround for global attrs * address review comments --- src/python_testing/TC_AccessChecker.py | 33 ++++++++++++++++---- src/python_testing/TestSpecParsingSupport.py | 18 +++++++++-- src/python_testing/spec_parsing_support.py | 23 +++++++++----- 3 files changed, 57 insertions(+), 17 deletions(-) diff --git a/src/python_testing/TC_AccessChecker.py b/src/python_testing/TC_AccessChecker.py index 4c6636a29b6611..5533b0e3d91b4d 100644 --- a/src/python_testing/TC_AccessChecker.py +++ b/src/python_testing/TC_AccessChecker.py @@ -137,20 +137,35 @@ async def _run_read_access_test_for_cluster_privilege(self, endpoint_id, cluster async def _run_write_access_test_for_cluster_privilege(self, endpoint_id, cluster_id, cluster, xml_cluster: XmlCluster, privilege: Clusters.AccessControl.Enums.AccessControlEntryPrivilegeEnum, wildcard_read): for attribute_id in checkable_attributes(cluster_id, cluster, xml_cluster): spec_requires = xml_cluster.attributes[attribute_id].write_access - if spec_requires == Clusters.AccessControl.Enums.AccessControlEntryPrivilegeEnum.kUnknownEnumValue: - # not writeable - continue + is_optional_write = xml_cluster.attributes[attribute_id].write_optional + attribute = Clusters.ClusterObjects.ALL_ATTRIBUTES[cluster_id][attribute_id] cluster_class = Clusters.ClusterObjects.ALL_CLUSTERS[cluster_id] location = AttributePathLocation(endpoint_id=endpoint_id, cluster_id=cluster_id, attribute_id=attribute_id) test_name = f'Write access checker - {privilege}' + logging.info(f"Testing attribute {attribute} on endpoint {endpoint_id}") + if attribute == Clusters.AccessControl.Attributes.Acl and privilege == Clusters.AccessControl.Enums.AccessControlEntryPrivilegeEnum.kAdminister: + logging.info("Skipping ACL attribute check for admin privilege as this is known to be writeable and is being used for this test") + continue - print(f"Testing attribute {attribute} on endpoint {endpoint_id}") # Because we read everything with admin, we should have this in the wildcard read # This will only not work if we end up with write-only attributes. We do not currently have any of these. val = wildcard_read.attributes[endpoint_id][cluster_class][attribute] + if isinstance(val, list): + # Use an empty list for writes in case the list is large and does not fit + val = [] + resp = await self.TH2.WriteAttribute(nodeid=self.dut_node_id, attributes=[(endpoint_id, attribute(val))]) - if operation_allowed(spec_requires, privilege): + if spec_requires == Clusters.AccessControl.Enums.AccessControlEntryPrivilegeEnum.kUnknownEnumValue: + # not writeable - expect an unsupported write response + if resp[0].Status != Status.UnsupportedWrite: + self.record_error(test_name=test_name, location=location, + problem=f"Unexpected error writing non-writeable attribute - expected Unsupported Write, got {resp[0].Status}") + self.success = False + elif is_optional_write and resp[0].Status == Status.UnsupportedWrite: + # unsupported optional writeable attribute - this is fine, no error + continue + elif operation_allowed(spec_requires, privilege): # Write the default attribute. We don't care if this fails, as long as it fails with a DIFFERENT error than the access # This is OK because access is required to be checked BEFORE any other thing to avoid leaking device information. # For example, because we don't have any range information, we might be writing an out of range value, but this will @@ -166,13 +181,19 @@ async def _run_write_access_test_for_cluster_privilege(self, endpoint_id, cluste problem=f"Unexpected error writing attribute - expected Unsupported Access, got {resp[0].Status}") self.success = False + if resp[0].Status == Status.Success and isinstance(val, list): + # Reset the value to the original if we managed to write an empty list + val = wildcard_read.attributes[endpoint_id][cluster_class][attribute] + await self.TH2.WriteAttribute(nodeid=self.dut_node_id, attributes=[(endpoint_id, attribute(val))]) + async def run_access_test(self, test_type: AccessTestType): # Read all the attributes on TH2 using admin access if test_type == AccessTestType.WRITE: await self._setup_acl(privilege=Clusters.AccessControl.Enums.AccessControlEntryPrivilegeEnum.kAdminister) wildcard_read = await self.TH2.Read(self.dut_node_id, [()]) - privilege_enum = Clusters.AccessControl.Enums.AccessControlEntryPrivilegeEnum + enum = Clusters.AccessControl.Enums.AccessControlEntryPrivilegeEnum + privilege_enum = [p for p in enum if p != enum.kUnknownEnumValue] for privilege in privilege_enum: logging.info(f"Testing for {privilege}") await self._setup_acl(privilege=privilege) diff --git a/src/python_testing/TestSpecParsingSupport.py b/src/python_testing/TestSpecParsingSupport.py index d77d634d14312d..ed790fb4bf4629 100644 --- a/src/python_testing/TestSpecParsingSupport.py +++ b/src/python_testing/TestSpecParsingSupport.py @@ -32,7 +32,7 @@ ATTRIBUTE_ID = 0x0000 -def single_attribute_cluster_xml(read_access: str, write_access: str): +def single_attribute_cluster_xml(read_access: str, write_access: str, write_supported: str): xml_cluster = f'' revision_table = ('' '' @@ -41,7 +41,7 @@ def single_attribute_cluster_xml(read_access: str, write_access: str): '') classification = '' read_access_str = f'read="true" readPrivilege="{read_access}"' if read_access is not None else "" - write_access_str = f'write="true" writePrivilege="{write_access}"' if write_access is not None else "" + write_access_str = f'write="{write_supported}" writePrivilege="{write_access}"' if write_access is not None else "" attribute = ('' f'' f'' @@ -82,7 +82,7 @@ def test_spec_parsing_access(self): strs = [None, 'view', 'operate', 'manage', 'admin'] for read in strs: for write in strs: - xml = single_attribute_cluster_xml(read, write) + xml = single_attribute_cluster_xml(read, write, "true") xml_cluster = parse_cluster(xml) asserts.assert_is_not_none(xml_cluster.attributes, "No attributes found in cluster") asserts.assert_is_not_none(xml_cluster.attribute_map, "No attribute map found in cluster") @@ -94,6 +94,18 @@ def test_spec_parsing_access(self): asserts.assert_equal(xml_cluster.attributes[ATTRIBUTE_ID].write_access, get_access_enum_from_string(write), "Unexpected write access") + def test_write_optional(self): + for write_support in ['true', 'optional']: + xml = single_attribute_cluster_xml('view', 'view', write_support) + xml_cluster = parse_cluster(xml) + asserts.assert_is_not_none(xml_cluster.attributes, "No attributes found in cluster") + asserts.assert_is_not_none(xml_cluster.attribute_map, "No attribute map found in cluster") + asserts.assert_equal(len(xml_cluster.attributes), len(GlobalAttributeIds) + 1, "Unexpected number of attributes") + asserts.assert_true(ATTRIBUTE_ID in xml_cluster.attributes.keys(), + "Did not find test attribute in XmlCluster.attributes") + asserts.assert_equal(xml_cluster.attributes[ATTRIBUTE_ID].write_optional, + write_support == 'optional', "Unexpected write_optional value") + if __name__ == "__main__": default_matter_test_main() diff --git a/src/python_testing/spec_parsing_support.py b/src/python_testing/spec_parsing_support.py index 77183a1b464f88..c58f38e9a5ac89 100644 --- a/src/python_testing/spec_parsing_support.py +++ b/src/python_testing/spec_parsing_support.py @@ -61,6 +61,7 @@ class XmlAttribute: conformance: Callable[[uint], ConformanceDecision] read_access: Clusters.AccessControl.Enums.AccessControlEntryPrivilegeEnum write_access: Clusters.AccessControl.Enums.AccessControlEntryPrivilegeEnum + write_optional: bool def access_string(self): read_marker = "R" if self.read_access is not Clusters.AccessControl.Enums.AccessControlEntryPrivilegeEnum.kUnknownEnumValue else "" @@ -228,6 +229,9 @@ def parse_conformance(self, conformance_xml: ElementTree.Element) -> Callable: severity=ProblemSeverity.WARNING, problem=str(ex))) return None + def parse_write_optional(self, element_xml: ElementTree.Element, access_xml: ElementTree.Element) -> bool: + return access_xml.attrib['write'] == 'optional' + def parse_access(self, element_xml: ElementTree.Element, access_xml: ElementTree.Element, conformance: Callable) -> tuple[Optional[Clusters.AccessControl.Enums.AccessControlEntryPrivilegeEnum], Optional[Clusters.AccessControl.Enums.AccessControlEntryPrivilegeEnum], Optional[Clusters.AccessControl.Enums.AccessControlEntryPrivilegeEnum]]: ''' Returns a tuple of access types for read / write / invoke''' def str_to_access_type(privilege_str: str) -> Clusters.AccessControl.Enums.AccessControlEntryPrivilegeEnum: @@ -301,13 +305,16 @@ def parse_attributes(self) -> dict[uint, XmlAttribute]: # I don't have a good way to relate the ranges to the conformance, but they're both acceptable, so let's just or them. conformance = or_operation([conformance, attributes[code].conformance]) read_access, write_access, _ = self.parse_access(element, access_xml, conformance) + write_optional = False + if write_access not in [None, Clusters.AccessControl.Enums.AccessControlEntryPrivilegeEnum.kUnknownEnumValue]: + write_optional = self.parse_write_optional(element, access_xml) attributes[code] = XmlAttribute(name=element.attrib['name'], datatype=datatype, - conformance=conformance, read_access=read_access, write_access=write_access) + conformance=conformance, read_access=read_access, write_access=write_access, write_optional=write_optional) # Add in the global attributes for the base class for id in GlobalAttributeIds: # TODO: Add data type here. Right now it's unused. We should parse this from the spec. attributes[id] = XmlAttribute(name=id.to_name(), datatype="", conformance=mandatory( - ), read_access=Clusters.AccessControl.Enums.AccessControlEntryPrivilegeEnum.kView, write_access=Clusters.AccessControl.Enums.AccessControlEntryPrivilegeEnum.kUnknownEnumValue) + ), read_access=Clusters.AccessControl.Enums.AccessControlEntryPrivilegeEnum.kView, write_access=Clusters.AccessControl.Enums.AccessControlEntryPrivilegeEnum.kUnknownEnumValue, write_optional=False) return attributes def parse_commands(self, command_type: CommandType) -> dict[uint, XmlAttribute]: @@ -508,12 +515,12 @@ def remove_problem(location: typing.Union[CommandPathLocation, FeaturePathLocati view = Clusters.AccessControl.Enums.AccessControlEntryPrivilegeEnum.kView none = Clusters.AccessControl.Enums.AccessControlEntryPrivilegeEnum.kUnknownEnumValue clusters[temp_control_id].attributes = { - 0x00: XmlAttribute(name='TemperatureSetpoint', datatype='temperature', conformance=feature(0x01, 'TN'), read_access=view, write_access=none), - 0x01: XmlAttribute(name='MinTemperature', datatype='temperature', conformance=feature(0x01, 'TN'), read_access=view, write_access=none), - 0x02: XmlAttribute(name='MaxTemperature', datatype='temperature', conformance=feature(0x01, 'TN'), read_access=view, write_access=none), - 0x03: XmlAttribute(name='Step', datatype='temperature', conformance=feature(0x04, 'STEP'), read_access=view, write_access=none), - 0x04: XmlAttribute(name='SelectedTemperatureLevel', datatype='uint8', conformance=feature(0x02, 'TL'), read_access=view, write_access=none), - 0x05: XmlAttribute(name='SupportedTemperatureLevels', datatype='list', conformance=feature(0x02, 'TL'), read_access=view, write_access=none), + 0x00: XmlAttribute(name='TemperatureSetpoint', datatype='temperature', conformance=feature(0x01, 'TN'), read_access=view, write_access=none, write_optional=False), + 0x01: XmlAttribute(name='MinTemperature', datatype='temperature', conformance=feature(0x01, 'TN'), read_access=view, write_access=none, write_optional=False), + 0x02: XmlAttribute(name='MaxTemperature', datatype='temperature', conformance=feature(0x01, 'TN'), read_access=view, write_access=none, write_optional=False), + 0x03: XmlAttribute(name='Step', datatype='temperature', conformance=feature(0x04, 'STEP'), read_access=view, write_access=none, write_optional=False), + 0x04: XmlAttribute(name='SelectedTemperatureLevel', datatype='uint8', conformance=feature(0x02, 'TL'), read_access=view, write_access=none, write_optional=False), + 0x05: XmlAttribute(name='SupportedTemperatureLevels', datatype='list', conformance=feature(0x02, 'TL'), read_access=view, write_access=none, write_optional=False), } # Workaround for incorrect parsing of access control cluster. From c1c9237bccd5ff062049e913df4d6c283788b20e Mon Sep 17 00:00:00 2001 From: Erwin Pan Date: Fri, 19 Jan 2024 13:58:45 +0800 Subject: [PATCH 18/25] Disable chef build basicvideoplayer (#31534) to fix build broken due to https://github.com/project-chip/connectedhomeip/pull/30691 --- integrations/cloudbuild/chef.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integrations/cloudbuild/chef.yaml b/integrations/cloudbuild/chef.yaml index 08c15518725956..45af39306ff657 100644 --- a/integrations/cloudbuild/chef.yaml +++ b/integrations/cloudbuild/chef.yaml @@ -18,7 +18,7 @@ steps: args: - >- perl -i -pe 's/^gdbgui==/# gdbgui==/' /opt/espressif/esp-idf/requirements.txt && - ./examples/chef/chef.py --build_all --build_exclude noip + ./examples/chef/chef.py --build_all --build_exclude noip --build_exclude basicvideo id: CompileAll waitFor: - Bootstrap From 06e46f9b85d3770056fd8416230bb543eab5adf0 Mon Sep 17 00:00:00 2001 From: jamesharrow <93921463+jamesharrow@users.noreply.github.com> Date: Fri, 19 Jan 2024 07:10:17 +0000 Subject: [PATCH 19/25] Changed Energy Management example default build args to enable test event triggers (#31496) * Changed default build args to enable test event triggers by default for EVSE in energy management app. * Changed default build args to enable test event triggers by default for EVSE in energy management app - in args.gni not in platform/linux/BUILD.gn This corrects commit d32003655df4e930ad9c20e095180275c5623ec2. --- examples/energy-management-app/linux/args.gni | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/energy-management-app/linux/args.gni b/examples/energy-management-app/linux/args.gni index cca4c8f39e09fe..b7c71c3097a680 100644 --- a/examples/energy-management-app/linux/args.gni +++ b/examples/energy-management-app/linux/args.gni @@ -29,3 +29,4 @@ chip_project_config_include_dirs += [ "${chip_root}/config/standalone" ] matter_enable_tracing_support = true chip_enable_read_client = false +chip_enable_energy_evse_trigger = true From 1c0d4b70f42b52601a20591321d7e50f980628ce Mon Sep 17 00:00:00 2001 From: shripad621git <79364691+shripad621git@users.noreply.github.com> Date: Fri, 19 Jan 2024 13:16:51 +0530 Subject: [PATCH 20/25] Added fabric, secure channel and cluster specfic traces for better tracing. (#31238) * Added few secure channel CASE related traces * Added PASE related traces * Added some fabric related traces * Added cluster specific traces * Addressed review comments * Restlyed the code * Update src/credentials/FabricTable.cpp Co-authored-by: Shubham Patil --------- Co-authored-by: Shubham Patil --- .../administrator-commissioning-server.cpp | 4 ++++ .../basic-information/basic-information.cpp | 3 +++ ...ridged-device-basic-information-server.cpp | 2 ++ .../color-control-server.cpp | 10 ++++++++++ .../clusters/groups-server/groups-server.cpp | 7 +++++++ .../identify-server/identify-server.cpp | 3 +++ .../clusters/level-control/level-control.cpp | 9 +++++++++ .../low-power-server/low-power-server.cpp | 2 ++ .../mode-base-server/mode-base-server.cpp | 2 ++ .../mode-select-server/mode-select-server.cpp | 2 ++ .../clusters/on-off-server/on-off-server.cpp | 8 ++++++++ .../clusters/scenes-server/scenes-server.cpp | 11 +++++++++++ .../wifi-network-diagnostics-server.cpp | 4 ++++ src/credentials/BUILD.gn | 2 ++ src/credentials/FabricTable.cpp | 19 +++++++++++++++++++ src/protocols/secure_channel/CASEServer.cpp | 6 ++++++ src/protocols/secure_channel/CASESession.cpp | 8 ++++++++ src/protocols/secure_channel/PASESession.cpp | 5 ++++- src/tracing/esp32_trace/esp32_tracing.cpp | 16 ++++++++-------- 19 files changed, 114 insertions(+), 9 deletions(-) diff --git a/src/app/clusters/administrator-commissioning-server/administrator-commissioning-server.cpp b/src/app/clusters/administrator-commissioning-server/administrator-commissioning-server.cpp index 81dd97503e36af..8189ae3d67ae12 100644 --- a/src/app/clusters/administrator-commissioning-server/administrator-commissioning-server.cpp +++ b/src/app/clusters/administrator-commissioning-server/administrator-commissioning-server.cpp @@ -35,6 +35,7 @@ #include #include #include +#include using namespace chip; using namespace chip::app; @@ -82,6 +83,7 @@ bool emberAfAdministratorCommissioningClusterOpenCommissioningWindowCallback( app::CommandHandler * commandObj, const app::ConcreteCommandPath & commandPath, const Commands::OpenCommissioningWindow::DecodableType & commandData) { + MATTER_TRACE_SCOPE("OpenCommissioningWindow", "AdministratorCommissioning"); auto commissioningTimeout = System::Clock::Seconds16(commandData.commissioningTimeout); auto & pakeVerifier = commandData.PAKEPasscodeVerifier; auto & discriminator = commandData.discriminator; @@ -141,6 +143,7 @@ bool emberAfAdministratorCommissioningClusterOpenBasicCommissioningWindowCallbac app::CommandHandler * commandObj, const app::ConcreteCommandPath & commandPath, const Commands::OpenBasicCommissioningWindow::DecodableType & commandData) { + MATTER_TRACE_SCOPE("OpenBasicCommissioningWindow", "AdministratorCommissioning"); auto commissioningTimeout = System::Clock::Seconds16(commandData.commissioningTimeout); Optional status = Optional::Missing(); @@ -187,6 +190,7 @@ bool emberAfAdministratorCommissioningClusterRevokeCommissioningCallback( app::CommandHandler * commandObj, const app::ConcreteCommandPath & commandPath, const Commands::RevokeCommissioning::DecodableType & commandData) { + MATTER_TRACE_SCOPE("RevokeCommissioning", "AdministratorCommissioning"); ChipLogProgress(Zcl, "Received command to close commissioning window"); Server::GetInstance().GetFailSafeContext().ForceFailSafeTimerExpiry(); diff --git a/src/app/clusters/basic-information/basic-information.cpp b/src/app/clusters/basic-information/basic-information.cpp index 510e4991b25bae..f241bb2cf5a008 100644 --- a/src/app/clusters/basic-information/basic-information.cpp +++ b/src/app/clusters/basic-information/basic-information.cpp @@ -33,6 +33,7 @@ #include #include +#include using namespace chip; using namespace chip::app; @@ -410,6 +411,7 @@ class PlatformMgrDelegate : public DeviceLayer::PlatformManagerDelegate { void OnStartUp(uint32_t softwareVersion) override { + MATTER_TRACE_INSTANT("OnStartUp", "BasicInfo"); // The StartUp event SHALL be emitted by a Node after completing a boot or reboot process ChipLogDetail(Zcl, "Emitting StartUp event"); @@ -429,6 +431,7 @@ class PlatformMgrDelegate : public DeviceLayer::PlatformManagerDelegate void OnShutDown() override { + MATTER_TRACE_INSTANT("OnShutDown", "BasicInfo"); // The ShutDown event SHOULD be emitted on a best-effort basis by a Node prior to any orderly shutdown sequence. ChipLogDetail(Zcl, "Emitting ShutDown event"); diff --git a/src/app/clusters/bridged-device-basic-information-server/bridged-device-basic-information-server.cpp b/src/app/clusters/bridged-device-basic-information-server/bridged-device-basic-information-server.cpp index a8785abd516954..0f4137f07b2a1d 100644 --- a/src/app/clusters/bridged-device-basic-information-server/bridged-device-basic-information-server.cpp +++ b/src/app/clusters/bridged-device-basic-information-server/bridged-device-basic-information-server.cpp @@ -26,6 +26,7 @@ #include #include #include +#include using namespace chip; using namespace chip::app; @@ -36,6 +37,7 @@ namespace { void ReachableChanged(EndpointId endpointId) { + MATTER_TRACE_INSTANT("ReachableChanged", "BridgeBasicInfo"); bool reachable = false; if (EMBER_ZCL_STATUS_SUCCESS != Attributes::Reachable::Get(endpointId, &reachable)) { diff --git a/src/app/clusters/color-control-server/color-control-server.cpp b/src/app/clusters/color-control-server/color-control-server.cpp index cb0d7e5be78605..a21a44ada8d23f 100644 --- a/src/app/clusters/color-control-server/color-control-server.cpp +++ b/src/app/clusters/color-control-server/color-control-server.cpp @@ -24,6 +24,7 @@ #include #include #include +#include #ifdef EMBER_AF_PLUGIN_SCENES_MANAGEMENT #include @@ -1354,6 +1355,7 @@ bool ColorControlServer::moveHueCommand(app::CommandHandler * commandObj, const HueMoveMode moveMode, uint16_t rate, uint8_t optionsMask, uint8_t optionsOverride, bool isEnhanced) { + MATTER_TRACE_SCOPE("moveHue", "ColorControl"); EndpointId endpoint = commandPath.mEndpointId; Status status = Status::Success; ColorHueTransitionState * colorHueTransitionState = getColorHueTransitionState(endpoint); @@ -1459,6 +1461,7 @@ bool ColorControlServer::moveToHueCommand(app::CommandHandler * commandObj, cons uint16_t hue, HueDirection moveDirection, uint16_t transitionTime, uint8_t optionsMask, uint8_t optionsOverride, bool isEnhanced) { + MATTER_TRACE_SCOPE("moveToHue", "ColorControl"); EndpointId endpoint = commandPath.mEndpointId; Status status = Status::Success; @@ -1593,6 +1596,7 @@ bool ColorControlServer::moveToHueAndSaturationCommand(app::CommandHandler * com uint8_t saturation, uint16_t transitionTime, uint8_t optionsMask, uint8_t optionsOverride, bool isEnhanced) { + MATTER_TRACE_SCOPE("moveToHueAndSaturation", "ColorControl"); // limit checking: hue and saturation are 0..254. Spec dictates we ignore // this and report a constraint error. if ((!isEnhanced && hue > MAX_HUE_VALUE) || saturation > MAX_SATURATION_VALUE) @@ -1632,6 +1636,7 @@ bool ColorControlServer::stepHueCommand(app::CommandHandler * commandObj, const HueStepMode stepMode, uint16_t stepSize, uint16_t transitionTime, uint8_t optionsMask, uint8_t optionsOverride, bool isEnhanced) { + MATTER_TRACE_SCOPE("stepHue", "ColorControl"); EndpointId endpoint = commandPath.mEndpointId; Status status = Status::Success; @@ -1715,6 +1720,7 @@ bool ColorControlServer::stepHueCommand(app::CommandHandler * commandObj, const bool ColorControlServer::moveSaturationCommand(app::CommandHandler * commandObj, const app::ConcreteCommandPath & commandPath, const Commands::MoveSaturation::DecodableType & commandData) { + MATTER_TRACE_SCOPE("moveSaturation", "ColorControl"); auto & moveMode = commandData.moveMode; auto & rate = commandData.rate; auto & optionsMask = commandData.optionsMask; @@ -1798,6 +1804,7 @@ bool ColorControlServer::moveSaturationCommand(app::CommandHandler * commandObj, bool ColorControlServer::moveToSaturationCommand(app::CommandHandler * commandObj, const app::ConcreteCommandPath & commandPath, const Commands::MoveToSaturation::DecodableType & commandData) { + MATTER_TRACE_SCOPE("moveToSaturation", "ColorControl"); // limit checking: saturation is 0..254. Spec dictates we ignore // this and report a malformed packet. if (commandData.saturation > MAX_SATURATION_VALUE) @@ -1822,6 +1829,7 @@ bool ColorControlServer::moveToSaturationCommand(app::CommandHandler * commandOb bool ColorControlServer::stepSaturationCommand(app::CommandHandler * commandObj, const app::ConcreteCommandPath & commandPath, const Commands::StepSaturation::DecodableType & commandData) { + MATTER_TRACE_SCOPE("stepSaturation", "ColorControl"); auto stepMode = commandData.stepMode; uint8_t stepSize = commandData.stepSize; uint8_t transitionTime = commandData.transitionTime; @@ -1885,6 +1893,7 @@ bool ColorControlServer::stepSaturationCommand(app::CommandHandler * commandObj, bool ColorControlServer::colorLoopCommand(app::CommandHandler * commandObj, const app::ConcreteCommandPath & commandPath, const Commands::ColorLoopSet::DecodableType & commandData) { + MATTER_TRACE_SCOPE("colorLoop", "ColorControl"); auto updateFlags = commandData.updateFlags; auto action = commandData.action; auto direction = commandData.direction; @@ -2010,6 +2019,7 @@ bool ColorControlServer::colorLoopCommand(app::CommandHandler * commandObj, cons */ void ColorControlServer::updateHueSatCommand(EndpointId endpoint) { + MATTER_TRACE_SCOPE("updateHueSat", "ColorControl"); ColorHueTransitionState * colorHueTransitionState = getColorHueTransitionState(endpoint); Color16uTransitionState * colorSaturationTransitionState = getSaturationTransitionState(endpoint); diff --git a/src/app/clusters/groups-server/groups-server.cpp b/src/app/clusters/groups-server/groups-server.cpp index 4ab5fa24ee577e..a6d502acb18e52 100644 --- a/src/app/clusters/groups-server/groups-server.cpp +++ b/src/app/clusters/groups-server/groups-server.cpp @@ -28,6 +28,7 @@ #include #include #include +#include #ifdef EMBER_AF_PLUGIN_SCENES_MANAGEMENT #include @@ -141,6 +142,7 @@ void emberAfGroupsClusterServerInitCallback(EndpointId endpointId) bool emberAfGroupsClusterAddGroupCallback(app::CommandHandler * commandObj, const app::ConcreteCommandPath & commandPath, const Commands::AddGroup::DecodableType & commandData) { + MATTER_TRACE_SCOPE("AddGroup", "Groups"); auto fabricIndex = commandObj->GetAccessingFabricIndex(); Groups::Commands::AddGroupResponse::Type response; @@ -153,6 +155,7 @@ bool emberAfGroupsClusterAddGroupCallback(app::CommandHandler * commandObj, cons bool emberAfGroupsClusterViewGroupCallback(app::CommandHandler * commandObj, const app::ConcreteCommandPath & commandPath, const Commands::ViewGroup::DecodableType & commandData) { + MATTER_TRACE_SCOPE("ViewGroup", "Groups"); auto fabricIndex = commandObj->GetAccessingFabricIndex(); auto groupId = commandData.groupID; GroupDataProvider * provider = GetGroupDataProvider(); @@ -255,6 +258,7 @@ struct GroupMembershipResponse bool emberAfGroupsClusterGetGroupMembershipCallback(app::CommandHandler * commandObj, const app::ConcreteCommandPath & commandPath, const Commands::GetGroupMembership::DecodableType & commandData) { + MATTER_TRACE_SCOPE("GetGroupMembership", "Groups"); auto fabricIndex = commandObj->GetAccessingFabricIndex(); auto * provider = GetGroupDataProvider(); Status status = Status::Failure; @@ -284,6 +288,7 @@ bool emberAfGroupsClusterGetGroupMembershipCallback(app::CommandHandler * comman bool emberAfGroupsClusterRemoveGroupCallback(app::CommandHandler * commandObj, const app::ConcreteCommandPath & commandPath, const Commands::RemoveGroup::DecodableType & commandData) { + MATTER_TRACE_SCOPE("RemoveGroup", "Groups"); auto fabricIndex = commandObj->GetAccessingFabricIndex(); Groups::Commands::RemoveGroupResponse::Type response; @@ -301,6 +306,7 @@ bool emberAfGroupsClusterRemoveGroupCallback(app::CommandHandler * commandObj, c bool emberAfGroupsClusterRemoveAllGroupsCallback(app::CommandHandler * commandObj, const app::ConcreteCommandPath & commandPath, const Commands::RemoveAllGroups::DecodableType & commandData) { + MATTER_TRACE_SCOPE("RemoveAllGroups", "Groups"); auto fabricIndex = commandObj->GetAccessingFabricIndex(); auto * provider = GetGroupDataProvider(); Status status = Status::Failure; @@ -342,6 +348,7 @@ bool emberAfGroupsClusterAddGroupIfIdentifyingCallback(app::CommandHandler * com const app::ConcreteCommandPath & commandPath, const Commands::AddGroupIfIdentifying::DecodableType & commandData) { + MATTER_TRACE_SCOPE("AddGroupIfIdentifying", "Groups"); auto fabricIndex = commandObj->GetAccessingFabricIndex(); auto groupId = commandData.groupID; auto groupName = commandData.groupName; diff --git a/src/app/clusters/identify-server/identify-server.cpp b/src/app/clusters/identify-server/identify-server.cpp index e60b89d7d6931b..55a0e15ee59c2f 100644 --- a/src/app/clusters/identify-server/identify-server.cpp +++ b/src/app/clusters/identify-server/identify-server.cpp @@ -31,6 +31,7 @@ #include #include #include +#include #if CHIP_DEVICE_LAYER_NONE #error "identify requrires a device layer" @@ -196,6 +197,7 @@ void MatterIdentifyClusterServerAttributeChangedCallback(const app::ConcreteAttr bool emberAfIdentifyClusterIdentifyCallback(CommandHandler * commandObj, const ConcreteCommandPath & commandPath, const Commands::Identify::DecodableType & commandData) { + MATTER_TRACE_SCOPE("IdentifyCommand", "Identify"); auto & identifyTime = commandData.identifyTime; // cmd Identify @@ -207,6 +209,7 @@ bool emberAfIdentifyClusterIdentifyCallback(CommandHandler * commandObj, const C bool emberAfIdentifyClusterTriggerEffectCallback(CommandHandler * commandObj, const ConcreteCommandPath & commandPath, const Commands::TriggerEffect::DecodableType & commandData) { + MATTER_TRACE_SCOPE("TriggerEffect", "Identify"); auto & effectIdentifier = commandData.effectIdentifier; auto & effectVariant = commandData.effectVariant; diff --git a/src/app/clusters/level-control/level-control.cpp b/src/app/clusters/level-control/level-control.cpp index ba22be03055886..f3f31d58982d93 100644 --- a/src/app/clusters/level-control/level-control.cpp +++ b/src/app/clusters/level-control/level-control.cpp @@ -33,6 +33,7 @@ #include #include #include +#include #ifdef EMBER_AF_PLUGIN_SCENES_MANAGEMENT #include @@ -577,6 +578,7 @@ static bool shouldExecuteIfOff(EndpointId endpoint, CommandId commandId, chip::O bool emberAfLevelControlClusterMoveToLevelCallback(app::CommandHandler * commandObj, const app::ConcreteCommandPath & commandPath, const Commands::MoveToLevel::DecodableType & commandData) { + MATTER_TRACE_SCOPE("MoveToLevel", "LevelControl"); commandObj->AddStatus(commandPath, LevelControlServer::MoveToLevel(commandPath.mEndpointId, commandData)); return true; } @@ -621,6 +623,7 @@ bool emberAfLevelControlClusterMoveToLevelWithOnOffCallback(app::CommandHandler const app::ConcreteCommandPath & commandPath, const Commands::MoveToLevelWithOnOff::DecodableType & commandData) { + MATTER_TRACE_SCOPE("MoveToLevelWithOnOff", "LevelControl"); auto & level = commandData.level; auto & transitionTime = commandData.transitionTime; auto & optionsMask = commandData.optionsMask; @@ -650,6 +653,7 @@ bool emberAfLevelControlClusterMoveToLevelWithOnOffCallback(app::CommandHandler bool emberAfLevelControlClusterMoveCallback(app::CommandHandler * commandObj, const app::ConcreteCommandPath & commandPath, const Commands::Move::DecodableType & commandData) { + MATTER_TRACE_SCOPE("Move", "LevelControl"); auto & moveMode = commandData.moveMode; auto & rate = commandData.rate; auto & optionsMask = commandData.optionsMask; @@ -674,6 +678,7 @@ bool emberAfLevelControlClusterMoveCallback(app::CommandHandler * commandObj, co bool emberAfLevelControlClusterMoveWithOnOffCallback(app::CommandHandler * commandObj, const app::ConcreteCommandPath & commandPath, const Commands::MoveWithOnOff::DecodableType & commandData) { + MATTER_TRACE_SCOPE("MoveWithOnOff", "LevelControl"); auto & moveMode = commandData.moveMode; auto & rate = commandData.rate; auto & optionsMask = commandData.optionsMask; @@ -698,6 +703,7 @@ bool emberAfLevelControlClusterMoveWithOnOffCallback(app::CommandHandler * comma bool emberAfLevelControlClusterStepCallback(app::CommandHandler * commandObj, const app::ConcreteCommandPath & commandPath, const Commands::Step::DecodableType & commandData) { + MATTER_TRACE_SCOPE("Step", "LevelControl"); auto & stepMode = commandData.stepMode; auto & stepSize = commandData.stepSize; auto & transitionTime = commandData.transitionTime; @@ -723,6 +729,7 @@ bool emberAfLevelControlClusterStepCallback(app::CommandHandler * commandObj, co bool emberAfLevelControlClusterStepWithOnOffCallback(app::CommandHandler * commandObj, const app::ConcreteCommandPath & commandPath, const Commands::StepWithOnOff::DecodableType & commandData) { + MATTER_TRACE_SCOPE("StepWithOnOff", "LevelControl"); auto & stepMode = commandData.stepMode; auto & stepSize = commandData.stepSize; auto & transitionTime = commandData.transitionTime; @@ -748,6 +755,7 @@ bool emberAfLevelControlClusterStepWithOnOffCallback(app::CommandHandler * comma bool emberAfLevelControlClusterStopCallback(app::CommandHandler * commandObj, const app::ConcreteCommandPath & commandPath, const Commands::Stop::DecodableType & commandData) { + MATTER_TRACE_SCOPE("Stop", "LevelControl"); auto & optionsMask = commandData.optionsMask; auto & optionsOverride = commandData.optionsOverride; @@ -760,6 +768,7 @@ bool emberAfLevelControlClusterStopCallback(app::CommandHandler * commandObj, co bool emberAfLevelControlClusterStopWithOnOffCallback(app::CommandHandler * commandObj, const app::ConcreteCommandPath & commandPath, const Commands::StopWithOnOff::DecodableType & commandData) { + MATTER_TRACE_SCOPE("StopWithOnOff", "LevelControl"); auto & optionsMask = commandData.optionsMask; auto & optionsOverride = commandData.optionsOverride; ChipLogProgress(Zcl, "%s STOP_WITH_ON_OFF", "RX level-control:"); diff --git a/src/app/clusters/low-power-server/low-power-server.cpp b/src/app/clusters/low-power-server/low-power-server.cpp index 5881d2e56fc322..4e8b10e8f082ea 100644 --- a/src/app/clusters/low-power-server/low-power-server.cpp +++ b/src/app/clusters/low-power-server/low-power-server.cpp @@ -31,6 +31,7 @@ #include #include #include +#include using namespace chip; using namespace chip::app::Clusters; @@ -93,6 +94,7 @@ void SetDefaultDelegate(EndpointId endpoint, Delegate * delegate) bool emberAfLowPowerClusterSleepCallback(app::CommandHandler * command, const app::ConcreteCommandPath & commandPath, const Commands::Sleep::DecodableType & commandData) { + MATTER_TRACE_SCOPE("Sleep", "LowPower"); using Protocols::InteractionModel::Status; EndpointId endpoint = commandPath.mEndpointId; diff --git a/src/app/clusters/mode-base-server/mode-base-server.cpp b/src/app/clusters/mode-base-server/mode-base-server.cpp index 28d958d25f2651..1d01c10c718ac2 100644 --- a/src/app/clusters/mode-base-server/mode-base-server.cpp +++ b/src/app/clusters/mode-base-server/mode-base-server.cpp @@ -24,6 +24,7 @@ #include #include #include +#include using namespace chip; using namespace chip::app; @@ -378,6 +379,7 @@ void Instance::UnregisterThisInstance() void Instance::HandleChangeToMode(HandlerContext & ctx, const Commands::ChangeToMode::DecodableType & commandData) { + MATTER_TRACE_SCOPE("ChangeToMode", "ModeBase"); uint8_t newMode = commandData.newMode; Commands::ChangeToModeResponse::Type response; diff --git a/src/app/clusters/mode-select-server/mode-select-server.cpp b/src/app/clusters/mode-select-server/mode-select-server.cpp index 2c9d88c1872737..4ca641e8e48d95 100644 --- a/src/app/clusters/mode-select-server/mode-select-server.cpp +++ b/src/app/clusters/mode-select-server/mode-select-server.cpp @@ -32,6 +32,7 @@ #include #include #include +#include #ifdef EMBER_AF_PLUGIN_ON_OFF #include @@ -98,6 +99,7 @@ CHIP_ERROR ModeSelectAttrAccess::Read(const ConcreteReadAttributePath & aPath, A bool emberAfModeSelectClusterChangeToModeCallback(CommandHandler * commandHandler, const ConcreteCommandPath & commandPath, const ModeSelect::Commands::ChangeToMode::DecodableType & commandData) { + MATTER_TRACE_SCOPE("ChangeToMode", "ModeSelect"); ChipLogProgress(Zcl, "ModeSelect: Entering emberAfModeSelectClusterChangeToModeCallback"); EndpointId endpointId = commandPath.mEndpointId; uint8_t newMode = commandData.newMode; diff --git a/src/app/clusters/on-off-server/on-off-server.cpp b/src/app/clusters/on-off-server/on-off-server.cpp index eb867fb4ef893c..ea7dd0786a9917 100644 --- a/src/app/clusters/on-off-server/on-off-server.cpp +++ b/src/app/clusters/on-off-server/on-off-server.cpp @@ -24,6 +24,7 @@ #include #include #include +#include #ifdef EMBER_AF_PLUGIN_SCENES_MANAGEMENT #include @@ -341,6 +342,7 @@ EmberAfStatus OnOffServer::getOnOffValue(chip::EndpointId endpoint, bool * curre */ EmberAfStatus OnOffServer::setOnOffValue(chip::EndpointId endpoint, chip::CommandId command, bool initiatedByLevelChange) { + MATTER_TRACE_SCOPE("setOnOffValue", "OnOff"); EmberAfStatus status; bool currentValue, newValue; @@ -568,6 +570,7 @@ EmberAfStatus OnOffServer::getOnOffValueForStartUp(chip::EndpointId endpoint, bo bool OnOffServer::offCommand(app::CommandHandler * commandObj, const app::ConcreteCommandPath & commandPath) { + MATTER_TRACE_SCOPE("OffCommand", "OnOff"); EmberAfStatus status = setOnOffValue(commandPath.mEndpointId, Commands::Off::Id, false); commandObj->AddStatus(commandPath, app::ToInteractionModelStatus(status)); @@ -576,6 +579,7 @@ bool OnOffServer::offCommand(app::CommandHandler * commandObj, const app::Concre bool OnOffServer::onCommand(app::CommandHandler * commandObj, const app::ConcreteCommandPath & commandPath) { + MATTER_TRACE_SCOPE("OnCommand", "OnOff"); EmberAfStatus status = setOnOffValue(commandPath.mEndpointId, Commands::On::Id, false); commandObj->AddStatus(commandPath, app::ToInteractionModelStatus(status)); @@ -584,6 +588,7 @@ bool OnOffServer::onCommand(app::CommandHandler * commandObj, const app::Concret bool OnOffServer::toggleCommand(app::CommandHandler * commandObj, const app::ConcreteCommandPath & commandPath) { + MATTER_TRACE_SCOPE("ToggleCommand", "OnOff"); EmberAfStatus status = setOnOffValue(commandPath.mEndpointId, Commands::Toggle::Id, false); commandObj->AddStatus(commandPath, app::ToInteractionModelStatus(status)); @@ -593,6 +598,7 @@ bool OnOffServer::toggleCommand(app::CommandHandler * commandObj, const app::Con bool OnOffServer::offWithEffectCommand(app::CommandHandler * commandObj, const app::ConcreteCommandPath & commandPath, const Commands::OffWithEffect::DecodableType & commandData) { + MATTER_TRACE_SCOPE("offWithEffectCommand", "OnOff"); auto effectId = commandData.effectIdentifier; auto effectVariant = commandData.effectVariant; chip::EndpointId endpoint = commandPath.mEndpointId; @@ -650,6 +656,7 @@ bool OnOffServer::offWithEffectCommand(app::CommandHandler * commandObj, const a bool OnOffServer::OnWithRecallGlobalSceneCommand(app::CommandHandler * commandObj, const app::ConcreteCommandPath & commandPath) { + MATTER_TRACE_SCOPE("OnWithRecallGlobalSceneCommand", "OnOff"); chip::EndpointId endpoint = commandPath.mEndpointId; if (!SupportsLightingApplications(endpoint)) @@ -711,6 +718,7 @@ uint32_t OnOffServer::calculateNextWaitTimeMS() bool OnOffServer::OnWithTimedOffCommand(app::CommandHandler * commandObj, const app::ConcreteCommandPath & commandPath, const Commands::OnWithTimedOff::DecodableType & commandData) { + MATTER_TRACE_SCOPE("OnWithTimedOffCommand", "OnOff"); BitFlags onOffControl = commandData.onOffControl; uint16_t onTime = commandData.onTime; uint16_t offWaitTime = commandData.offWaitTime; diff --git a/src/app/clusters/scenes-server/scenes-server.cpp b/src/app/clusters/scenes-server/scenes-server.cpp index 29dbab3b119cf9..05e8ec8addb23d 100644 --- a/src/app/clusters/scenes-server/scenes-server.cpp +++ b/src/app/clusters/scenes-server/scenes-server.cpp @@ -31,6 +31,7 @@ #include #include #include +#include using SceneTableEntry = chip::scenes::DefaultSceneTableImpl::SceneTableEntry; using SceneStorageId = chip::scenes::DefaultSceneTableImpl::SceneStorageId; @@ -812,16 +813,19 @@ void ScenesServer::RemoveFabric(EndpointId aEndpointId, FabricIndex aFabricIndex void ScenesServer::HandleAddScene(HandlerContext & ctx, const Commands::AddScene::DecodableType & req) { + MATTER_TRACE_SCOPE("AddScene", "Scenes"); AddSceneParse(ctx, req, mGroupProvider); } void ScenesServer::HandleViewScene(HandlerContext & ctx, const Commands::ViewScene::DecodableType & req) { + MATTER_TRACE_SCOPE("ViewScene", "Scenes"); ViewSceneParse(ctx, req, mGroupProvider); } void ScenesServer::HandleRemoveScene(HandlerContext & ctx, const Commands::RemoveScene::DecodableType & req) { + MATTER_TRACE_SCOPE("RemoveScene", "Scenes"); Commands::RemoveSceneResponse::Type response; uint16_t endpointTableSize = 0; @@ -878,6 +882,7 @@ void ScenesServer::HandleRemoveScene(HandlerContext & ctx, const Commands::Remov void ScenesServer::HandleRemoveAllScenes(HandlerContext & ctx, const Commands::RemoveAllScenes::DecodableType & req) { + MATTER_TRACE_SCOPE("RemoveAllScenes", "Scenes"); Commands::RemoveAllScenesResponse::Type response; uint16_t endpointTableSize = 0; @@ -927,6 +932,7 @@ void ScenesServer::HandleRemoveAllScenes(HandlerContext & ctx, const Commands::R void ScenesServer::HandleStoreScene(HandlerContext & ctx, const Commands::StoreScene::DecodableType & req) { + MATTER_TRACE_SCOPE("StoreScene", "Scenes"); Commands::StoreSceneResponse::Type response; // Response data @@ -947,6 +953,7 @@ void ScenesServer::HandleStoreScene(HandlerContext & ctx, const Commands::StoreS void ScenesServer::HandleRecallScene(HandlerContext & ctx, const Commands::RecallScene::DecodableType & req) { + MATTER_TRACE_SCOPE("RecallScene", "Scenes"); CHIP_ERROR err = RecallSceneParse(ctx.mCommandHandler.GetAccessingFabricIndex(), ctx.mRequestPath.mEndpointId, req.groupID, req.sceneID, req.transitionTime, mGroupProvider); @@ -968,6 +975,7 @@ void ScenesServer::HandleRecallScene(HandlerContext & ctx, const Commands::Recal void ScenesServer::HandleGetSceneMembership(HandlerContext & ctx, const Commands::GetSceneMembership::DecodableType & req) { + MATTER_TRACE_SCOPE("GetSceneMembership", "Scenes"); Commands::GetSceneMembershipResponse::Type response; uint16_t endpointTableSize = 0; @@ -1014,15 +1022,18 @@ void ScenesServer::HandleGetSceneMembership(HandlerContext & ctx, const Commands void ScenesServer::HandleEnhancedAddScene(HandlerContext & ctx, const Commands::EnhancedAddScene::DecodableType & req) { + MATTER_TRACE_SCOPE("EnhancedAddScene", "Scenes"); AddSceneParse(ctx, req, mGroupProvider); } void ScenesServer::HandleEnhancedViewScene(HandlerContext & ctx, const Commands::EnhancedViewScene::DecodableType & req) { + MATTER_TRACE_SCOPE("EnhancedViewScene", "Scenes"); ViewSceneParse(ctx, req, mGroupProvider); } void ScenesServer::HandleCopyScene(HandlerContext & ctx, const Commands::CopyScene::DecodableType & req) { + MATTER_TRACE_SCOPE("CopyScene", "Scenes"); Commands::CopySceneResponse::Type response; uint16_t endpointTableSize = 0; diff --git a/src/app/clusters/wifi-network-diagnostics-server/wifi-network-diagnostics-server.cpp b/src/app/clusters/wifi-network-diagnostics-server/wifi-network-diagnostics-server.cpp index 52a98d7b157b82..bd02f36d731cf2 100644 --- a/src/app/clusters/wifi-network-diagnostics-server/wifi-network-diagnostics-server.cpp +++ b/src/app/clusters/wifi-network-diagnostics-server/wifi-network-diagnostics-server.cpp @@ -27,6 +27,7 @@ #include #include #include +#include using namespace chip; using namespace chip::app; @@ -242,6 +243,7 @@ class WiFiDiagnosticsDelegate : public DeviceLayer::WiFiDiagnosticsDelegate // Gets called when the Node detects Node’s Wi-Fi connection has been disconnected. void OnDisconnectionDetected(uint16_t reasonCode) override { + MATTER_TRACE_SCOPE("OnDisconnectionDetected", "WiFiDiagnosticsDelegate"); ChipLogProgress(Zcl, "WiFiDiagnosticsDelegate: OnDisconnectionDetected"); for (auto endpoint : EnabledEndpointsWithServerCluster(WiFiNetworkDiagnostics::Id)) @@ -260,6 +262,7 @@ class WiFiDiagnosticsDelegate : public DeviceLayer::WiFiDiagnosticsDelegate // Gets called when the Node fails to associate or authenticate an access point. void OnAssociationFailureDetected(uint8_t associationFailureCause, uint16_t status) override { + MATTER_TRACE_SCOPE("OnAssociationFailureDetected", "WiFiDiagnosticsDelegate"); ChipLogProgress(Zcl, "WiFiDiagnosticsDelegate: OnAssociationFailureDetected"); Events::AssociationFailure::Type event{ static_cast(associationFailureCause), status }; @@ -279,6 +282,7 @@ class WiFiDiagnosticsDelegate : public DeviceLayer::WiFiDiagnosticsDelegate // Gets when the Node’s connection status to a Wi-Fi network has changed. void OnConnectionStatusChanged(uint8_t connectionStatus) override { + MATTER_TRACE_SCOPE("OnConnectionStatusChanged", "WiFiDiagnosticsDelegate"); ChipLogProgress(Zcl, "WiFiDiagnosticsDelegate: OnConnectionStatusChanged"); Events::ConnectionStatus::Type event{ static_cast(connectionStatus) }; diff --git a/src/credentials/BUILD.gn b/src/credentials/BUILD.gn index 0e23eb497cf702..6aa10311560fa5 100644 --- a/src/credentials/BUILD.gn +++ b/src/credentials/BUILD.gn @@ -128,6 +128,8 @@ static_library("credentials") { "${chip_root}/src/lib/support", "${chip_root}/src/platform", "${chip_root}/src/protocols:type_definitions", + "${chip_root}/src/tracing", + "${chip_root}/src/tracing:macros", "${nlassert_root}:nlassert", ] } diff --git a/src/credentials/FabricTable.cpp b/src/credentials/FabricTable.cpp index 0091fdec291c30..ade5189a738f27 100644 --- a/src/credentials/FabricTable.cpp +++ b/src/credentials/FabricTable.cpp @@ -29,6 +29,7 @@ #include #include #include +#include namespace chip { using namespace Credentials; @@ -279,6 +280,7 @@ CHIP_ERROR FabricTable::ValidateIncomingNOCChain(const ByteSpan & noc, const Byt NodeId & outNodeId, Crypto::P256PublicKey & outNocPubkey, Crypto::P256PublicKey & outRootPubkey) { + MATTER_TRACE_SCOPE("ValidateIncomingNOCChain", "Fabric"); Credentials::ValidationContext validContext; // Note that we do NOT set a time in the validation context. This will @@ -328,6 +330,7 @@ CHIP_ERROR FabricTable::ValidateIncomingNOCChain(const ByteSpan & noc, const Byt CHIP_ERROR FabricInfo::SignWithOpKeypair(ByteSpan message, P256ECDSASignature & outSignature) const { + MATTER_TRACE_SCOPE("SignWithOpKeypair", "Fabric"); VerifyOrReturnError(mOperationalKey != nullptr, CHIP_ERROR_KEY_NOT_FOUND); return mOperationalKey->ECDSA_sign_msg(message.data(), message.size(), outSignature); @@ -335,6 +338,7 @@ CHIP_ERROR FabricInfo::SignWithOpKeypair(ByteSpan message, P256ECDSASignature & CHIP_ERROR FabricInfo::FetchRootPubkey(Crypto::P256PublicKey & outPublicKey) const { + MATTER_TRACE_SCOPE("FetchRootPubKey", "Fabric"); VerifyOrReturnError(IsInitialized(), CHIP_ERROR_KEY_NOT_FOUND); outPublicKey = mRootPublicKey; return CHIP_NO_ERROR; @@ -345,6 +349,7 @@ CHIP_ERROR FabricTable::VerifyCredentials(FabricIndex fabricIndex, const ByteSpa FabricId & outFabricId, NodeId & outNodeId, Crypto::P256PublicKey & outNocPubkey, Crypto::P256PublicKey * outRootPublicKey) const { + MATTER_TRACE_SCOPE("VerifyCredentials", "Fabric"); assertChipStackLockedByCurrentThread(); uint8_t rootCertBuf[kMaxCHIPCertLength]; MutableByteSpan rootCertSpan{ rootCertBuf }; @@ -562,12 +567,14 @@ const FabricInfo * FabricTable::FindFabricWithCompressedId(CompressedFabricId co CHIP_ERROR FabricTable::FetchRootCert(FabricIndex fabricIndex, MutableByteSpan & outCert) const { + MATTER_TRACE_SCOPE("FetchRootCert", "Fabric"); VerifyOrReturnError(mOpCertStore != nullptr, CHIP_ERROR_INCORRECT_STATE); return mOpCertStore->GetCertificate(fabricIndex, CertChainElement::kRcac, outCert); } CHIP_ERROR FabricTable::FetchPendingNonFabricAssociatedRootCert(MutableByteSpan & outCert) const { + MATTER_TRACE_SCOPE("FetchPendingNonFabricAssociatedRootCert", "Fabric"); VerifyOrReturnError(mOpCertStore != nullptr, CHIP_ERROR_INCORRECT_STATE); if (!mStateFlags.Has(StateFlags::kIsTrustedRootPending)) { @@ -586,6 +593,7 @@ CHIP_ERROR FabricTable::FetchPendingNonFabricAssociatedRootCert(MutableByteSpan CHIP_ERROR FabricTable::FetchICACert(FabricIndex fabricIndex, MutableByteSpan & outCert) const { + MATTER_TRACE_SCOPE("FetchICACert", "Fabric"); VerifyOrReturnError(mOpCertStore != nullptr, CHIP_ERROR_INCORRECT_STATE); CHIP_ERROR err = mOpCertStore->GetCertificate(fabricIndex, CertChainElement::kIcac, outCert); @@ -605,12 +613,14 @@ CHIP_ERROR FabricTable::FetchICACert(FabricIndex fabricIndex, MutableByteSpan & CHIP_ERROR FabricTable::FetchNOCCert(FabricIndex fabricIndex, MutableByteSpan & outCert) const { + MATTER_TRACE_SCOPE("FetchNOCCert", "Fabric"); VerifyOrReturnError(mOpCertStore != nullptr, CHIP_ERROR_INCORRECT_STATE); return mOpCertStore->GetCertificate(fabricIndex, CertChainElement::kNoc, outCert); } CHIP_ERROR FabricTable::FetchRootPubkey(FabricIndex fabricIndex, Crypto::P256PublicKey & outPublicKey) const { + MATTER_TRACE_SCOPE("FetchRootPubkey", "Fabric"); const FabricInfo * fabricInfo = FindFabricWithIndex(fabricIndex); ReturnErrorCodeIf(fabricInfo == nullptr, CHIP_ERROR_INVALID_FABRIC_INDEX); return fabricInfo->FetchRootPubkey(outPublicKey); @@ -747,6 +757,7 @@ class NotBeforeCollector : public Credentials::CertificateValidityPolicy CHIP_ERROR FabricTable::NotifyFabricUpdated(FabricIndex fabricIndex) { + MATTER_TRACE_SCOPE("NotifyFabricUpdated", "Fabric"); FabricTable::Delegate * delegate = mDelegateListRoot; while (delegate) { @@ -761,6 +772,8 @@ CHIP_ERROR FabricTable::NotifyFabricUpdated(FabricIndex fabricIndex) CHIP_ERROR FabricTable::NotifyFabricCommitted(FabricIndex fabricIndex) { + MATTER_TRACE_SCOPE("NotifyFabricCommitted", "Fabric"); + FabricTable::Delegate * delegate = mDelegateListRoot; while (delegate) { @@ -919,6 +932,7 @@ FabricTable::AddOrUpdateInner(FabricIndex fabricIndex, bool isAddition, Crypto:: CHIP_ERROR FabricTable::Delete(FabricIndex fabricIndex) { + MATTER_TRACE_SCOPE("Delete", "Fabric"); VerifyOrReturnError(mStorage != nullptr, CHIP_ERROR_INVALID_ARGUMENT); VerifyOrReturnError(IsValidFabricIndex(fabricIndex), CHIP_ERROR_INVALID_ARGUMENT); @@ -1608,6 +1622,7 @@ CHIP_ERROR FabricTable::AddNewPendingTrustedRootCert(const ByteSpan & rcac) CHIP_ERROR FabricTable::FindExistingFabricByNocChaining(FabricIndex pendingFabricIndex, const ByteSpan & noc, FabricIndex & outMatchingFabricIndex) const { + MATTER_TRACE_SCOPE("FindExistingFabricByNocChaining", "Fabric"); // Check whether we already have a matching fabric from a cert chain perspective. // To do so we have to extract the FabricID from the NOC and the root public key from the RCAC. // We assume the RCAC is currently readable from OperationalCertificateStore, whether pending @@ -1653,6 +1668,7 @@ CHIP_ERROR FabricTable::AddNewPendingFabricCommon(const ByteSpan & noc, const By Crypto::P256Keypair * existingOpKey, bool isExistingOpKeyExternallyOwned, AdvertiseIdentity advertiseIdentity, FabricIndex * outNewFabricIndex) { + MATTER_TRACE_SCOPE("AddNewPendingFabricCommon", "Fabric"); VerifyOrReturnError(mOpCertStore != nullptr, CHIP_ERROR_INCORRECT_STATE); VerifyOrReturnError(outNewFabricIndex != nullptr, CHIP_ERROR_INVALID_ARGUMENT); static_assert(kMaxValidFabricIndex <= UINT8_MAX, "Cannot create more fabrics than UINT8_MAX"); @@ -1724,6 +1740,7 @@ CHIP_ERROR FabricTable::UpdatePendingFabricCommon(FabricIndex fabricIndex, const Crypto::P256Keypair * existingOpKey, bool isExistingOpKeyExternallyOwned, AdvertiseIdentity advertiseIdentity) { + MATTER_TRACE_SCOPE("UpdatePendingFabricCommon", "Fabric"); VerifyOrReturnError(mOpCertStore != nullptr, CHIP_ERROR_INCORRECT_STATE); VerifyOrReturnError(IsValidFabricIndex(fabricIndex), CHIP_ERROR_INVALID_ARGUMENT); @@ -2009,6 +2026,7 @@ CHIP_ERROR FabricTable::CommitPendingFabricData() void FabricTable::RevertPendingFabricData() { + MATTER_TRACE_SCOPE("RevertPendingFabricData", "Fabric"); // Will clear pending UpdateNoc/AddNOC RevertPendingOpCertsExceptRoot(); @@ -2031,6 +2049,7 @@ void FabricTable::RevertPendingFabricData() void FabricTable::RevertPendingOpCertsExceptRoot() { + MATTER_TRACE_SCOPE("RevertPendingOpCertsExceptRoot", "Fabric"); mPendingFabric.Reset(); if (mStateFlags.Has(StateFlags::kIsPendingFabricDataPresent)) diff --git a/src/protocols/secure_channel/CASEServer.cpp b/src/protocols/secure_channel/CASEServer.cpp index f8d580fdd9957b..d701d8c568c584 100644 --- a/src/protocols/secure_channel/CASEServer.cpp +++ b/src/protocols/secure_channel/CASEServer.cpp @@ -21,6 +21,7 @@ #include #include #include +#include #include using namespace ::chip::Inet; @@ -58,6 +59,7 @@ CHIP_ERROR CASEServer::ListenForSessionEstablishment(Messaging::ExchangeManager CHIP_ERROR CASEServer::InitCASEHandshake(Messaging::ExchangeContext * ec) { + MATTER_TRACE_SCOPE("InitCASEHandshake", "CASEServer"); ReturnErrorCodeIf(ec == nullptr, CHIP_ERROR_INVALID_ARGUMENT); // Hand over the exchange context to the CASE session. @@ -76,6 +78,7 @@ CHIP_ERROR CASEServer::OnUnsolicitedMessageReceived(const PayloadHeader & payloa CHIP_ERROR CASEServer::OnMessageReceived(Messaging::ExchangeContext * ec, const PayloadHeader & payloadHeader, System::PacketBufferHandle && payload) { + MATTER_TRACE_SCOPE("OnMessageReceived", "CASEServer"); if (GetSession().GetState() != CASESession::State::kInitialized) { // We are in the middle of CASE handshake @@ -177,6 +180,7 @@ void CASEServer::PrepareForSessionEstablishment(const ScopedNodeId & previouslyE void CASEServer::OnSessionEstablishmentError(CHIP_ERROR err) { + MATTER_TRACE_SCOPE("OnSessionEstablishmentError", "CASEServer"); ChipLogError(Inet, "CASE Session establishment failed: %" CHIP_ERROR_FORMAT, err.Format()); PrepareForSessionEstablishment(); @@ -184,6 +188,7 @@ void CASEServer::OnSessionEstablishmentError(CHIP_ERROR err) void CASEServer::OnSessionEstablished(const SessionHandle & session) { + MATTER_TRACE_SCOPE("OnSessionEstablished", "CASEServer"); ChipLogProgress(Inet, "CASE Session established to peer: " ChipLogFormatScopedNodeId, ChipLogValueScopedNodeId(session->GetPeer())); PrepareForSessionEstablishment(session->GetPeer()); @@ -191,6 +196,7 @@ void CASEServer::OnSessionEstablished(const SessionHandle & session) CHIP_ERROR CASEServer::SendBusyStatusReport(Messaging::ExchangeContext * ec, System::Clock::Milliseconds16 minimumWaitTime) { + MATTER_TRACE_SCOPE("SendBusyStatusReport", "CASEServer"); ChipLogProgress(Inet, "Already in the middle of CASE handshake, sending busy status report"); System::PacketBufferHandle handle = Protocols::SecureChannel::StatusReport::MakeBusyStatusReportMessage(minimumWaitTime); diff --git a/src/protocols/secure_channel/CASESession.cpp b/src/protocols/secure_channel/CASESession.cpp index 296ba0848150c7..8573d1565686fe 100644 --- a/src/protocols/secure_channel/CASESession.cpp +++ b/src/protocols/secure_channel/CASESession.cpp @@ -386,6 +386,7 @@ void CASESession::OnSessionReleased() void CASESession::Clear() { + MATTER_TRACE_SCOPE("Clear", "CASESession"); // Cancel any outstanding work. if (mSendSigma3Helper) { @@ -436,6 +437,7 @@ void CASESession::InvalidateIfPendingEstablishmentOnFabric(FabricIndex fabricInd CHIP_ERROR CASESession::Init(SessionManager & sessionManager, Credentials::CertificateValidityPolicy * policy, SessionEstablishmentDelegate * delegate, const ScopedNodeId & sessionEvictionHint) { + MATTER_TRACE_SCOPE("Init", "CASESession"); VerifyOrReturnError(delegate != nullptr, CHIP_ERROR_INVALID_ARGUMENT); VerifyOrReturnError(mGroupDataProvider != nullptr, CHIP_ERROR_INVALID_ARGUMENT); VerifyOrReturnError(sessionManager.GetSessionKeystore() != nullptr, CHIP_ERROR_INVALID_ARGUMENT); @@ -462,6 +464,7 @@ CASESession::PrepareForSessionEstablishment(SessionManager & sessionManager, Fab SessionEstablishmentDelegate * delegate, const ScopedNodeId & previouslyEstablishedPeer, Optional mrpLocalConfig) { + MATTER_TRACE_SCOPE("PrepareForSessionEstablishment", "CASESession"); // Below VerifyOrReturnError is not SuccessOrExit since we only want to goto `exit:` after // Init has been successfully called. VerifyOrReturnError(fabricTable != nullptr, CHIP_ERROR_INVALID_ARGUMENT); @@ -544,6 +547,7 @@ CHIP_ERROR CASESession::EstablishSession(SessionManager & sessionManager, Fabric void CASESession::OnResponseTimeout(ExchangeContext * ec) { + MATTER_TRACE_SCOPE("OnResponseTimeout", "CASESession"); VerifyOrReturn(ec != nullptr, ChipLogError(SecureChannel, "CASESession::OnResponseTimeout was called by null exchange")); VerifyOrReturn(mExchangeCtxt == ec, ChipLogError(SecureChannel, "CASESession::OnResponseTimeout exchange doesn't match")); ChipLogError(SecureChannel, "CASESession timed out while waiting for a response from the peer. Current state was %u", @@ -556,6 +560,7 @@ void CASESession::OnResponseTimeout(ExchangeContext * ec) void CASESession::AbortPendingEstablish(CHIP_ERROR err) { + MATTER_TRACE_SCOPE("AbortPendingEstablish", "CASESession"); // This needs to come before Clear() which will reset mState. SessionEstablishmentStage state = MapCASEStateToSessionEstablishmentStage(mState); Clear(); @@ -751,6 +756,7 @@ CHIP_ERROR CASESession::HandleSigma1_and_SendSigma2(System::PacketBufferHandle & CHIP_ERROR CASESession::FindLocalNodeFromDestinationId(const ByteSpan & destinationId, const ByteSpan & initiatorRandom) { + MATTER_TRACE_SCOPE("FindLocalNodeFromDestinationId", "CASESession"); VerifyOrReturnError(mFabricsTable != nullptr, CHIP_ERROR_INCORRECT_STATE); bool found = false; @@ -805,6 +811,7 @@ CHIP_ERROR CASESession::FindLocalNodeFromDestinationId(const ByteSpan & destinat CHIP_ERROR CASESession::TryResumeSession(SessionResumptionStorage::ConstResumptionIdView resumptionId, ByteSpan resume1MIC, ByteSpan initiatorRandom) { + MATTER_TRACE_SCOPE("TryResumeSession", "CASESession"); VerifyOrReturnError(mSessionResumptionStorage != nullptr, CHIP_ERROR_INCORRECT_STATE); VerifyOrReturnError(mFabricsTable != nullptr, CHIP_ERROR_INCORRECT_STATE); @@ -2095,6 +2102,7 @@ CHIP_ERROR CASESession::ValidateReceivedMessage(ExchangeContext * ec, const Payl CHIP_ERROR CASESession::OnMessageReceived(ExchangeContext * ec, const PayloadHeader & payloadHeader, System::PacketBufferHandle && msg) { + MATTER_TRACE_SCOPE("OnMessageReceived", "CASESession"); CHIP_ERROR err = ValidateReceivedMessage(ec, payloadHeader, msg); Protocols::SecureChannel::MsgType msgType = static_cast(payloadHeader.GetMessageType()); SuccessOrExit(err); diff --git a/src/protocols/secure_channel/PASESession.cpp b/src/protocols/secure_channel/PASESession.cpp index da168fa7c79c95..67da1d103ebf83 100644 --- a/src/protocols/secure_channel/PASESession.cpp +++ b/src/protocols/secure_channel/PASESession.cpp @@ -89,6 +89,7 @@ void PASESession::Finish() void PASESession::Clear() { + MATTER_TRACE_SCOPE("Clear", "PASESession"); // This function zeroes out and resets the memory used by the object. // It's done so that no security related information will be leaked. memset(&mPASEVerifier, 0, sizeof(mPASEVerifier)); @@ -112,6 +113,7 @@ void PASESession::Clear() CHIP_ERROR PASESession::Init(SessionManager & sessionManager, uint32_t setupCode, SessionEstablishmentDelegate * delegate) { + MATTER_TRACE_SCOPE("Init", "PASESession"); VerifyOrReturnError(sessionManager.GetSessionKeystore() != nullptr, CHIP_ERROR_INVALID_ARGUMENT); VerifyOrReturnError(delegate != nullptr, CHIP_ERROR_INVALID_ARGUMENT); @@ -242,6 +244,7 @@ CHIP_ERROR PASESession::Pair(SessionManager & sessionManager, uint32_t peerSetUp void PASESession::OnResponseTimeout(ExchangeContext * ec) { + MATTER_TRACE_SCOPE("OnResponseTimeout", "PASESession"); VerifyOrReturn(ec != nullptr, ChipLogError(SecureChannel, "PASESession::OnResponseTimeout was called by null exchange")); VerifyOrReturn(mExchangeCtxt == nullptr || mExchangeCtxt == ec, ChipLogError(SecureChannel, "PASESession::OnResponseTimeout exchange doesn't match")); @@ -691,7 +694,6 @@ CHIP_ERROR PASESession::HandleMsg2_and_SendMsg3(System::PacketBufferHandle && ms mNextExpectedMsg.SetValue(MsgType::StatusReport); } - ChipLogDetail(SecureChannel, "Sent spake2p msg3"); exit: @@ -814,6 +816,7 @@ CHIP_ERROR PASESession::OnUnsolicitedMessageReceived(const PayloadHeader & paylo CHIP_ERROR PASESession::OnMessageReceived(ExchangeContext * exchange, const PayloadHeader & payloadHeader, System::PacketBufferHandle && msg) { + MATTER_TRACE_SCOPE("OnMessageReceived", "PASESession"); CHIP_ERROR err = ValidateReceivedMessage(exchange, payloadHeader, msg); MsgType msgType = static_cast(payloadHeader.GetMessageType()); SuccessOrExit(err); diff --git a/src/tracing/esp32_trace/esp32_tracing.cpp b/src/tracing/esp32_trace/esp32_tracing.cpp index 24a7166dde04eb..7a1313089703f2 100644 --- a/src/tracing/esp32_trace/esp32_tracing.cpp +++ b/src/tracing/esp32_trace/esp32_tracing.cpp @@ -29,7 +29,7 @@ namespace Tracing { namespace Insights { namespace { -constexpr size_t kPermitListMaxSize = 10; +constexpr size_t kPermitListMaxSize = 20; using HashValue = uint32_t; // Implements a murmurhash with 0 seed. @@ -66,13 +66,13 @@ uint32_t MurmurHash(const void * key) * are well known permitted entries. */ -HashValue gPermitList[kPermitListMaxSize] = { - MurmurHash("PASESession"), - MurmurHash("CASESession"), - MurmurHash("NetworkCommissioning"), - MurmurHash("GeneralCommissioning"), - MurmurHash("OperationalCredentials"), -}; +HashValue gPermitList[kPermitListMaxSize] = { MurmurHash("PASESession"), + MurmurHash("CASESession"), + MurmurHash("NetworkCommissioning"), + MurmurHash("GeneralCommissioning"), + MurmurHash("OperationalCredentials"), + MurmurHash("CASEServer"), + MurmurHash("Fabric") }; // namespace bool IsPermitted(HashValue hashValue) { From 049fef0a90f93da037d9afd12e448980482f9279 Mon Sep 17 00:00:00 2001 From: tianfeng-yang <130436698+tianfeng-yang@users.noreply.github.com> Date: Fri, 19 Jan 2024 17:10:04 +0800 Subject: [PATCH 21/25] [Linux] Device scanning status using state machine and fix error status (#31412) * [Linux] Modify the device scanning status to a state machine * Restyled by clang-format * [Linux] Use a mutex to avoid potential race conditions with BLE scanners. * [Linux] use std::lock_guard instead of manually unlock * [Linux] fix bug: mutex is nonmoveable * [Linux] Turn scanning on and off in the same thread(ChipStack) --------- Co-authored-by: Restyled.io --- src/platform/Linux/BLEManagerImpl.cpp | 7 +- .../Linux/bluez/ChipDeviceScanner.cpp | 91 ++++++++++--------- src/platform/Linux/bluez/ChipDeviceScanner.h | 20 +++- 3 files changed, 71 insertions(+), 47 deletions(-) diff --git a/src/platform/Linux/BLEManagerImpl.cpp b/src/platform/Linux/BLEManagerImpl.cpp index 10a17be7607735..e46e9c5d21edf2 100644 --- a/src/platform/Linux/BLEManagerImpl.cpp +++ b/src/platform/Linux/BLEManagerImpl.cpp @@ -776,11 +776,14 @@ void BLEManagerImpl::OnDeviceScanned(BluezDevice1 & device, const chip::Ble::Chi mBLEScanConfig.mBleScanState = BleScanState::kConnecting; chip::DeviceLayer::PlatformMgr().LockChipStack(); + // We StartScan in the ChipStack thread. + // StopScan should also be performed in the ChipStack thread. + // At the same time, the scan timer also needs to be canceled in the ChipStack thread. + mDeviceScanner.StopScan(); + // Stop scanning and then start connecting timer DeviceLayer::SystemLayer().StartTimer(kConnectTimeout, HandleConnectTimeout, &mEndpoint); chip::DeviceLayer::PlatformMgr().UnlockChipStack(); - mDeviceScanner.StopScan(); - mEndpoint.ConnectDevice(device); } diff --git a/src/platform/Linux/bluez/ChipDeviceScanner.cpp b/src/platform/Linux/bluez/ChipDeviceScanner.cpp index 1670dfc082bebd..3a3115a9ae4783 100644 --- a/src/platform/Linux/bluez/ChipDeviceScanner.cpp +++ b/src/platform/Linux/bluez/ChipDeviceScanner.cpp @@ -80,23 +80,17 @@ CHIP_ERROR ChipDeviceScanner::Init(BluezAdapter1 * adapter, ChipDeviceScannerDel }, this)); - mIsInitialized = true; + mScannerState = ChipDeviceScannerState::SCANNER_INITIALIZED; + return CHIP_NO_ERROR; } void ChipDeviceScanner::Shutdown() { - VerifyOrReturn(mIsInitialized); + VerifyOrReturn(mScannerState != ChipDeviceScannerState::SCANNER_UNINITIALIZED); StopScan(); - // mTimerExpired should only be set to true in the TimerExpiredCallback, which means we are in that callback - // right now so there is no need to cancel the timer. - if (!mTimerExpired) - { - chip::DeviceLayer::SystemLayer().CancelTimer(TimerExpiredCallback, this); - } - // Release resources on the glib thread. This is necessary because the D-Bus manager client // object handles D-Bus signals. Otherwise, we might face a race when the manager object is // released during a D-Bus signal being processed. @@ -112,29 +106,32 @@ void ChipDeviceScanner::Shutdown() }, this); - mIsInitialized = false; + mScannerState = ChipDeviceScannerState::SCANNER_UNINITIALIZED; } CHIP_ERROR ChipDeviceScanner::StartScan(System::Clock::Timeout timeout) { assertChipStackLockedByCurrentThread(); - VerifyOrReturnError(mIsInitialized, CHIP_ERROR_INCORRECT_STATE); - VerifyOrReturnError(!mIsScanning, CHIP_ERROR_INCORRECT_STATE); + VerifyOrReturnError(mScannerState != ChipDeviceScannerState::SCANNER_SCANNING, CHIP_ERROR_INCORRECT_STATE); + VerifyOrReturnError(mTimerState == ScannerTimerState::TIMER_CANCELED, CHIP_ERROR_INCORRECT_STATE); - mIsScanning = true; // optimistic, to allow all callbacks to check this if (PlatformMgrImpl().GLibMatterContextInvokeSync(MainLoopStartScan, this) != CHIP_NO_ERROR) { ChipLogError(Ble, "Failed to schedule BLE scan start."); - mIsScanning = false; - return CHIP_ERROR_INTERNAL; - } - if (!mIsScanning) - { - ChipLogError(Ble, "Failed to start BLE scan."); + ChipDeviceScannerDelegate * delegate = this->mDelegate; + // callback is explicitly allowed to delete the scanner (hence no more + // references to 'self' here) + delegate->OnScanComplete(); + return CHIP_ERROR_INTERNAL; } + // Here need to set the Bluetooth scanning status immediately. + // So that if the timer fails to start in the next step, + // calling StopScan will be effective. + mScannerState = ChipDeviceScannerState::SCANNER_SCANNING; + CHIP_ERROR err = chip::DeviceLayer::SystemLayer().StartTimer(timeout, TimerExpiredCallback, static_cast(this)); if (err != CHIP_NO_ERROR) @@ -143,7 +140,9 @@ CHIP_ERROR ChipDeviceScanner::StartScan(System::Clock::Timeout timeout) StopScan(); return err; } - mTimerExpired = false; + mTimerState = ScannerTimerState::TIMER_STARTED; + + ChipLogDetail(Ble, "ChipDeviceScanner has started scanning!"); return CHIP_NO_ERROR; } @@ -151,37 +150,35 @@ CHIP_ERROR ChipDeviceScanner::StartScan(System::Clock::Timeout timeout) void ChipDeviceScanner::TimerExpiredCallback(chip::System::Layer * layer, void * appState) { ChipDeviceScanner * chipDeviceScanner = static_cast(appState); - chipDeviceScanner->mTimerExpired = true; + chipDeviceScanner->mTimerState = ScannerTimerState::TIMER_EXPIRED; chipDeviceScanner->mDelegate->OnScanError(CHIP_ERROR_TIMEOUT); chipDeviceScanner->StopScan(); } CHIP_ERROR ChipDeviceScanner::StopScan() { - VerifyOrReturnError(mIsScanning, CHIP_NO_ERROR); - VerifyOrReturnError(!mIsStopping, CHIP_NO_ERROR); - - mIsStopping = true; - g_cancellable_cancel(mCancellable); // in case we are currently running a scan + assertChipStackLockedByCurrentThread(); + VerifyOrReturnError(mScannerState == ChipDeviceScannerState::SCANNER_SCANNING, CHIP_NO_ERROR); - if (mObjectAddedSignal) + if (PlatformMgrImpl().GLibMatterContextInvokeSync(MainLoopStopScan, this) != CHIP_NO_ERROR) { - g_signal_handler_disconnect(mManager, mObjectAddedSignal); - mObjectAddedSignal = 0; + ChipLogError(Ble, "Failed to schedule BLE scan stop."); + return CHIP_ERROR_INTERNAL; } - if (mInterfaceChangedSignal) - { - g_signal_handler_disconnect(mManager, mInterfaceChangedSignal); - mInterfaceChangedSignal = 0; - } + // Stop scanning and return to initialization state + mScannerState = ChipDeviceScannerState::SCANNER_INITIALIZED; - if (PlatformMgrImpl().GLibMatterContextInvokeSync(MainLoopStopScan, this) != CHIP_NO_ERROR) + ChipLogDetail(Ble, "ChipDeviceScanner has stopped scanning!"); + + if (mTimerState == ScannerTimerState::TIMER_STARTED) { - ChipLogError(Ble, "Failed to schedule BLE scan stop."); - return CHIP_ERROR_INTERNAL; + chip::DeviceLayer::SystemLayer().CancelTimer(TimerExpiredCallback, this); } + // Reset timer status + mTimerState = ScannerTimerState::TIMER_CANCELED; + ChipDeviceScannerDelegate * delegate = this->mDelegate; // callback is explicitly allowed to delete the scanner (hence no more // references to 'self' here) @@ -194,12 +191,26 @@ CHIP_ERROR ChipDeviceScanner::MainLoopStopScan(ChipDeviceScanner * self) { GAutoPtr error; + g_cancellable_cancel(self->mCancellable); // in case we are currently running a scan + + if (self->mObjectAddedSignal) + { + g_signal_handler_disconnect(self->mManager, self->mObjectAddedSignal); + self->mObjectAddedSignal = 0; + } + + if (self->mInterfaceChangedSignal) + { + g_signal_handler_disconnect(self->mManager, self->mInterfaceChangedSignal); + self->mInterfaceChangedSignal = 0; + } + if (!bluez_adapter1_call_stop_discovery_sync(self->mAdapter, nullptr /* not cancellable */, &MakeUniquePointerReceiver(error).Get())) { ChipLogError(Ble, "Failed to stop discovery %s", error->message); + return CHIP_ERROR_INTERNAL; } - self->mIsScanning = false; return CHIP_NO_ERROR; } @@ -304,9 +315,7 @@ CHIP_ERROR ChipDeviceScanner::MainLoopStartScan(ChipDeviceScanner * self) if (!bluez_adapter1_call_start_discovery_sync(self->mAdapter, self->mCancellable, &MakeUniquePointerReceiver(error).Get())) { ChipLogError(Ble, "Failed to start discovery: %s", error->message); - - self->mIsScanning = false; - self->mDelegate->OnScanComplete(); + return CHIP_ERROR_INTERNAL; } return CHIP_NO_ERROR; diff --git a/src/platform/Linux/bluez/ChipDeviceScanner.h b/src/platform/Linux/bluez/ChipDeviceScanner.h index 16b8c91682650c..4785a737869dda 100644 --- a/src/platform/Linux/bluez/ChipDeviceScanner.h +++ b/src/platform/Linux/bluez/ChipDeviceScanner.h @@ -75,6 +75,20 @@ class ChipDeviceScanner CHIP_ERROR StopScan(); private: + enum ChipDeviceScannerState + { + SCANNER_UNINITIALIZED, + SCANNER_INITIALIZED, + SCANNER_SCANNING + }; + + enum ScannerTimerState + { + TIMER_CANCELED, + TIMER_STARTED, + TIMER_EXPIRED + }; + static void TimerExpiredCallback(chip::System::Layer * layer, void * appState); static CHIP_ERROR MainLoopStartScan(ChipDeviceScanner * self); static CHIP_ERROR MainLoopStopScan(ChipDeviceScanner * self); @@ -96,11 +110,9 @@ class ChipDeviceScanner ChipDeviceScannerDelegate * mDelegate = nullptr; gulong mObjectAddedSignal = 0; gulong mInterfaceChangedSignal = 0; - bool mIsInitialized = false; - bool mIsScanning = false; - bool mIsStopping = false; + ChipDeviceScannerState mScannerState = ChipDeviceScannerState::SCANNER_UNINITIALIZED; /// Used to track if timer has already expired and doesn't need to be canceled. - bool mTimerExpired = false; + ScannerTimerState mTimerState = ScannerTimerState::TIMER_CANCELED; }; } // namespace Internal From b2ff997c33475257e5104ca5c73ed5c8cf701986 Mon Sep 17 00:00:00 2001 From: Tennessee Carmel-Veilleux Date: Fri, 19 Jan 2024 08:46:43 -0500 Subject: [PATCH 22/25] Make UpTime attribute mandatory in ZAP RootNode (#31535) - ZAP tool RootNode device type now has UpTime mandatory. It is only mandatory for rev >= 2 (e.g. current rev) but could not be made mandatory in SDK "directly" since it was optional before. Now the test cases check for UpTime presence to be mandatory (TC-DGGEN-1.1), but this change makes it so ZAP will warn if somehow the attribute is not present. Fixes #30023 Testing done: - Ran ZAP tool and saw the warning on removing UpTime attribute in Endpoint 0. --- .../zcl/data-model/chip/general-diagnostics-cluster.xml | 3 ++- .../zap-templates/zcl/data-model/chip/matter-devices.xml | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/app/zap-templates/zcl/data-model/chip/general-diagnostics-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/general-diagnostics-cluster.xml index 7d6fe3eb1b88ed..5e1ec18a71f345 100644 --- a/src/app/zap-templates/zcl/data-model/chip/general-diagnostics-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/general-diagnostics-cluster.xml @@ -86,7 +86,8 @@ limitations under the License. NetworkInterfaces RebootCount - + UpTime TotalOperationalHours BootReason diff --git a/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml b/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml index 7fd03bd0bf41aa..a3eff6c18a7065 100644 --- a/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml +++ b/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml @@ -78,7 +78,9 @@ limitations under the License. HOUR_FORMAT - + + UP_TIME + @@ -1871,7 +1873,7 @@ limitations under the License. - + From 626ef41232e54df7ef38810f385b16dd00d7167b Mon Sep 17 00:00:00 2001 From: OmAmbalkar <36728913+OmAmbalkar@users.noreply.github.com> Date: Fri, 19 Jan 2024 07:55:49 -0600 Subject: [PATCH 23/25] Allowing null values to be set for SelectedDrynessLevel (#31522) * Allowing null values to be set for SelectedDrynessLevel in LaundryDryerControls * Restyled by clang-format --------- Co-authored-by: Restyled.io --- .../laundry-dryer-controls-server.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/app/clusters/laundry-dryer-controls-server/laundry-dryer-controls-server.cpp b/src/app/clusters/laundry-dryer-controls-server/laundry-dryer-controls-server.cpp index 32adbefc76ed65..3c3bc524269da7 100644 --- a/src/app/clusters/laundry-dryer-controls-server/laundry-dryer-controls-server.cpp +++ b/src/app/clusters/laundry-dryer-controls-server/laundry-dryer-controls-server.cpp @@ -163,6 +163,10 @@ Status MatterLaundryDryerControlsClusterServerPreAttributeChangedCallback(const { case Attributes::SelectedDrynessLevel::Id: { uint8_t drynessLevelIdx = 0; + if (NumericAttributeTraits::IsNullValue(*value)) + { + return Status::Success; + } while (true) { DrynessLevelEnum supportedDryness; From 9f1e15eb609e5776c37db76fa1b86a7ef6e4bd5d Mon Sep 17 00:00:00 2001 From: Erwin Pan Date: Fri, 19 Jan 2024 21:57:05 +0800 Subject: [PATCH 24/25] Disable Chef build RVC device temporarilly (#31542) due to build broken --- integrations/cloudbuild/chef.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integrations/cloudbuild/chef.yaml b/integrations/cloudbuild/chef.yaml index 45af39306ff657..fe448c8cb48415 100644 --- a/integrations/cloudbuild/chef.yaml +++ b/integrations/cloudbuild/chef.yaml @@ -18,7 +18,7 @@ steps: args: - >- perl -i -pe 's/^gdbgui==/# gdbgui==/' /opt/espressif/esp-idf/requirements.txt && - ./examples/chef/chef.py --build_all --build_exclude noip --build_exclude basicvideo + ./examples/chef/chef.py --build_all --build_exclude noip --build_exclude basicvideo --build_exclude roboticvacuumcleaner id: CompileAll waitFor: - Bootstrap From d758a672834325df37b82df6b77afc1c2c771f44 Mon Sep 17 00:00:00 2001 From: C Freeman Date: Fri, 19 Jan 2024 09:24:15 -0500 Subject: [PATCH 25/25] python testing: Add top-level PICS markers to all tests (#31523) Without these, all the python tests will be run on every device on the TH. --- src/python_testing/TC_DRLK_2_12.py | 3 +++ src/python_testing/TC_DRLK_2_2.py | 3 +++ src/python_testing/TC_DRLK_2_3.py | 3 +++ src/python_testing/TC_EEVSE_2_2.py | 2 +- src/python_testing/TC_EEVSE_2_4.py | 2 +- src/python_testing/TC_EEVSE_2_5.py | 2 +- src/python_testing/TC_FAN_3_3.py | 3 +++ src/python_testing/TC_FAN_3_4.py | 3 +++ src/python_testing/TC_FAN_3_5.py | 3 +++ src/python_testing/TC_ICDM_2_1.py | 3 +++ src/python_testing/TC_OPSTATE_2_1.py | 3 +++ src/python_testing/TC_OPSTATE_2_3.py | 3 +++ src/python_testing/TC_RVCCLEANM_1_2.py | 3 +++ src/python_testing/TC_RVCCLEANM_2_1.py | 3 +++ src/python_testing/TC_RVCCLEANM_3_2.py | 3 +++ src/python_testing/TC_RVCOPSTATE_2_1.py | 3 +++ src/python_testing/TC_RVCOPSTATE_2_3.py | 3 +++ src/python_testing/TC_RVCRUNM_1_2.py | 3 +++ src/python_testing/TC_RVCRUNM_2_1.py | 3 +++ src/python_testing/TC_RVCRUNM_3_2.py | 3 +++ src/python_testing/TC_TIMESYNC_2_1.py | 3 +++ src/python_testing/TC_TIMESYNC_2_10.py | 3 +++ src/python_testing/TC_TIMESYNC_2_11.py | 3 +++ src/python_testing/TC_TIMESYNC_2_12.py | 3 +++ src/python_testing/TC_TIMESYNC_2_13.py | 3 +++ src/python_testing/TC_TIMESYNC_2_2.py | 3 +++ src/python_testing/TC_TIMESYNC_2_4.py | 3 +++ src/python_testing/TC_TIMESYNC_2_5.py | 3 +++ src/python_testing/TC_TIMESYNC_2_6.py | 3 +++ src/python_testing/TC_TIMESYNC_2_7.py | 3 +++ src/python_testing/TC_TIMESYNC_2_8.py | 3 +++ src/python_testing/TC_TIMESYNC_2_9.py | 3 +++ src/python_testing/TC_TIMESYNC_3_1.py | 3 +++ 33 files changed, 93 insertions(+), 3 deletions(-) diff --git a/src/python_testing/TC_DRLK_2_12.py b/src/python_testing/TC_DRLK_2_12.py index a0b4f7909158ff..a6dec950fdcb32 100644 --- a/src/python_testing/TC_DRLK_2_12.py +++ b/src/python_testing/TC_DRLK_2_12.py @@ -38,6 +38,9 @@ async def teardown_test(self): await self.teardown() return super().teardown_test() + def pics_TC_DRLK_2_12(self) -> list[str]: + return ["DRLK.S.F0c"] + @async_test_body async def test_TC_DRLK_2_12(self): await self.run_drlk_test_2_12() diff --git a/src/python_testing/TC_DRLK_2_2.py b/src/python_testing/TC_DRLK_2_2.py index 787e8c37b93dc2..3ce14da9615617 100644 --- a/src/python_testing/TC_DRLK_2_2.py +++ b/src/python_testing/TC_DRLK_2_2.py @@ -38,6 +38,9 @@ async def teardown_test(self): await self.teardown() return super().teardown_test() + def pics_TC_DRLK_2_2(self) -> list[str]: + return ["DRLK.S"] + @async_test_body async def test_TC_DRLK_2_2(self): await self.run_drlk_test_2_2() diff --git a/src/python_testing/TC_DRLK_2_3.py b/src/python_testing/TC_DRLK_2_3.py index b114171ddd0457..7d9995dfad2e96 100644 --- a/src/python_testing/TC_DRLK_2_3.py +++ b/src/python_testing/TC_DRLK_2_3.py @@ -38,6 +38,9 @@ async def teardown_test(self): await self.teardown() return super().teardown_test() + def pics_TC_DRLK_2_3(self) -> list[str]: + return ["DRLK.S"] + @async_test_body async def test_TC_DRLK_2_3(self): await self.run_drlk_test_2_3() diff --git a/src/python_testing/TC_EEVSE_2_2.py b/src/python_testing/TC_EEVSE_2_2.py index 8ebc78a22e94cd..1651f4daa4040b 100644 --- a/src/python_testing/TC_EEVSE_2_2.py +++ b/src/python_testing/TC_EEVSE_2_2.py @@ -37,7 +37,7 @@ def desc_TC_EEVSE_2_2(self) -> str: def pics_TC_EEVSE_2_2(self): """ This function returns a list of PICS for this test case that must be True for the test to be run""" # In this case - there is no feature flags needed to run this test case - return None + return ["EEVSE.S"] def steps_TC_EEVSE_2_2(self) -> list[TestStep]: steps = [ diff --git a/src/python_testing/TC_EEVSE_2_4.py b/src/python_testing/TC_EEVSE_2_4.py index 9379e23332e813..63adbe5a8563ab 100644 --- a/src/python_testing/TC_EEVSE_2_4.py +++ b/src/python_testing/TC_EEVSE_2_4.py @@ -35,7 +35,7 @@ def desc_TC_EEVSE_2_4(self) -> str: def pics_TC_EEVSE_2_4(self): """ This function returns a list of PICS for this test case that must be True for the test to be run""" # In this case - there is no feature flags needed to run this test case - return None + return ["EEVSE.S"] def steps_TC_EEVSE_2_4(self) -> list[TestStep]: steps = [ diff --git a/src/python_testing/TC_EEVSE_2_5.py b/src/python_testing/TC_EEVSE_2_5.py index 34ca0151935f93..4a32b5a6d7ad6d 100644 --- a/src/python_testing/TC_EEVSE_2_5.py +++ b/src/python_testing/TC_EEVSE_2_5.py @@ -35,7 +35,7 @@ def desc_TC_EEVSE_2_5(self) -> str: def pics_TC_EEVSE_2_5(self): """ This function returns a list of PICS for this test case that must be True for the test to be run""" # In this case - there is no feature flags needed to run this test case - return None + return ["EEVSE.S"] def steps_TC_EEVSE_2_5(self) -> list[TestStep]: steps = [ diff --git a/src/python_testing/TC_FAN_3_3.py b/src/python_testing/TC_FAN_3_3.py index 79ac3e1077817f..c1f0993466c434 100644 --- a/src/python_testing/TC_FAN_3_3.py +++ b/src/python_testing/TC_FAN_3_3.py @@ -42,6 +42,9 @@ async def write_rock_setting(self, endpoint, rock_setting): result = await self.default_controller.WriteAttribute(self.dut_node_id, [(endpoint, Clusters.FanControl.Attributes.RockSetting(rock_setting))]) asserts.assert_equal(result[0].Status, Status.Success, "RockSetting write failed") + def pics_TC_FAN_3_3(self) -> list[str]: + return ["FAN.S"] + @async_test_body async def test_TC_FAN_3_3(self): if not self.check_pics("FAN.S.F02"): diff --git a/src/python_testing/TC_FAN_3_4.py b/src/python_testing/TC_FAN_3_4.py index af18ba5082a14a..9eb20f1ca035e9 100644 --- a/src/python_testing/TC_FAN_3_4.py +++ b/src/python_testing/TC_FAN_3_4.py @@ -42,6 +42,9 @@ async def write_wind_setting(self, endpoint, wind_setting): result = await self.default_controller.WriteAttribute(self.dut_node_id, [(endpoint, Clusters.FanControl.Attributes.WindSetting(wind_setting))]) asserts.assert_equal(result[0].Status, Status.Success, "WindSetting write failed") + def pics_TC_FAN_3_4(self) -> list[str]: + return ["FAN.S"] + @async_test_body async def test_TC_FAN_3_4(self): if not self.check_pics("FAN.S.F03"): diff --git a/src/python_testing/TC_FAN_3_5.py b/src/python_testing/TC_FAN_3_5.py index f02f6fd3adf6ab..9fe598b446290c 100644 --- a/src/python_testing/TC_FAN_3_5.py +++ b/src/python_testing/TC_FAN_3_5.py @@ -58,6 +58,9 @@ async def send_step_command(self, endpoint, asserts.assert_equal(e.status, expected_status, "Unexpected error returned") pass + def pics_TC_FAN_3_5(self) -> list[str]: + return ["FAN.S"] + @async_test_body async def test_TC_FAN_3_5(self): if not self.check_pics("FAN.S.F04"): diff --git a/src/python_testing/TC_ICDM_2_1.py b/src/python_testing/TC_ICDM_2_1.py index 20770c400ddd3f..21a3082ef282a9 100644 --- a/src/python_testing/TC_ICDM_2_1.py +++ b/src/python_testing/TC_ICDM_2_1.py @@ -29,6 +29,9 @@ async def read_icdm_attribute_expect_success(self, endpoint, attribute): cluster = Clusters.Objects.IcdManagement return await self.read_single_attribute_check_success(endpoint=endpoint, cluster=cluster, attribute=attribute) + def pics_TC_ICDM_2_1(self) -> list[str]: + return ["ICDM.S"] + @async_test_body async def test_TC_ICDM_2_1(self): diff --git a/src/python_testing/TC_OPSTATE_2_1.py b/src/python_testing/TC_OPSTATE_2_1.py index f532a1cdfecb08..98dbe83dc09057 100644 --- a/src/python_testing/TC_OPSTATE_2_1.py +++ b/src/python_testing/TC_OPSTATE_2_1.py @@ -49,6 +49,9 @@ async def read_and_validate_operror(self, step, expected_error): asserts.assert_equal(operational_error.errorStateID, expected_error, "errorStateID(%s) should equal %s" % (operational_error.errorStateID, expected_error)) + def pics_TC_OPSTATE_2_1(self) -> list[str]: + return ["OPSTATE.S"] + @async_test_body async def test_TC_OPSTATE_2_1(self): diff --git a/src/python_testing/TC_OPSTATE_2_3.py b/src/python_testing/TC_OPSTATE_2_3.py index 2f8a9687703dbb..e7906c0ed225f0 100644 --- a/src/python_testing/TC_OPSTATE_2_3.py +++ b/src/python_testing/TC_OPSTATE_2_3.py @@ -46,6 +46,9 @@ async def send_resume_cmd(self) -> Clusters.Objects.OperationalState.Commands.Re "Unexpected return type for Resume") return ret + def pics_TC_OPSTATE_2_3(self) -> list[str]: + return ["OPSTATE.S"] + @async_test_body async def test_TC_OPSTATE_2_3(self): diff --git a/src/python_testing/TC_RVCCLEANM_1_2.py b/src/python_testing/TC_RVCCLEANM_1_2.py index cbda91e1945f90..a3a764830e96be 100644 --- a/src/python_testing/TC_RVCCLEANM_1_2.py +++ b/src/python_testing/TC_RVCCLEANM_1_2.py @@ -33,6 +33,9 @@ async def read_mod_attribute_expect_success(self, endpoint, attribute): cluster = Clusters.Objects.RvcCleanMode return await self.read_single_attribute_check_success(endpoint=endpoint, cluster=cluster, attribute=attribute) + def pics_TC_RVCCLEANM_1_2(self) -> list[str]: + return ["RVCCLEANM.S"] + @async_test_body async def test_TC_RVCCLEANM_1_2(self): diff --git a/src/python_testing/TC_RVCCLEANM_2_1.py b/src/python_testing/TC_RVCCLEANM_2_1.py index 3cc58041b6ea37..56743b6192551e 100644 --- a/src/python_testing/TC_RVCCLEANM_2_1.py +++ b/src/python_testing/TC_RVCCLEANM_2_1.py @@ -38,6 +38,9 @@ async def send_change_to_mode_cmd(self, newMode) -> Clusters.Objects.RvcCleanMod "Unexpected return type for ChangeToMode") return ret + def pics_TC_RVCCLEANM_2_1(self) -> list[str]: + return ["RVCCLEANM.S"] + @async_test_body async def test_TC_RVCCLEANM_2_1(self): diff --git a/src/python_testing/TC_RVCCLEANM_3_2.py b/src/python_testing/TC_RVCCLEANM_3_2.py index 0ac29273c20b7d..d65a3b26fc6f84 100644 --- a/src/python_testing/TC_RVCCLEANM_3_2.py +++ b/src/python_testing/TC_RVCCLEANM_3_2.py @@ -69,6 +69,9 @@ async def check_preconditions(self, endpoint): return False + def pics_TC_RVCCLEANM_3_2(self) -> list[str]: + return ["RVCCLEANM.S.A0002"] + @async_test_body async def test_TC_RVCCLEANM_3_2(self): diff --git a/src/python_testing/TC_RVCOPSTATE_2_1.py b/src/python_testing/TC_RVCOPSTATE_2_1.py index 58c012c459ec86..8ca7a00ab2c134 100644 --- a/src/python_testing/TC_RVCOPSTATE_2_1.py +++ b/src/python_testing/TC_RVCOPSTATE_2_1.py @@ -49,6 +49,9 @@ async def read_and_validate_operror(self, step, expected_error): asserts.assert_equal(operational_error.errorStateID, expected_error, "errorStateID(%s) should equal %s" % (operational_error.errorStateID, expected_error)) + def TC_RVCOPSTATE_2_1(self) -> list[str]: + return ["RVCOPSTATE.S"] + @async_test_body async def test_TC_RVCOPSTATE_2_1(self): diff --git a/src/python_testing/TC_RVCOPSTATE_2_3.py b/src/python_testing/TC_RVCOPSTATE_2_3.py index c1cd3b073f7454..a0a6af47726d74 100644 --- a/src/python_testing/TC_RVCOPSTATE_2_3.py +++ b/src/python_testing/TC_RVCOPSTATE_2_3.py @@ -46,6 +46,9 @@ async def send_resume_cmd(self) -> Clusters.Objects.RvcOperationalState.Commands "Unexpected return type for Resume") return ret + def TC_RVCOPSTATE_2_3(self) -> list[str]: + return ["RVCOPSTATE.S"] + @async_test_body async def test_TC_RVCOPSTATE_2_3(self): diff --git a/src/python_testing/TC_RVCRUNM_1_2.py b/src/python_testing/TC_RVCRUNM_1_2.py index 8ee3e93bb42cb9..68684e45dd5c61 100644 --- a/src/python_testing/TC_RVCRUNM_1_2.py +++ b/src/python_testing/TC_RVCRUNM_1_2.py @@ -33,6 +33,9 @@ async def read_mod_attribute_expect_success(self, endpoint, attribute): cluster = Clusters.Objects.RvcRunMode return await self.read_single_attribute_check_success(endpoint=endpoint, cluster=cluster, attribute=attribute) + def pics_TC_RVCRUNM_1_2(self) -> list[str]: + return ["RVCRUNM.S"] + @async_test_body async def test_TC_RVCRUNM_1_2(self): diff --git a/src/python_testing/TC_RVCRUNM_2_1.py b/src/python_testing/TC_RVCRUNM_2_1.py index 332f4e6ae7a4f4..20229d1b7dd00d 100644 --- a/src/python_testing/TC_RVCRUNM_2_1.py +++ b/src/python_testing/TC_RVCRUNM_2_1.py @@ -38,6 +38,9 @@ async def send_change_to_mode_cmd(self, newMode) -> Clusters.Objects.RvcRunMode. "Unexpected return type for ChangeToMode") return ret + def pics_TC_RVCRUNM_2_1(self) -> list[str]: + return ["RVCRUNM.S"] + @async_test_body async def test_TC_RVCRUNM_2_1(self): diff --git a/src/python_testing/TC_RVCRUNM_3_2.py b/src/python_testing/TC_RVCRUNM_3_2.py index 09d99f4864b15f..0b33c706325e81 100644 --- a/src/python_testing/TC_RVCRUNM_3_2.py +++ b/src/python_testing/TC_RVCRUNM_3_2.py @@ -69,6 +69,9 @@ async def check_preconditions(self, endpoint): return False + def pics_TC_RVCRUNM_3_2(self) -> list[str]: + return ["RVCRUNM.S"] + @async_test_body async def test_TC_RVCRUNM_3_2(self): diff --git a/src/python_testing/TC_TIMESYNC_2_1.py b/src/python_testing/TC_TIMESYNC_2_1.py index 9973c0c675cd79..12e588b0424e11 100644 --- a/src/python_testing/TC_TIMESYNC_2_1.py +++ b/src/python_testing/TC_TIMESYNC_2_1.py @@ -29,6 +29,9 @@ async def read_ts_attribute_expect_success(self, endpoint, attribute): cluster = Clusters.Objects.TimeSynchronization return await self.read_single_attribute_check_success(endpoint=endpoint, cluster=cluster, attribute=attribute) + def pics_TC_TIMESYNC_2_1(self) -> list[str]: + return ["TIMESYNC.S"] + @async_test_body async def test_TC_TIMESYNC_2_1(self): diff --git a/src/python_testing/TC_TIMESYNC_2_10.py b/src/python_testing/TC_TIMESYNC_2_10.py index 4b66b707c01113..b59e88dcfcb317 100644 --- a/src/python_testing/TC_TIMESYNC_2_10.py +++ b/src/python_testing/TC_TIMESYNC_2_10.py @@ -45,6 +45,9 @@ async def send_set_dst_cmd(self, dst: typing.List[Clusters.Objects.TimeSynchroni async def send_set_utc_cmd(self, utc: uint) -> None: await self.send_single_cmd(cmd=Clusters.Objects.TimeSynchronization.Commands.SetUTCTime(UTCTime=utc, granularity=Clusters.Objects.TimeSynchronization.Enums.GranularityEnum.kMillisecondsGranularity)) + def pics_TC_TIMESYNC_2_10(self) -> list[str]: + return ["TIMESYNC.S.F00"] + @async_test_body async def test_TC_TIMESYNC_2_10(self): diff --git a/src/python_testing/TC_TIMESYNC_2_11.py b/src/python_testing/TC_TIMESYNC_2_11.py index 3e0a4e070c1ca2..ed91a12779ee1b 100644 --- a/src/python_testing/TC_TIMESYNC_2_11.py +++ b/src/python_testing/TC_TIMESYNC_2_11.py @@ -51,6 +51,9 @@ def wait_for_dst_status(self, th_utc, wait_s, expect_active): asserts.fail("Did not receive DSTStatus event") pass + def pics_TC_TIMESYNC_2_11(self) -> list[str]: + return ["TIMESYNC.S.F00"] + @async_test_body async def test_TC_TIMESYNC_2_11(self): diff --git a/src/python_testing/TC_TIMESYNC_2_12.py b/src/python_testing/TC_TIMESYNC_2_12.py index 500fda6f985abb..048c37677cc7e1 100644 --- a/src/python_testing/TC_TIMESYNC_2_12.py +++ b/src/python_testing/TC_TIMESYNC_2_12.py @@ -51,6 +51,9 @@ def wait_for_tz_status(self, th_utc, wait_s, expected_offset, expected_name): except queue.Empty: asserts.fail("Did not receive TZStatus event") + def pics_TC_TIMESYNC_2_12(self) -> list[str]: + return ["TIMESYNC.S.F00"] + @async_test_body async def test_TC_TIMESYNC_2_12(self): diff --git a/src/python_testing/TC_TIMESYNC_2_13.py b/src/python_testing/TC_TIMESYNC_2_13.py index ddebc27d287162..ceabb23e5df5c7 100644 --- a/src/python_testing/TC_TIMESYNC_2_13.py +++ b/src/python_testing/TC_TIMESYNC_2_13.py @@ -34,6 +34,9 @@ def wait_for_trusted_time_souce_event(self, timeout): except queue.Empty: asserts.fail("Did not receive MissingTrustedTimeSouce event") + def pics_TC_TIMESYNC_2_13(self) -> list[str]: + return ["TIMESYNC.S.F01"] + @async_test_body async def test_TC_TIMESYNC_2_13(self): diff --git a/src/python_testing/TC_TIMESYNC_2_2.py b/src/python_testing/TC_TIMESYNC_2_2.py index f364c4443b3390..e80dcab0738181 100644 --- a/src/python_testing/TC_TIMESYNC_2_2.py +++ b/src/python_testing/TC_TIMESYNC_2_2.py @@ -29,6 +29,9 @@ async def read_ts_attribute_expect_success(self, endpoint, attribute): cluster = Clusters.Objects.TimeSynchronization return await self.read_single_attribute_check_success(endpoint=endpoint, cluster=cluster, attribute=attribute) + def pics_TC_TIMESYNC_2_2(self) -> list[str]: + return ["TIMESYNC.S"] + @async_test_body async def test_TC_TIMESYNC_2_2(self): diff --git a/src/python_testing/TC_TIMESYNC_2_4.py b/src/python_testing/TC_TIMESYNC_2_4.py index b6b9644fd52719..20cfb21fb89fcd 100644 --- a/src/python_testing/TC_TIMESYNC_2_4.py +++ b/src/python_testing/TC_TIMESYNC_2_4.py @@ -43,6 +43,9 @@ async def send_set_time_zone_cmd_expect_error(self, tz: typing.List[Clusters.Obj asserts.assert_equal(e.status, error, "Unexpected error returned") pass + def pics_TC_TIMESYNC_2_4(self) -> list[str]: + return ["TIMESYNC.S.F00"] + @async_test_body async def test_TC_TIMESYNC_2_4(self): diff --git a/src/python_testing/TC_TIMESYNC_2_5.py b/src/python_testing/TC_TIMESYNC_2_5.py index c0a384d6c8a2b0..ed221258972398 100644 --- a/src/python_testing/TC_TIMESYNC_2_5.py +++ b/src/python_testing/TC_TIMESYNC_2_5.py @@ -40,6 +40,9 @@ async def send_set_dst_cmd_expect_error(self, dst: typing.List[Clusters.Objects. asserts.assert_equal(e.status, error, "Unexpected error returned") pass + def pics_TC_TIMESYNC_2_5(self) -> list[str]: + return ["TIMESYNC.S.F00"] + @async_test_body async def test_TC_TIMESYNC_2_5(self): diff --git a/src/python_testing/TC_TIMESYNC_2_6.py b/src/python_testing/TC_TIMESYNC_2_6.py index ebd02ff3622f83..bd57aa477e808f 100644 --- a/src/python_testing/TC_TIMESYNC_2_6.py +++ b/src/python_testing/TC_TIMESYNC_2_6.py @@ -40,6 +40,9 @@ async def send_set_default_ntp_cmd_expect_error(self, ntp: typing.Union[Nullable asserts.assert_equal(e.status, error, "Unexpected error returned") pass + def pics_TC_TIMESYNC_2_6(self) -> list[str]: + return ["TIMESYNC.S.F01"] + @async_test_body async def test_TC_TIMESYNC_2_6(self): diff --git a/src/python_testing/TC_TIMESYNC_2_7.py b/src/python_testing/TC_TIMESYNC_2_7.py index 8af89465bd3e5a..7928128d6b5311 100644 --- a/src/python_testing/TC_TIMESYNC_2_7.py +++ b/src/python_testing/TC_TIMESYNC_2_7.py @@ -46,6 +46,9 @@ async def send_set_dst_cmd(self, dst: typing.List[Clusters.Objects.TimeSynchroni async def send_set_utc_cmd(self, utc: uint) -> None: await self.send_single_cmd(cmd=Clusters.Objects.TimeSynchronization.Commands.SetUTCTime(UTCTime=utc, granularity=Clusters.Objects.TimeSynchronization.Enums.GranularityEnum.kMillisecondsGranularity)) + def pics_TC_TIMESYNC_2_7(self) -> list[str]: + return ["TIMESYNC.S.F00"] + @async_test_body async def test_TC_TIMESYNC_2_7(self): diff --git a/src/python_testing/TC_TIMESYNC_2_8.py b/src/python_testing/TC_TIMESYNC_2_8.py index 828b962ea5fef8..dd0c0c55e0c5ed 100644 --- a/src/python_testing/TC_TIMESYNC_2_8.py +++ b/src/python_testing/TC_TIMESYNC_2_8.py @@ -50,6 +50,9 @@ async def send_set_dst_cmd(self, dst: typing.List[Clusters.Objects.TimeSynchroni async def send_set_utc_cmd(self, utc: uint) -> None: await self.send_single_cmd(cmd=Clusters.Objects.TimeSynchronization.Commands.SetUTCTime(UTCTime=utc, granularity=Clusters.Objects.TimeSynchronization.Enums.GranularityEnum.kMillisecondsGranularity)) + def pics_TC_TIMESYNC_2_8(self) -> list[str]: + return ["TIMESYNC.S.F00"] + @async_test_body async def test_TC_TIMESYNC_2_8(self): diff --git a/src/python_testing/TC_TIMESYNC_2_9.py b/src/python_testing/TC_TIMESYNC_2_9.py index a1d10d4c9616cc..e73c919ce40c2b 100644 --- a/src/python_testing/TC_TIMESYNC_2_9.py +++ b/src/python_testing/TC_TIMESYNC_2_9.py @@ -45,6 +45,9 @@ async def send_set_dst_cmd(self, dst: typing.List[Clusters.Objects.TimeSynchroni async def send_set_utc_cmd(self, utc: uint) -> None: await self.send_single_cmd(cmd=Clusters.Objects.TimeSynchronization.Commands.SetUTCTime(UTCTime=utc, granularity=Clusters.Objects.TimeSynchronization.Enums.GranularityEnum.kMillisecondsGranularity)) + def pics_TC_TIMESYNC_2_9(self) -> list[str]: + return ["TIMESYNC.S.F00"] + @async_test_body async def test_TC_TIMESYNC_2_9(self): diff --git a/src/python_testing/TC_TIMESYNC_3_1.py b/src/python_testing/TC_TIMESYNC_3_1.py index f05730e58dcad0..f7cff6d20e2e22 100644 --- a/src/python_testing/TC_TIMESYNC_3_1.py +++ b/src/python_testing/TC_TIMESYNC_3_1.py @@ -22,6 +22,9 @@ class TC_TIMESYNC_3_1(MatterBaseTest): + def pics_TC_TIMESYNC_3_1(self) -> list[str]: + return ["TIMESYNC.S"] + @async_test_body async def test_TC_TIMESYNC_3_1(self): self.print_step(1, "Wildcard read of time sync cluster")