From 36b22967debb377bf4720376a303577154099cd9 Mon Sep 17 00:00:00 2001 From: Chin-Ran Lo Date: Mon, 8 Jul 2024 10:01:39 +0200 Subject: [PATCH 1/6] Fix Matter 1.3 certifiction TC-LWM-1.1 case that feature-map should be 0 Signed-off-by: Chin-Ran Lo (cherry picked from commit 21c40394dd0df65b1dd07e6cf9545f9d5cb1af25) --- examples/laundry-washer-app/nxp/zephyr/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/laundry-washer-app/nxp/zephyr/CMakeLists.txt b/examples/laundry-washer-app/nxp/zephyr/CMakeLists.txt index 9103b6a5567102..589b95415e918a 100644 --- a/examples/laundry-washer-app/nxp/zephyr/CMakeLists.txt +++ b/examples/laundry-washer-app/nxp/zephyr/CMakeLists.txt @@ -108,7 +108,7 @@ target_sources(app ${ALL_CLUSTERS_COMMON_DIR}/src/bridged-actions-stub.cpp ${ALL_CLUSTERS_COMMON_DIR}/src/static-supported-modes-manager.cpp ${ALL_CLUSTERS_COMMON_DIR}/src/static-supported-temperature-levels.cpp - ${ALL_CLUSTERS_COMMON_DIR}/src/laundry-washer-mode.cpp + ${LAUNDRY_WASHER_NXP_COMMON_DIR}/main/laundry-washer-mode.cpp ${ALL_CLUSTERS_COMMON_DIR}/src/laundry-washer-controls-delegate-impl.cpp ${LAUNDRY_WASHER_NXP_COMMON_DIR}/main/operational-state-delegate-impl.cpp ${EXAMPLE_PLATFORM_NXP_COMMON_DIR}/icd/source/ICDUtil.cpp From ef7d58250f8c715556ab148dd395733d45acef41 Mon Sep 17 00:00:00 2001 From: Oliver Fan Date: Mon, 14 Oct 2024 23:00:07 -0700 Subject: [PATCH 2/6] Update laundry washer ZAP file to pass TC-IDM-10.2/10.4/10.5 during Matter 1.4 SVE Signed-off-by: Oliver Fan [nxp toup][laundry-washer-app][common] Update laundry washer to pass TC-OPSTATE-2.6 during Matter 1.4 SVE Signed-off-by: Oliver Fan [nxp toup][laundry-washer-app][RW612][RTOS] Update RW612 RTOS laundry washer app to pass TC-OPSTATE-2.6 during Matter 1.4 SVE Signed-off-by: Oliver Fan [nxp toup][laundry-washer-app][RT1170][RTOS] Update RT1170+IW612 RTOS laundry washer app to pass TC-OPSTATE-2.6 during Matter 1.4 SVE Signed-off-by: Oliver Fan [nxp toup][laundry-washer-app][RW612][Zephyr] Update laundry washer to pass TC-OPSTATE-2.6, TC-IDM-10.2/10.4/10.5 during Matter 1.4 SVE Signed-off-by: Oliver Fan --- .../nxp/common/main/AppTask.cpp | 9 +- .../include/operational-state-delegate-impl.h | 120 --- .../main/operational-state-delegate-impl.cpp | 142 --- .../laundry-washer-app/nxp/rt/rt1170/BUILD.gn | 3 +- .../laundry-washer-app/nxp/rt/rw61x/BUILD.gn | 3 +- .../nxp/zap/laundry-washer-app.matter | 418 ++------ .../nxp/zap/laundry-washer-app.zap | 990 +++++------------- .../nxp/zephyr/CMakeLists.txt | 3 +- 8 files changed, 383 insertions(+), 1305 deletions(-) delete mode 100644 examples/laundry-washer-app/nxp/common/main/include/operational-state-delegate-impl.h delete mode 100644 examples/laundry-washer-app/nxp/common/main/operational-state-delegate-impl.cpp diff --git a/examples/laundry-washer-app/nxp/common/main/AppTask.cpp b/examples/laundry-washer-app/nxp/common/main/AppTask.cpp index 5d82dcf92ef7b3..3b5f25e0cfeb6c 100644 --- a/examples/laundry-washer-app/nxp/common/main/AppTask.cpp +++ b/examples/laundry-washer-app/nxp/common/main/AppTask.cpp @@ -21,6 +21,7 @@ #include "AppTask.h" #include "CHIPDeviceManager.h" #include "ICDUtil.h" +#include #include #include @@ -85,8 +86,12 @@ static CHIP_ERROR cliOpState(int argc, char * argv[]) if (map_cmd_opstate.find(argv[0]) != map_cmd_opstate.end()) { - OperationalState::GetOperationalStateInstance()->SetOperationalState(map_cmd_opstate.at(argv[0])); - ChipLogDetail(Shell, "OpSState : Set to %s state", argv[0]); + auto error = OperationalState::GetOperationalStateInstance()->SetOperationalState(map_cmd_opstate.at(argv[0])); + ChipLogDetail(Shell, "OpSState : Set to %s state & CountdownTime", argv[0]); + if ((error == CHIP_NO_ERROR)&&(map_cmd_opstate.at(argv[0]) == to_underlying(chip::app::Clusters::OperationalState::OperationalStateEnum::kRunning))) { + chip::app::Clusters::OperationalState::GenericOperationalError err(to_underlying(chip::app::Clusters::OperationalState::ErrorStateEnum::kNoError)); + OperationalState::GetOperationalStateDelegate()->HandleStartStateCallback(err); + } if (!strcmp(argv[0], "error") && argc == 2) { OperationalState::Structs::ErrorStateStruct::Type err; diff --git a/examples/laundry-washer-app/nxp/common/main/include/operational-state-delegate-impl.h b/examples/laundry-washer-app/nxp/common/main/include/operational-state-delegate-impl.h deleted file mode 100644 index 79f2695eb0a628..00000000000000 --- a/examples/laundry-washer-app/nxp/common/main/include/operational-state-delegate-impl.h +++ /dev/null @@ -1,120 +0,0 @@ -/* - * - * 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 - -namespace chip { -namespace app { -namespace Clusters { - -namespace OperationalState { - -// This is an application level delegate to handle operational state commands according to the specific business logic. -class GenericOperationalStateDelegateImpl : public Delegate -{ -public: - /** - * Get the countdown time. This attribute is not used in this application. - * @return The current countdown time. - */ - app::DataModel::Nullable GetCountdownTime() override { return {}; }; - - /** - * 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, 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. - * - * 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. - */ - 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(GenericOperationalError & err) override; - - /** - * Handle Command Callback in application: Resume - * @param[out] get operational error after callback. - */ - void HandleResumeStateCallback(GenericOperationalError & err) override; - - /** - * Handle Command Callback in application: Start - * @param[out] get operational error after callback. - */ - void HandleStartStateCallback(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)), - }; - -public: - OperationalStateDelegate() - { - GenericOperationalStateDelegateImpl::mOperationalStateList = Span(opStateList); - } -}; - -Instance * GetOperationalStateInstance(); - -void Shutdown(); - -} // namespace OperationalState -} // namespace Clusters -} // namespace app -} // namespace chip diff --git a/examples/laundry-washer-app/nxp/common/main/operational-state-delegate-impl.cpp b/examples/laundry-washer-app/nxp/common/main/operational-state-delegate-impl.cpp deleted file mode 100644 index 961fc868ed12b5..00000000000000 --- a/examples/laundry-washer-app/nxp/common/main/operational-state-delegate-impl.cpp +++ /dev/null @@ -1,142 +0,0 @@ -/* - * - * 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::OperationalState; - -CHIP_ERROR GenericOperationalStateDelegateImpl::GetOperationalStateAtIndex(size_t index, GenericOperationalState & operationalState) -{ - if (index >= mOperationalStateList.size()) - { - return CHIP_ERROR_NOT_FOUND; - } - operationalState = mOperationalStateList[index]; - return CHIP_NO_ERROR; -} - -CHIP_ERROR GenericOperationalStateDelegateImpl::GetOperationalPhaseAtIndex(size_t index, MutableCharSpan & operationalPhase) -{ - if (index >= mOperationalPhaseList.size()) - { - return CHIP_ERROR_NOT_FOUND; - } - return CopyCharSpanToMutableCharSpan(mOperationalPhaseList[index], operationalPhase); -} - -void GenericOperationalStateDelegateImpl::HandlePauseStateCallback(GenericOperationalError & err) -{ - // placeholder implementation - auto error = GetInstance()->SetOperationalState(to_underlying(OperationalState::OperationalStateEnum::kPaused)); - if (error == CHIP_NO_ERROR) - { - err.Set(to_underlying(ErrorStateEnum::kNoError)); - } - else - { - err.Set(to_underlying(ErrorStateEnum::kUnableToCompleteOperation)); - } -} - -void GenericOperationalStateDelegateImpl::HandleResumeStateCallback(GenericOperationalError & err) -{ - // placeholder implementation - auto error = GetInstance()->SetOperationalState(to_underlying(OperationalStateEnum::kRunning)); - if (error == CHIP_NO_ERROR) - { - err.Set(to_underlying(ErrorStateEnum::kNoError)); - } - else - { - err.Set(to_underlying(ErrorStateEnum::kUnableToCompleteOperation)); - } -} - -void GenericOperationalStateDelegateImpl::HandleStartStateCallback(GenericOperationalError & err) -{ - uint8_t opState = GetInstance()->GetCurrentOperationalState(); - if (opState == to_underlying(OperationalStateEnum::kError)) - { - err.Set(to_underlying(ErrorStateEnum::kUnableToStartOrResume)); - return; - } - // placeholder implementation - auto error = GetInstance()->SetOperationalState(to_underlying(OperationalStateEnum::kRunning)); - if (error == CHIP_NO_ERROR) - { - err.Set(to_underlying(ErrorStateEnum::kNoError)); - } - else - { - err.Set(to_underlying(ErrorStateEnum::kUnableToCompleteOperation)); - } -} - -void GenericOperationalStateDelegateImpl::HandleStopStateCallback(GenericOperationalError & err) -{ - // placeholder implementation - auto error = GetInstance()->SetOperationalState(to_underlying(OperationalStateEnum::kStopped)); - if (error == CHIP_NO_ERROR) - { - err.Set(to_underlying(ErrorStateEnum::kNoError)); - } - else - { - err.Set(to_underlying(ErrorStateEnum::kUnableToCompleteOperation)); - } -} - -// Init Operational State cluster - -static OperationalState::Instance * gOperationalStateInstance = nullptr; -static OperationalStateDelegate * gOperationalStateDelegate = nullptr; - -OperationalState::Instance * OperationalState::GetOperationalStateInstance() -{ - return gOperationalStateInstance; -} - -void OperationalState::Shutdown() -{ - if (gOperationalStateInstance != nullptr) - { - delete gOperationalStateInstance; - gOperationalStateInstance = nullptr; - } - if (gOperationalStateDelegate != nullptr) - { - delete gOperationalStateDelegate; - gOperationalStateDelegate = nullptr; - } -} - -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(); -} diff --git a/examples/laundry-washer-app/nxp/rt/rt1170/BUILD.gn b/examples/laundry-washer-app/nxp/rt/rt1170/BUILD.gn index 90be59719a193d..10ace70af11ffd 100644 --- a/examples/laundry-washer-app/nxp/rt/rt1170/BUILD.gn +++ b/examples/laundry-washer-app/nxp/rt/rt1170/BUILD.gn @@ -152,10 +152,9 @@ rt_executable("laundry-washer-app") { "${chip_root}/examples/all-clusters-app/all-clusters-common/src/bridged-actions-stub.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/laundry-washer-controls-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", + "${chip_root}/examples/all-clusters-app/all-clusters-common/src/operational-state-delegate-impl.cpp", "../../common/main/laundry-washer-mode.cpp", - "../../common/main/operational-state-delegate-impl.cpp", ] if (nxp_enable_matter_cli) { diff --git a/examples/laundry-washer-app/nxp/rt/rw61x/BUILD.gn b/examples/laundry-washer-app/nxp/rt/rw61x/BUILD.gn index 063cf49b81a2b5..197c3bb7f0920d 100644 --- a/examples/laundry-washer-app/nxp/rt/rw61x/BUILD.gn +++ b/examples/laundry-washer-app/nxp/rt/rw61x/BUILD.gn @@ -174,10 +174,9 @@ rt_executable("laundry-washer") { "${chip_root}/examples/all-clusters-app/all-clusters-common/src/bridged-actions-stub.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/laundry-washer-controls-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", "../../common/main/laundry-washer-mode.cpp", - "../../common/main/operational-state-delegate-impl.cpp", + "${chip_root}/examples/all-clusters-app/all-clusters-common/src/operational-state-delegate-impl.cpp", ] if (nxp_enable_matter_cli) { diff --git a/examples/laundry-washer-app/nxp/zap/laundry-washer-app.matter b/examples/laundry-washer-app/nxp/zap/laundry-washer-app.matter index 28a2f46d284903..0d13fae5c486e0 100644 --- a/examples/laundry-washer-app/nxp/zap/laundry-washer-app.matter +++ b/examples/laundry-washer-app/nxp/zap/laundry-washer-app.matter @@ -870,6 +870,23 @@ cluster OtaSoftwareUpdateRequestor = 42 { command AnnounceOTAProvider(AnnounceOTAProviderRequest): DefaultSuccess = 0; } +/** Nodes should be expected to be deployed to any and all regions of the world. These global regions + may have differing common languages, units of measurements, and numerical formatting + standards. As such, Nodes that visually or audibly convey information need a mechanism by which + they can be configured to use a user’s preferred language, units, etc */ +cluster LocalizationConfiguration = 43 { + revision 1; // NOTE: Default/not specifically set + + attribute access(write: manage) char_string<35> activeLocale = 0; + readonly attribute char_string supportedLocales[] = 1; + 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; +} + /** Nodes should be expected to be deployed to any and all regions of the world. These global regions may have differing preferences for the units in which values are conveyed in communication to a user. As such, Nodes that visually or audibly convey measurable values to the user need a @@ -896,265 +913,6 @@ cluster UnitLocalization = 45 { readonly attribute int16u clusterRevision = 65533; } -/** This cluster is used to describe the configuration and capabilities of a physical power source that provides power to the Node. */ -cluster PowerSource = 47 { - revision 1; // NOTE: Default/not specifically set - - enum BatApprovedChemistryEnum : enum16 { - kUnspecified = 0; - kAlkaline = 1; - kLithiumCarbonFluoride = 2; - kLithiumChromiumOxide = 3; - kLithiumCopperOxide = 4; - kLithiumIronDisulfide = 5; - kLithiumManganeseDioxide = 6; - kLithiumThionylChloride = 7; - kMagnesium = 8; - kMercuryOxide = 9; - kNickelOxyhydride = 10; - kSilverOxide = 11; - kZincAir = 12; - kZincCarbon = 13; - kZincChloride = 14; - kZincManganeseDioxide = 15; - kLeadAcid = 16; - kLithiumCobaltOxide = 17; - kLithiumIon = 18; - kLithiumIonPolymer = 19; - kLithiumIronPhosphate = 20; - kLithiumSulfur = 21; - kLithiumTitanate = 22; - kNickelCadmium = 23; - kNickelHydrogen = 24; - kNickelIron = 25; - kNickelMetalHydride = 26; - kNickelZinc = 27; - kSilverZinc = 28; - kSodiumIon = 29; - kSodiumSulfur = 30; - kZincBromide = 31; - kZincCerium = 32; - } - - enum BatChargeFaultEnum : enum8 { - kUnspecified = 0; - kAmbientTooHot = 1; - kAmbientTooCold = 2; - kBatteryTooHot = 3; - kBatteryTooCold = 4; - kBatteryAbsent = 5; - kBatteryOverVoltage = 6; - kBatteryUnderVoltage = 7; - kChargerOverVoltage = 8; - kChargerUnderVoltage = 9; - kSafetyTimeout = 10; - } - - enum BatChargeLevelEnum : enum8 { - kOK = 0; - kWarning = 1; - kCritical = 2; - } - - enum BatChargeStateEnum : enum8 { - kUnknown = 0; - kIsCharging = 1; - kIsAtFullCharge = 2; - kIsNotCharging = 3; - } - - enum BatCommonDesignationEnum : enum16 { - kUnspecified = 0; - kAAA = 1; - kAA = 2; - kC = 3; - kD = 4; - k4v5 = 5; - k6v0 = 6; - k9v0 = 7; - k12AA = 8; - kAAAA = 9; - kA = 10; - kB = 11; - kF = 12; - kN = 13; - kNo6 = 14; - kSubC = 15; - kA23 = 16; - kA27 = 17; - kBA5800 = 18; - kDuplex = 19; - k4SR44 = 20; - k523 = 21; - k531 = 22; - k15v0 = 23; - k22v5 = 24; - k30v0 = 25; - k45v0 = 26; - k67v5 = 27; - kJ = 28; - kCR123A = 29; - kCR2 = 30; - k2CR5 = 31; - kCRP2 = 32; - kCRV3 = 33; - kSR41 = 34; - kSR43 = 35; - kSR44 = 36; - kSR45 = 37; - kSR48 = 38; - kSR54 = 39; - kSR55 = 40; - kSR57 = 41; - kSR58 = 42; - kSR59 = 43; - kSR60 = 44; - kSR63 = 45; - kSR64 = 46; - kSR65 = 47; - kSR66 = 48; - kSR67 = 49; - kSR68 = 50; - kSR69 = 51; - kSR516 = 52; - kSR731 = 53; - kSR712 = 54; - kLR932 = 55; - kA5 = 56; - kA10 = 57; - kA13 = 58; - kA312 = 59; - kA675 = 60; - kAC41E = 61; - k10180 = 62; - k10280 = 63; - k10440 = 64; - k14250 = 65; - k14430 = 66; - k14500 = 67; - k14650 = 68; - k15270 = 69; - k16340 = 70; - kRCR123A = 71; - k17500 = 72; - k17670 = 73; - k18350 = 74; - k18500 = 75; - k18650 = 76; - k19670 = 77; - k25500 = 78; - k26650 = 79; - k32600 = 80; - } - - enum BatFaultEnum : enum8 { - kUnspecified = 0; - kOverTemp = 1; - kUnderTemp = 2; - } - - enum BatReplaceabilityEnum : enum8 { - kUnspecified = 0; - kNotReplaceable = 1; - kUserReplaceable = 2; - kFactoryReplaceable = 3; - } - - enum PowerSourceStatusEnum : enum8 { - kUnspecified = 0; - kActive = 1; - kStandby = 2; - kUnavailable = 3; - } - - enum WiredCurrentTypeEnum : enum8 { - kAC = 0; - kDC = 1; - } - - enum WiredFaultEnum : enum8 { - kUnspecified = 0; - kOverVoltage = 1; - kUnderVoltage = 2; - } - - bitmap Feature : bitmap32 { - kWired = 0x1; - kBattery = 0x2; - kRechargeable = 0x4; - kReplaceable = 0x8; - } - - struct BatChargeFaultChangeType { - BatChargeFaultEnum current[] = 0; - BatChargeFaultEnum previous[] = 1; - } - - struct BatFaultChangeType { - BatFaultEnum current[] = 0; - BatFaultEnum previous[] = 1; - } - - struct WiredFaultChangeType { - WiredFaultEnum current[] = 0; - WiredFaultEnum previous[] = 1; - } - - info event WiredFaultChange = 0 { - WiredFaultEnum current[] = 0; - WiredFaultEnum previous[] = 1; - } - - info event BatFaultChange = 1 { - BatFaultEnum current[] = 0; - BatFaultEnum previous[] = 1; - } - - info event BatChargeFaultChange = 2 { - BatChargeFaultEnum current[] = 0; - BatChargeFaultEnum previous[] = 1; - } - - readonly attribute PowerSourceStatusEnum status = 0; - readonly attribute int8u order = 1; - readonly attribute char_string<60> description = 2; - readonly attribute optional nullable int32u wiredAssessedInputVoltage = 3; - readonly attribute optional nullable int16u wiredAssessedInputFrequency = 4; - readonly attribute optional WiredCurrentTypeEnum wiredCurrentType = 5; - readonly attribute optional nullable int32u wiredAssessedCurrent = 6; - readonly attribute optional int32u wiredNominalVoltage = 7; - readonly attribute optional int32u wiredMaximumCurrent = 8; - readonly attribute optional boolean wiredPresent = 9; - readonly attribute optional WiredFaultEnum activeWiredFaults[] = 10; - readonly attribute optional nullable int32u batVoltage = 11; - readonly attribute optional nullable int8u batPercentRemaining = 12; - readonly attribute optional nullable int32u batTimeRemaining = 13; - readonly attribute optional BatChargeLevelEnum batChargeLevel = 14; - readonly attribute optional boolean batReplacementNeeded = 15; - readonly attribute optional BatReplaceabilityEnum batReplaceability = 16; - readonly attribute optional boolean batPresent = 17; - readonly attribute optional BatFaultEnum activeBatFaults[] = 18; - readonly attribute optional char_string<60> batReplacementDescription = 19; - readonly attribute optional BatCommonDesignationEnum batCommonDesignation = 20; - readonly attribute optional char_string<20> batANSIDesignation = 21; - readonly attribute optional char_string<20> batIECDesignation = 22; - readonly attribute optional BatApprovedChemistryEnum batApprovedChemistry = 23; - readonly attribute optional int32u batCapacity = 24; - readonly attribute optional int8u batQuantity = 25; - readonly attribute optional BatChargeStateEnum batChargeState = 26; - readonly attribute optional nullable int32u batTimeToFullCharge = 27; - readonly attribute optional boolean batFunctionalWhileCharging = 28; - readonly attribute optional nullable int32u batChargingCurrent = 29; - readonly attribute optional BatChargeFaultEnum activeBatChargeFaults[] = 30; - readonly attribute endpoint_no endpointList[] = 31; - 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; -} - /** This cluster is used to manage global aspects of the Commissioning flow. */ cluster GeneralCommissioning = 48 { revision 1; // NOTE: Default/not specifically set @@ -1427,6 +1185,53 @@ cluster NetworkCommissioning = 49 { command access(invoke: administer) QueryIdentity(QueryIdentityRequest): QueryIdentityResponse = 9; } +/** The cluster provides commands for retrieving unstructured diagnostic logs from a Node that may be used to aid in diagnostics. */ +cluster DiagnosticLogs = 50 { + revision 1; // NOTE: Default/not specifically set + + enum IntentEnum : enum8 { + kEndUserSupport = 0; + kNetworkDiag = 1; + kCrashLogs = 2; + } + + enum StatusEnum : enum8 { + kSuccess = 0; + kExhausted = 1; + kNoLogs = 2; + kBusy = 3; + kDenied = 4; + } + + enum TransferProtocolEnum : enum8 { + kResponsePayload = 0; + kBDX = 1; + } + + 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; + + request struct RetrieveLogsRequestRequest { + IntentEnum intent = 0; + TransferProtocolEnum requestedProtocol = 1; + optional char_string<32> transferFileDesignator = 2; + } + + response struct RetrieveLogsResponse = 1 { + StatusEnum status = 0; + long_octet_string logContent = 1; + optional epoch_us UTCTimeStamp = 2; + optional systime_us timeSinceBoot = 3; + } + + /** Retrieving diagnostic logs from a Node */ + command RetrieveLogsRequest(RetrieveLogsRequestRequest): RetrieveLogsResponse = 0; +} + /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ cluster GeneralDiagnostics = 51 { revision 2; @@ -1926,46 +1731,6 @@ cluster UserLabel = 65 { readonly attribute int16u clusterRevision = 65533; } -/** Attributes and commands for selecting a mode from a list of supported options. */ -cluster ModeSelect = 80 { - revision 2; - - bitmap Feature : bitmap32 { - kOnOff = 0x1; - } - - struct SemanticTagStruct { - vendor_id mfgCode = 0; - enum16 value = 1; - } - - struct ModeOptionStruct { - char_string<64> label = 0; - int8u mode = 1; - SemanticTagStruct semanticTags[] = 2; - } - - readonly attribute char_string<64> description = 0; - readonly attribute nullable enum16 standardNamespace = 1; - readonly attribute ModeOptionStruct supportedModes[] = 2; - readonly attribute int8u currentMode = 3; - attribute optional nullable int8u startUpMode = 4; - attribute optional nullable int8u onMode = 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; - - request struct ChangeToModeRequest { - int8u newMode = 0; - } - - /** On receipt of this command, if the NewMode field matches the Mode field in an entry of the SupportedModes list, the server SHALL set the CurrentMode attribute to the NewMode value, otherwise, the server SHALL respond with an INVALID_COMMAND status response. */ - command ChangeToMode(ChangeToModeRequest): DefaultSuccess = 0; -} - /** Attributes and commands for selecting a mode from a list of supported options. */ cluster LaundryWasherMode = 81 { revision 2; @@ -2176,7 +1941,7 @@ endpoint 0 { callback attribute targetsPerAccessControlEntry; callback attribute accessControlEntriesPerFabric; callback attribute attributeList; - ram attribute featureMap default = 0; + ram attribute featureMap default = 1; callback attribute clusterRevision; } @@ -2230,7 +1995,9 @@ endpoint 0 { handle command AnnounceOTAProvider; } - server cluster UnitLocalization { + server cluster LocalizationConfiguration { + ram attribute activeLocale; + callback attribute supportedLocales; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; @@ -2238,6 +2005,15 @@ endpoint 0 { ram attribute clusterRevision default = 1; } + server cluster UnitLocalization { + ram attribute temperatureUnit; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + ram attribute featureMap default = 1; + ram attribute clusterRevision default = 1; + } + server cluster GeneralCommissioning { ram attribute breadcrumb default = 0x0000000000000000; callback attribute basicCommissioningInfo; @@ -2281,6 +2057,17 @@ endpoint 0 { handle command ReorderNetwork; } + server cluster DiagnosticLogs { + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + + handle command RetrieveLogsRequest; + handle command RetrieveLogsResponse; + } + server cluster GeneralDiagnostics { emits event BootReason; callback attribute networkInterfaces; @@ -2443,19 +2230,6 @@ endpoint 1 { ram attribute clusterRevision default = 1; } - server cluster PowerSource { - ram attribute status; - ram attribute order; - ram attribute description; - ram attribute wiredCurrentType; - callback attribute endpointList; - callback attribute generatedCommandList; - callback attribute acceptedCommandList; - callback attribute attributeList; - ram attribute featureMap default = 1; - ram attribute clusterRevision default = 2; - } - server cluster FixedLabel { callback attribute labelList; callback attribute generatedCommandList; @@ -2474,22 +2248,6 @@ endpoint 1 { ram attribute clusterRevision default = 1; } - server cluster ModeSelect { - ram attribute description; - ram attribute standardNamespace; - callback attribute supportedModes; - ram attribute currentMode; - ram attribute startUpMode; - ram attribute onMode; - callback attribute generatedCommandList; - callback attribute acceptedCommandList; - callback attribute attributeList; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - - handle command ChangeToMode; - } - server cluster LaundryWasherMode { callback attribute supportedModes; callback attribute currentMode; diff --git a/examples/laundry-washer-app/nxp/zap/laundry-washer-app.zap b/examples/laundry-washer-app/nxp/zap/laundry-washer-app.zap index 8af4eaa8976040..afd5f56b7a0f75 100644 --- a/examples/laundry-washer-app/nxp/zap/laundry-washer-app.zap +++ b/examples/laundry-washer-app/nxp/zap/laundry-washer-app.zap @@ -1,6 +1,6 @@ { "fileFormat": 2, - "featureLevel": 103, + "featureLevel": 104, "creator": "zap", "keyValuePairs": [ { @@ -41,14 +41,16 @@ "code": 22, "profileId": 259, "label": "MA-rootdevice", - "name": "MA-rootdevice" + "name": "MA-rootdevice", + "deviceTypeOrder": 0 }, "deviceTypes": [ { "code": 22, "profileId": 259, "label": "MA-rootdevice", - "name": "MA-rootdevice" + "name": "MA-rootdevice", + "deviceTypeOrder": 0 } ], "deviceVersions": [ @@ -281,7 +283,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "1", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -713,22 +715,6 @@ "maxInterval": 65534, "reportableChange": 0 }, - { - "name": "EventList", - "code": 65530, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 1, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, { "name": "AttributeList", "code": 65531, @@ -966,22 +952,6 @@ "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, @@ -1056,13 +1026,45 @@ ] }, { - "name": "Unit Localization", - "code": 45, + "name": "Localization Configuration", + "code": 43, "mfgCode": null, - "define": "UNIT_LOCALIZATION_CLUSTER", + "define": "LOCALIZATION_CONFIGURATION_CLUSTER", "side": "server", "enabled": 1, "attributes": [ + { + "name": "ActiveLocale", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportedLocales", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "GeneratedCommandList", "code": 65528, @@ -1073,7 +1075,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": null, + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -1089,6 +1091,96 @@ "storageOption": "External", "singleton": 0, "bounded": 0, + "defaultValue": "", + "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": "", + "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": "Unit Localization", + "code": 45, + "mfgCode": null, + "define": "UNIT_LOCALIZATION_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "TemperatureUnit", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "TempUnitEnum", + "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, @@ -1096,8 +1188,8 @@ "reportableChange": 0 }, { - "name": "EventList", - "code": 65530, + "name": "AcceptedCommandList", + "code": 65529, "mfgCode": null, "side": "server", "type": "array", @@ -1137,7 +1229,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "1", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -1576,8 +1668,100 @@ "reportableChange": 0 }, { - "name": "EventList", - "code": 65530, + "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": "2", + "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": "Diagnostic Logs", + "code": 50, + "mfgCode": null, + "define": "DIAGNOSTIC_LOGS_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "RetrieveLogsRequest", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "RetrieveLogsResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + } + ], + "attributes": [ + { + "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", @@ -1617,7 +1801,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "2", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -1635,8 +1819,8 @@ "bounded": 0, "defaultValue": "1", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 } ] @@ -1804,24 +1988,8 @@ "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, + "name": "AttributeList", + "code": 65531, "mfgCode": null, "side": "server", "type": "array", @@ -2014,22 +2182,6 @@ "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, @@ -2589,14 +2741,16 @@ "code": 115, "profileId": 259, "label": "MA-laundry-washer", - "name": "MA-laundry-washer" + "name": "MA-laundry-washer", + "deviceTypeOrder": 0 }, "deviceTypes": [ { "code": 115, "profileId": 259, "label": "MA-laundry-washer", - "name": "MA-laundry-washer" + "name": "MA-laundry-washer", + "deviceTypeOrder": 0 } ], "deviceVersions": [ @@ -2699,22 +2853,6 @@ "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, @@ -2903,22 +3041,6 @@ "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, @@ -3139,22 +3261,6 @@ "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, @@ -3309,22 +3415,6 @@ "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, @@ -3431,22 +3521,6 @@ "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, @@ -3498,82 +3572,18 @@ ] }, { - "name": "Power Source", - "code": 47, + "name": "Fixed Label", + "code": 64, "mfgCode": null, - "define": "POWER_SOURCE_CLUSTER", + "define": "FIXED_LABEL_CLUSTER", "side": "server", "enabled": 1, "attributes": [ { - "name": "Status", + "name": "LabelList", "code": 0, "mfgCode": null, "side": "server", - "type": "PowerSourceStatusEnum", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "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": "", - "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": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "WiredCurrentType", - "code": 5, - "mfgCode": null, - "side": "server", - "type": "WiredCurrentTypeEnum", - "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", "included": 1, "storageOption": "External", @@ -3617,22 +3627,6 @@ "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, @@ -3659,7 +3653,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -3675,7 +3669,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "2", + "defaultValue": "1", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -3684,10 +3678,10 @@ ] }, { - "name": "Fixed Label", - "code": 64, + "name": "User Label", + "code": 65, "mfgCode": null, - "define": "FIXED_LABEL_CLUSTER", + "define": "USER_LABEL_CLUSTER", "side": "server", "enabled": 1, "attributes": [ @@ -3739,22 +3733,6 @@ "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, @@ -3806,15 +3784,33 @@ ] }, { - "name": "User Label", - "code": 65, + "name": "Laundry Washer Mode", + "code": 81, "mfgCode": null, - "define": "USER_LABEL_CLUSTER", + "define": "LAUNDRY_WASHER_MODE_CLUSTER", "side": "server", "enabled": 1, + "commands": [ + { + "name": "ChangeToMode", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "ChangeToModeResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + } + ], "attributes": [ { - "name": "LabelList", + "name": "SupportedModes", "code": 0, "mfgCode": null, "side": "server", @@ -3830,11 +3826,11 @@ "reportableChange": 0 }, { - "name": "GeneratedCommandList", - "code": 65528, + "name": "CurrentMode", + "code": 1, "mfgCode": null, "side": "server", - "type": "array", + "type": "int8u", "included": 1, "storageOption": "External", "singleton": 0, @@ -3846,11 +3842,11 @@ "reportableChange": 0 }, { - "name": "AcceptedCommandList", - "code": 65529, + "name": "StartUpMode", + "code": 2, "mfgCode": null, "side": "server", - "type": "array", + "type": "int8u", "included": 1, "storageOption": "External", "singleton": 0, @@ -3862,11 +3858,11 @@ "reportableChange": 0 }, { - "name": "EventList", - "code": 65530, + "name": "OnMode", + "code": 3, "mfgCode": null, "side": "server", - "type": "array", + "type": "int8u", "included": 1, "storageOption": "External", "singleton": 0, @@ -3878,8 +3874,8 @@ "reportableChange": 0 }, { - "name": "AttributeList", - "code": 65531, + "name": "GeneratedCommandList", + "code": 65528, "mfgCode": null, "side": "server", "type": "array", @@ -3894,384 +3890,16 @@ "reportableChange": 0 }, { - "name": "FeatureMap", - "code": 65532, + "name": "AcceptedCommandList", + "code": 65529, "mfgCode": null, "side": "server", - "type": "bitmap32", + "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "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": "Mode Select", - "code": 80, - "mfgCode": null, - "define": "MODE_SELECT_CLUSTER", - "side": "server", - "enabled": 1, - "commands": [ - { - "name": "ChangeToMode", - "code": 0, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - } - ], - "attributes": [ - { - "name": "Description", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "char_string", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "StandardNamespace", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "enum16", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "SupportedModes", - "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": "CurrentMode", - "code": 3, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "StartUpMode", - "code": 4, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "OnMode", - "code": 5, - "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, - "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": "Laundry Washer Mode", - "code": 81, - "mfgCode": null, - "define": "LAUNDRY_WASHER_MODE_CLUSTER", - "side": "server", - "enabled": 1, - "commands": [ - { - "name": "ChangeToMode", - "code": 0, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "ChangeToModeResponse", - "code": 1, - "mfgCode": null, - "source": "server", - "isIncoming": 0, - "isEnabled": 1 - } - ], - "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": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "StartUpMode", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "OnMode", - "code": 3, - "mfgCode": null, - "side": "server", - "type": "int8u", - "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, + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -4431,22 +4059,6 @@ "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, @@ -4579,22 +4191,6 @@ "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, @@ -4823,22 +4419,6 @@ "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, diff --git a/examples/laundry-washer-app/nxp/zephyr/CMakeLists.txt b/examples/laundry-washer-app/nxp/zephyr/CMakeLists.txt index 589b95415e918a..b3a03be0403676 100644 --- a/examples/laundry-washer-app/nxp/zephyr/CMakeLists.txt +++ b/examples/laundry-washer-app/nxp/zephyr/CMakeLists.txt @@ -106,10 +106,9 @@ target_sources(app PRIVATE ${ALL_CLUSTERS_COMMON_DIR}/src/smco-stub.cpp ${ALL_CLUSTERS_COMMON_DIR}/src/bridged-actions-stub.cpp - ${ALL_CLUSTERS_COMMON_DIR}/src/static-supported-modes-manager.cpp ${ALL_CLUSTERS_COMMON_DIR}/src/static-supported-temperature-levels.cpp ${LAUNDRY_WASHER_NXP_COMMON_DIR}/main/laundry-washer-mode.cpp ${ALL_CLUSTERS_COMMON_DIR}/src/laundry-washer-controls-delegate-impl.cpp - ${LAUNDRY_WASHER_NXP_COMMON_DIR}/main/operational-state-delegate-impl.cpp + ${ALL_CLUSTERS_COMMON_DIR}/src/operational-state-delegate-impl.cpp ${EXAMPLE_PLATFORM_NXP_COMMON_DIR}/icd/source/ICDUtil.cpp ) From 4cc42a1d54180cd93d694322b1d3013d0cf3743c Mon Sep 17 00:00:00 2001 From: "Lo,Chin-Ran" Date: Thu, 28 Nov 2024 13:37:14 +0100 Subject: [PATCH 3/6] Update RW/RT device types ZAP files to align with latest root node configuration updates done in thermostat zap configuration Signed-off-by: Lo,Chin-Ran --- .../laundry-washer-app/nxp/rt/rt1060/BUILD.gn | 20 + .../laundry-washer-app/nxp/rt/rt1170/BUILD.gn | 20 + .../laundry-washer-app/nxp/rt/rw61x/BUILD.gn | 22 +- .../nxp/zap/laundry-washer-app.matter | 112 +- .../nxp/zap/laundry-washer-app.zap | 992 ++++++++++++++---- 5 files changed, 945 insertions(+), 221 deletions(-) diff --git a/examples/laundry-washer-app/nxp/rt/rt1060/BUILD.gn b/examples/laundry-washer-app/nxp/rt/rt1060/BUILD.gn index ee1e896987ae9b..315704cd06699f 100644 --- a/examples/laundry-washer-app/nxp/rt/rt1060/BUILD.gn +++ b/examples/laundry-washer-app/nxp/rt/rt1060/BUILD.gn @@ -44,6 +44,8 @@ declare_args() { # Setup discriminator as argument setup_discriminator = 3840 + + chip_with_diag_logs_demo = true } example_platform_dir = @@ -116,6 +118,13 @@ rt_executable("laundry-washer") { defines += [ "CONFIG_NET_L2_OPENTHREAD=1" ] } + if (chip_with_diag_logs_demo) { + defines += [ + "CONFIG_DIAG_LOGS_DEMO=1", + "CHIP_DEVICE_CONFIG_MAX_DIAG_LOG_SIZE=1024", + ] + } + include_dirs = [ "../../common/main/include", "../../common/main", @@ -135,6 +144,17 @@ rt_executable("laundry-washer") { "../../common/main/main.cpp", ] + if (chip_with_diag_logs_demo) { + include_dirs += [ + "${common_example_dir}/diagnostic_logs/include", + "${chip_root}", + ] + sources += [ + "${common_example_dir}/diagnostic_logs/source/DiagnosticLogsDemo.cpp", + "${common_example_dir}/diagnostic_logs/source/DiagnosticLogsProviderDelegateImpl.cpp", + ] + } + # App common files include_dirs += [ "${common_example_dir}/icd/include", diff --git a/examples/laundry-washer-app/nxp/rt/rt1170/BUILD.gn b/examples/laundry-washer-app/nxp/rt/rt1170/BUILD.gn index 10ace70af11ffd..85ed01eab2b7b4 100644 --- a/examples/laundry-washer-app/nxp/rt/rt1170/BUILD.gn +++ b/examples/laundry-washer-app/nxp/rt/rt1170/BUILD.gn @@ -41,6 +41,8 @@ declare_args() { # Setup discriminator as argument setup_discriminator = 3840 + + chip_with_diag_logs_demo = true } example_platform_dir = @@ -106,6 +108,13 @@ rt_executable("laundry-washer-app") { defines += [ "CONFIG_NET_L2_OPENTHREAD=1" ] } + if (chip_with_diag_logs_demo) { + defines += [ + "CONFIG_DIAG_LOGS_DEMO=1", + "CHIP_DEVICE_CONFIG_MAX_DIAG_LOG_SIZE=1024", + ] + } + include_dirs = [ "../../common/main/include", "../../common/main", @@ -125,6 +134,17 @@ rt_executable("laundry-washer-app") { "../../common/main/main.cpp", ] + if (chip_with_diag_logs_demo) { + include_dirs += [ + "${common_example_dir}/diagnostic_logs/include", + "${chip_root}", + ] + sources += [ + "${common_example_dir}/diagnostic_logs/source/DiagnosticLogsDemo.cpp", + "${common_example_dir}/diagnostic_logs/source/DiagnosticLogsProviderDelegateImpl.cpp", + ] + } + # App common files include_dirs += [ "${common_example_dir}/icd/include", diff --git a/examples/laundry-washer-app/nxp/rt/rw61x/BUILD.gn b/examples/laundry-washer-app/nxp/rt/rw61x/BUILD.gn index 197c3bb7f0920d..d1607a7af26100 100644 --- a/examples/laundry-washer-app/nxp/rt/rw61x/BUILD.gn +++ b/examples/laundry-washer-app/nxp/rt/rw61x/BUILD.gn @@ -1,5 +1,5 @@ # Copyright (c) 2021 Project CHIP Authors -# Copyright 2023 NXP +# Copyright 2023-2024 NXP # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -42,6 +42,8 @@ declare_args() { # Setup discriminator as argument setup_discriminator = 3840 + + chip_with_diag_logs_demo = true } example_platform_dir = @@ -114,6 +116,13 @@ rt_executable("laundry-washer") { defines += [ "CONFIG_NET_L2_OPENTHREAD=1" ] } + if (chip_with_diag_logs_demo) { + defines += [ + "CONFIG_DIAG_LOGS_DEMO=1", + "CHIP_DEVICE_CONFIG_MAX_DIAG_LOG_SIZE=1024", + ] + } + include_dirs = [ "../../common/main/include", "../../common/main", @@ -133,6 +142,17 @@ rt_executable("laundry-washer") { "../../common/main/main.cpp", ] + if (chip_with_diag_logs_demo) { + include_dirs += [ + "${common_example_dir}/diagnostic_logs/include", + "${chip_root}", + ] + sources += [ + "${common_example_dir}/diagnostic_logs/source/DiagnosticLogsDemo.cpp", + "${common_example_dir}/diagnostic_logs/source/DiagnosticLogsProviderDelegateImpl.cpp", + ] + } + if (nxp_enable_secure_whole_factory_data || nxp_enable_secure_EL2GO_factory_data) { sources += [ "${chip_root}/examples/platform/nxp/${nxp_platform}/factory_data/source/AppFactoryDataExample.cpp" ] diff --git a/examples/laundry-washer-app/nxp/zap/laundry-washer-app.matter b/examples/laundry-washer-app/nxp/zap/laundry-washer-app.matter index 0d13fae5c486e0..37b7786af95b80 100644 --- a/examples/laundry-washer-app/nxp/zap/laundry-washer-app.matter +++ b/examples/laundry-washer-app/nxp/zap/laundry-washer-app.matter @@ -1363,6 +1363,43 @@ cluster GeneralDiagnostics = 51 { command PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; } +/** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ +cluster SoftwareDiagnostics = 52 { + revision 1; // NOTE: Default/not specifically set + + bitmap Feature : bitmap32 { + kWatermarks = 0x1; + } + + struct ThreadMetricsStruct { + int64u id = 0; + optional char_string<8> name = 1; + optional int32u stackFreeCurrent = 2; + optional int32u stackFreeMinimum = 3; + optional int32u stackSize = 4; + } + + info event SoftwareFault = 0 { + int64u id = 0; + optional char_string name = 1; + optional octet_string faultRecording = 2; + } + + readonly attribute optional ThreadMetricsStruct threadMetrics[] = 0; + readonly attribute optional int64u currentHeapFree = 1; + readonly attribute optional int64u currentHeapUsed = 2; + readonly attribute optional int64u currentHeapHighWatermark = 3; + 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; + + /** Reception of this command SHALL reset the values: The StackFreeMinimum field of the ThreadMetrics attribute, CurrentHeapHighWaterMark attribute. */ + command access(invoke: manage) ResetWatermarks(): DefaultSuccess = 0; +} + /** The Wi-Fi Network Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ cluster WiFiNetworkDiagnostics = 54 { revision 1; // NOTE: Default/not specifically set @@ -1919,7 +1956,8 @@ cluster OperationalState = 96 { } endpoint 0 { - device type ma_rootdevice = 22, version 1; + device type ma_rootdevice = 22, version 0; + device type ma_otarequestor = 18, version 1; binding cluster OtaSoftwareUpdateProvider; @@ -1928,6 +1966,9 @@ endpoint 0 { callback attribute serverList; callback attribute clientList; callback attribute partsList; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; callback attribute featureMap; callback attribute clusterRevision; } @@ -1936,39 +1977,31 @@ endpoint 0 { emits event AccessControlEntryChanged; emits event AccessControlExtensionChanged; callback attribute acl; - callback attribute extension; callback attribute subjectsPerAccessControlEntry; callback attribute targetsPerAccessControlEntry; callback attribute accessControlEntriesPerFabric; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; callback attribute attributeList; - ram attribute featureMap default = 1; + ram attribute featureMap default = 0; callback attribute clusterRevision; } server cluster BasicInformation { emits event StartUp; - emits event ShutDown; - emits event Leave; callback attribute dataModelRevision; callback attribute vendorName; callback attribute vendorID; callback attribute productName; callback attribute productID; - persist attribute nodeLabel; + ram attribute nodeLabel; callback attribute location; callback attribute hardwareVersion; callback attribute hardwareVersionString; callback attribute softwareVersion; callback attribute softwareVersionString; - callback attribute manufacturingDate; - callback attribute partNumber; - callback attribute productURL; - callback attribute productLabel; - callback attribute serialNumber; - persist attribute localConfigDisabled default = 0; callback attribute uniqueID; callback attribute capabilityMinima; - callback attribute productAppearance; callback attribute specificationVersion; callback attribute maxPathsPerInvoke; callback attribute generatedCommandList; @@ -2020,8 +2053,11 @@ endpoint 0 { callback attribute regulatoryConfig; callback attribute locationCapability; callback attribute supportsConcurrentConnection; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; + ram attribute clusterRevision default = 2; handle command ArmFailSafe; handle command ArmFailSafeResponse; @@ -2040,11 +2076,12 @@ endpoint 0 { ram attribute lastNetworkingStatus; ram attribute lastNetworkID; ram attribute lastConnectErrorValue; + callback attribute supportedWiFiBands; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; ram attribute featureMap default = 2; - ram attribute clusterRevision default = 1; + ram attribute clusterRevision default = 3; handle command ScanNetworks; handle command ScanNetworksResponse; @@ -2087,24 +2124,53 @@ endpoint 0 { handle command TimeSnapshotResponse; } + server cluster SoftwareDiagnostics { + callback attribute threadMetrics; + callback attribute currentHeapFree; + callback attribute currentHeapUsed; + callback attribute currentHeapHighWatermark; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + callback attribute featureMap; + ram attribute clusterRevision default = 1; + + handle command ResetWatermarks; + } + server cluster WiFiNetworkDiagnostics { + emits event Disconnection; + emits event AssociationFailure; + emits event ConnectionStatus; callback attribute bssid; callback attribute securityType; callback attribute wiFiVersion; callback attribute channelNumber; callback attribute rssi; + callback attribute beaconLostCount; + callback attribute beaconRxCount; + callback attribute packetMulticastRxCount; + callback attribute packetMulticastTxCount; + callback attribute packetUnicastRxCount; + callback attribute packetUnicastTxCount; callback attribute currentMaxRate; + callback attribute overrunCount; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; - ram attribute featureMap default = 0; + ram attribute featureMap default = 3; ram attribute clusterRevision default = 1; + + handle command ResetCounts; } server cluster AdministratorCommissioning { callback attribute windowStatus; callback attribute adminFabricIndex; callback attribute adminVendorId; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -2119,6 +2185,9 @@ endpoint 0 { callback attribute commissionedFabrics; callback attribute trustedRootCertificates; callback attribute currentFabricIndex; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -2141,6 +2210,9 @@ endpoint 0 { callback attribute groupTable; callback attribute maxGroupsPerFabric; callback attribute maxGroupKeysPerFabric; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; callback attribute featureMap; callback attribute clusterRevision; @@ -2198,8 +2270,8 @@ endpoint 1 { callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; - ram attribute featureMap default = 1; - ram attribute clusterRevision default = 5; + ram attribute featureMap default = 2; + ram attribute clusterRevision default = 6; handle command Off; handle command On; @@ -2257,7 +2329,7 @@ endpoint 1 { callback attribute acceptedCommandList; callback attribute attributeList; callback attribute featureMap; - ram attribute clusterRevision default = 1; + ram attribute clusterRevision default = 2; handle command ChangeToMode; handle command ChangeToModeResponse; @@ -2300,7 +2372,7 @@ endpoint 1 { callback attribute acceptedCommandList; callback attribute attributeList; ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; + ram attribute clusterRevision default = 2; handle command Pause; handle command Stop; diff --git a/examples/laundry-washer-app/nxp/zap/laundry-washer-app.zap b/examples/laundry-washer-app/nxp/zap/laundry-washer-app.zap index afd5f56b7a0f75..9a8d968d15c421 100644 --- a/examples/laundry-washer-app/nxp/zap/laundry-washer-app.zap +++ b/examples/laundry-washer-app/nxp/zap/laundry-washer-app.zap @@ -38,29 +38,38 @@ "id": 1, "name": "MA-rootdevice", "deviceTypeRef": { - "code": 22, + "code": 18, "profileId": 259, - "label": "MA-rootdevice", - "name": "MA-rootdevice", + "label": "MA-otarequestor", + "name": "MA-otarequestor", "deviceTypeOrder": 0 }, "deviceTypes": [ + { + "code": 18, + "profileId": 259, + "label": "MA-otarequestor", + "name": "MA-otarequestor", + "deviceTypeOrder": 0 + }, { "code": 22, "profileId": 259, "label": "MA-rootdevice", "name": "MA-rootdevice", - "deviceTypeOrder": 0 + "deviceTypeOrder": 1 } ], "deviceVersions": [ - 1 + 1, + 0 ], "deviceIdentifiers": [ + 18, 22 ], - "deviceTypeName": "MA-rootdevice", - "deviceTypeCode": 22, + "deviceTypeName": "MA-otarequestor", + "deviceTypeCode": 18, "deviceTypeProfileId": 259, "clusters": [ { @@ -135,6 +144,54 @@ "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": "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, @@ -194,11 +251,11 @@ "reportableChange": 0 }, { - "name": "Extension", - "code": 1, + "name": "SubjectsPerAccessControlEntry", + "code": 2, "mfgCode": null, "side": "server", - "type": "array", + "type": "int16u", "included": 1, "storageOption": "External", "singleton": 0, @@ -210,8 +267,8 @@ "reportableChange": 0 }, { - "name": "SubjectsPerAccessControlEntry", - "code": 2, + "name": "TargetsPerAccessControlEntry", + "code": 3, "mfgCode": null, "side": "server", "type": "int16u", @@ -226,8 +283,8 @@ "reportableChange": 0 }, { - "name": "TargetsPerAccessControlEntry", - "code": 3, + "name": "AccessControlEntriesPerFabric", + "code": 4, "mfgCode": null, "side": "server", "type": "int16u", @@ -242,11 +299,27 @@ "reportableChange": 0 }, { - "name": "AccessControlEntriesPerFabric", - "code": 4, + "name": "GeneratedCommandList", + "code": 65528, "mfgCode": null, "side": "server", - "type": "int16u", + "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, @@ -283,7 +356,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -418,7 +491,7 @@ "side": "server", "type": "char_string", "included": 1, - "storageOption": "NVM", + "storageOption": "RAM", "singleton": 1, "bounded": 0, "defaultValue": "", @@ -503,104 +576,8 @@ "bounded": 0, "defaultValue": null, "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "ManufacturingDate", - "code": 11, - "mfgCode": null, - "side": "server", - "type": "char_string", - "included": 1, - "storageOption": "External", - "singleton": 1, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "PartNumber", - "code": 12, - "mfgCode": null, - "side": "server", - "type": "char_string", - "included": 1, - "storageOption": "External", - "singleton": 1, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "ProductURL", - "code": 13, - "mfgCode": null, - "side": "server", - "type": "long_char_string", - "included": 1, - "storageOption": "External", - "singleton": 1, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "ProductLabel", - "code": 14, - "mfgCode": null, - "side": "server", - "type": "char_string", - "included": 1, - "storageOption": "External", - "singleton": 1, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "SerialNumber", - "code": 15, - "mfgCode": null, - "side": "server", - "type": "char_string", - "included": 1, - "storageOption": "External", - "singleton": 1, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "LocalConfigDisabled", - "code": 16, - "mfgCode": null, - "side": "server", - "type": "boolean", - "included": 1, - "storageOption": "NVM", - "singleton": 1, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { @@ -627,22 +604,6 @@ "type": "CapabilityMinimaStruct", "included": 1, "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ProductAppearance", - "code": 20, - "mfgCode": null, - "side": "server", - "type": "ProductAppearanceStruct", - "included": 1, - "storageOption": "External", "singleton": 1, "bounded": 0, "defaultValue": null, @@ -771,20 +732,6 @@ "mfgCode": null, "side": "server", "included": 1 - }, - { - "name": "ShutDown", - "code": 1, - "mfgCode": null, - "side": "server", - "included": 1 - }, - { - "name": "Leave", - "code": 2, - "mfgCode": null, - "side": "server", - "included": 1 } ] }, @@ -1059,7 +1006,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -1075,7 +1022,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -1091,7 +1038,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -1107,7 +1054,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -1392,52 +1339,100 @@ "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": "0", + "defaultValue": null, "reportable": 1, "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 - } - ] - }, - { - "name": "Network Commissioning", - "code": 49, - "mfgCode": null, - "define": "NETWORK_COMMISSIONING_CLUSTER", - "side": "server", - "enabled": 1, - "commands": [ + }, { - "name": "ScanNetworks", - "code": 0, + "name": "AttributeList", + "code": 65531, "mfgCode": null, - "source": "client", + "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": "2", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Network Commissioning", + "code": 49, + "mfgCode": null, + "define": "NETWORK_COMMISSIONING_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "ScanNetworks", + "code": 0, + "mfgCode": null, + "source": "client", "isIncoming": 1, "isEnabled": 1 }, @@ -1635,6 +1630,22 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "SupportedWiFiBands", + "code": 8, + "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, @@ -1709,7 +1720,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "3", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -2046,6 +2057,170 @@ } ] }, + { + "name": "Software Diagnostics", + "code": 52, + "mfgCode": null, + "define": "SOFTWARE_DIAGNOSTICS_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "ResetWatermarks", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "ThreadMetrics", + "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": "CurrentHeapFree", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentHeapUsed", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentHeapHighWatermark", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int64u", + "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": "Wi-Fi Network Diagnostics", "code": 54, @@ -2053,6 +2228,16 @@ "define": "WIFI_NETWORK_DIAGNOSTICS_CLUSTER", "side": "server", "enabled": 1, + "commands": [ + { + "name": "ResetCounts", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], "attributes": [ { "name": "BSSID", @@ -2134,6 +2319,102 @@ "maxInterval": 65344, "reportableChange": 0 }, + { + "name": "BeaconLostCount", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BeaconRxCount", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PacketMulticastRxCount", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PacketMulticastTxCount", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PacketUnicastRxCount", + "code": 9, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PacketUnicastTxCount", + "code": 10, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "CurrentMaxRate", "code": 11, @@ -2150,6 +2431,22 @@ "maxInterval": 65344, "reportableChange": 0 }, + { + "name": "OverrunCount", + "code": 12, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "GeneratedCommandList", "code": 65528, @@ -2208,7 +2505,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "3", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -2230,6 +2527,29 @@ "maxInterval": 65344, "reportableChange": 0 } + ], + "events": [ + { + "name": "Disconnection", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "AssociationFailure", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "ConnectionStatus", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1 + } ] }, { @@ -2249,21 +2569,69 @@ "isEnabled": 1 }, { - "name": "RevokeCommissioning", + "name": "RevokeCommissioning", + "code": 2, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "WindowStatus", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "CommissioningWindowStatusEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AdminFabricIndex", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "fabric_idx", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AdminVendorId", "code": 2, "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - } - ], - "attributes": [ + "side": "server", + "type": "vendor_id", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { - "name": "WindowStatus", - "code": 0, + "name": "GeneratedCommandList", + "code": 65528, "mfgCode": null, "side": "server", - "type": "CommissioningWindowStatusEnum", + "type": "array", "included": 1, "storageOption": "External", "singleton": 0, @@ -2275,11 +2643,11 @@ "reportableChange": 0 }, { - "name": "AdminFabricIndex", - "code": 1, + "name": "AcceptedCommandList", + "code": 65529, "mfgCode": null, "side": "server", - "type": "fabric_idx", + "type": "array", "included": 1, "storageOption": "External", "singleton": 0, @@ -2291,11 +2659,11 @@ "reportableChange": 0 }, { - "name": "AdminVendorId", - "code": 2, + "name": "AttributeList", + "code": 65531, "mfgCode": null, "side": "server", - "type": "vendor_id", + "type": "array", "included": 1, "storageOption": "External", "singleton": 0, @@ -2542,6 +2910,54 @@ "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, @@ -2698,6 +3114,54 @@ "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, @@ -3287,7 +3751,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "2", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -3303,7 +3767,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -3415,6 +3879,22 @@ "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, @@ -3521,6 +4001,22 @@ "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, @@ -3627,6 +4123,22 @@ "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, @@ -3733,6 +4245,22 @@ "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, @@ -3905,6 +4433,22 @@ "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, @@ -3947,7 +4491,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "2", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -4059,6 +4603,22 @@ "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, @@ -4191,6 +4751,22 @@ "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, @@ -4419,6 +4995,22 @@ "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, @@ -4461,7 +5053,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "2", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -4506,4 +5098,4 @@ "parentEndpointIdentifier": null } ] -} \ No newline at end of file +} From 9666db626860f2e294a7b2ec913cd3c5ee27218b Mon Sep 17 00:00:00 2001 From: Oliver Fan Date: Tue, 22 Oct 2024 00:51:32 -0700 Subject: [PATCH 4/6] Update RT1060 RTOS laundry washer app to aligh with rw61x and rt1170 to pass TC-OPSTATE-2.6 Signed-off-by: Oliver Fan --- examples/laundry-washer-app/nxp/rt/rt1060/BUILD.gn | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/examples/laundry-washer-app/nxp/rt/rt1060/BUILD.gn b/examples/laundry-washer-app/nxp/rt/rt1060/BUILD.gn index 315704cd06699f..4e417419464ee8 100644 --- a/examples/laundry-washer-app/nxp/rt/rt1060/BUILD.gn +++ b/examples/laundry-washer-app/nxp/rt/rt1060/BUILD.gn @@ -183,11 +183,10 @@ rt_executable("laundry-washer") { sources += [ "${chip_root}/examples/all-clusters-app/all-clusters-common/src/bridged-actions-stub.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/laundry-washer-controls-delegate-impl.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/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", "../../common/main/laundry-washer-mode.cpp", - "../../common/main/operational-state-delegate-impl.cpp", ] if (nxp_enable_matter_cli) { From 808caf3f6ed0c99e1045d3b3e9e0aab5d097c2b4 Mon Sep 17 00:00:00 2001 From: "Restyled.io" Date: Thu, 28 Nov 2024 13:12:23 +0000 Subject: [PATCH 5/6] Restyled by clang-format --- examples/laundry-washer-app/nxp/common/main/AppTask.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/examples/laundry-washer-app/nxp/common/main/AppTask.cpp b/examples/laundry-washer-app/nxp/common/main/AppTask.cpp index 3b5f25e0cfeb6c..b9cb8716dbe776 100644 --- a/examples/laundry-washer-app/nxp/common/main/AppTask.cpp +++ b/examples/laundry-washer-app/nxp/common/main/AppTask.cpp @@ -21,8 +21,8 @@ #include "AppTask.h" #include "CHIPDeviceManager.h" #include "ICDUtil.h" -#include #include +#include #include #include "static-supported-temperature-levels.h" @@ -88,8 +88,11 @@ static CHIP_ERROR cliOpState(int argc, char * argv[]) { auto error = OperationalState::GetOperationalStateInstance()->SetOperationalState(map_cmd_opstate.at(argv[0])); ChipLogDetail(Shell, "OpSState : Set to %s state & CountdownTime", argv[0]); - if ((error == CHIP_NO_ERROR)&&(map_cmd_opstate.at(argv[0]) == to_underlying(chip::app::Clusters::OperationalState::OperationalStateEnum::kRunning))) { - chip::app::Clusters::OperationalState::GenericOperationalError err(to_underlying(chip::app::Clusters::OperationalState::ErrorStateEnum::kNoError)); + if ((error == CHIP_NO_ERROR) && + (map_cmd_opstate.at(argv[0]) == to_underlying(chip::app::Clusters::OperationalState::OperationalStateEnum::kRunning))) + { + chip::app::Clusters::OperationalState::GenericOperationalError err( + to_underlying(chip::app::Clusters::OperationalState::ErrorStateEnum::kNoError)); OperationalState::GetOperationalStateDelegate()->HandleStartStateCallback(err); } if (!strcmp(argv[0], "error") && argc == 2) From c80613cd6cde660602121fc1fce6f37a75dbc263 Mon Sep 17 00:00:00 2001 From: "Restyled.io" Date: Thu, 28 Nov 2024 13:12:25 +0000 Subject: [PATCH 6/6] Restyled by gn --- examples/laundry-washer-app/nxp/rt/rt1170/BUILD.gn | 2 +- examples/laundry-washer-app/nxp/rt/rw61x/BUILD.gn | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/laundry-washer-app/nxp/rt/rt1170/BUILD.gn b/examples/laundry-washer-app/nxp/rt/rt1170/BUILD.gn index 85ed01eab2b7b4..0e0e71e8c2dfc1 100644 --- a/examples/laundry-washer-app/nxp/rt/rt1170/BUILD.gn +++ b/examples/laundry-washer-app/nxp/rt/rt1170/BUILD.gn @@ -171,9 +171,9 @@ rt_executable("laundry-washer-app") { sources += [ "${chip_root}/examples/all-clusters-app/all-clusters-common/src/bridged-actions-stub.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/laundry-washer-controls-delegate-impl.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/smco-stub.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/static-supported-temperature-levels.cpp", - "${chip_root}/examples/all-clusters-app/all-clusters-common/src/operational-state-delegate-impl.cpp", "../../common/main/laundry-washer-mode.cpp", ] diff --git a/examples/laundry-washer-app/nxp/rt/rw61x/BUILD.gn b/examples/laundry-washer-app/nxp/rt/rw61x/BUILD.gn index d1607a7af26100..1ef89a3852c2d9 100644 --- a/examples/laundry-washer-app/nxp/rt/rw61x/BUILD.gn +++ b/examples/laundry-washer-app/nxp/rt/rw61x/BUILD.gn @@ -193,10 +193,10 @@ rt_executable("laundry-washer") { sources += [ "${chip_root}/examples/all-clusters-app/all-clusters-common/src/bridged-actions-stub.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/laundry-washer-controls-delegate-impl.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/smco-stub.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/static-supported-temperature-levels.cpp", "../../common/main/laundry-washer-mode.cpp", - "${chip_root}/examples/all-clusters-app/all-clusters-common/src/operational-state-delegate-impl.cpp", ] if (nxp_enable_matter_cli) {