diff --git a/examples/window-app/common/src/WindowApp.cpp b/examples/window-app/common/src/WindowApp.cpp index 01d9649d9b309d..813ad816a156ad 100644 --- a/examples/window-app/common/src/WindowApp.cpp +++ b/examples/window-app/common/src/WindowApp.cpp @@ -425,9 +425,15 @@ void WindowApp::Cover::Finish() void WindowApp::Cover::LiftUp() { - uint16_t percent100ths = 0; + EmberAfStatus status; + chip::app::DataModel::Nullable current; + chip::Percent100ths percent100ths = 5000; // set at middle + + status = Attributes::CurrentPositionLiftPercent100ths::Get(mEndpoint, current); + + if ((status == EMBER_ZCL_STATUS_SUCCESS) && !current.IsNull()) + percent100ths = current.Value(); - Attributes::CurrentPositionLiftPercent100ths::Get(mEndpoint, &percent100ths); if (percent100ths < 9000) { percent100ths += 1000; @@ -441,9 +447,15 @@ void WindowApp::Cover::LiftUp() void WindowApp::Cover::LiftDown() { - uint16_t percent100ths = 0; + EmberAfStatus status; + chip::app::DataModel::Nullable current; + chip::Percent100ths percent100ths = 5000; // set at middle + + status = Attributes::CurrentPositionLiftPercent100ths::Get(mEndpoint, current); + + if ((status == EMBER_ZCL_STATUS_SUCCESS) && !current.IsNull()) + percent100ths = current.Value(); - Attributes::CurrentPositionLiftPercent100ths::Get(mEndpoint, &percent100ths); if (percent100ths > 1000) { percent100ths -= 1000; @@ -457,10 +469,15 @@ void WindowApp::Cover::LiftDown() void WindowApp::Cover::GotoLift(EventId action) { - uint16_t current = 0; - uint16_t target = 0; - Attributes::TargetPositionLiftPercent100ths::Get(mEndpoint, &target); - Attributes::CurrentPositionLiftPercent100ths::Get(mEndpoint, ¤t); + chip::app::DataModel::Nullable current; + chip::app::DataModel::Nullable target; + Attributes::TargetPositionLiftPercent100ths::Get(mEndpoint, target); + Attributes::CurrentPositionLiftPercent100ths::Get(mEndpoint, current); + + if (current.IsNull() || target.IsNull()) + { + return; + } if (EventId::None != action) { @@ -469,7 +486,7 @@ void WindowApp::Cover::GotoLift(EventId action) if (EventId::LiftUp == mLiftAction) { - if (current < target) + if (current.Value() < target.Value()) { LiftUp(); } @@ -480,7 +497,7 @@ void WindowApp::Cover::GotoLift(EventId action) } else { - if (current > target) + if (current.Value() > target.Value()) { LiftDown(); } @@ -498,8 +515,15 @@ void WindowApp::Cover::GotoLift(EventId action) void WindowApp::Cover::TiltUp() { - uint16_t percent100ths = 0; - Attributes::CurrentPositionTiltPercent100ths::Get(mEndpoint, &percent100ths); + EmberAfStatus status; + chip::app::DataModel::Nullable current; + chip::Percent100ths percent100ths = 5000; // set at middle + + status = Attributes::CurrentPositionTiltPercent100ths::Get(mEndpoint, current); + + if ((status == EMBER_ZCL_STATUS_SUCCESS) && !current.IsNull()) + percent100ths = current.Value(); + if (percent100ths < 9000) { percent100ths += 1000; @@ -513,8 +537,15 @@ void WindowApp::Cover::TiltUp() void WindowApp::Cover::TiltDown() { - uint16_t percent100ths = 0; - Attributes::CurrentPositionTiltPercent100ths::Get(mEndpoint, &percent100ths); + EmberAfStatus status; + chip::app::DataModel::Nullable current; + chip::Percent100ths percent100ths = 5000; // set at middle + + status = Attributes::CurrentPositionTiltPercent100ths::Get(mEndpoint, current); + + if ((status == EMBER_ZCL_STATUS_SUCCESS) && !current.IsNull()) + percent100ths = current.Value(); + if (percent100ths > 1000) { percent100ths -= 1000; @@ -528,11 +559,15 @@ void WindowApp::Cover::TiltDown() void WindowApp::Cover::GotoTilt(EventId action) { - uint16_t current = 0; - uint16_t target = 0; + chip::app::DataModel::Nullable current; + chip::app::DataModel::Nullable target; + Attributes::TargetPositionTiltPercent100ths::Get(mEndpoint, target); + Attributes::CurrentPositionTiltPercent100ths::Get(mEndpoint, current); - Attributes::TargetPositionTiltPercent100ths::Get(mEndpoint, &target); - Attributes::CurrentPositionTiltPercent100ths::Get(mEndpoint, ¤t); + if (current.IsNull() || target.IsNull()) + { + return; + } if (EventId::None != action) { @@ -541,7 +576,7 @@ void WindowApp::Cover::GotoTilt(EventId action) if (EventId::TiltUp == mTiltAction) { - if (current < target) + if (current.Value() < target.Value()) { TiltUp(); } @@ -552,7 +587,7 @@ void WindowApp::Cover::GotoTilt(EventId action) } else { - if (current > target) + if (current.Value() > target.Value()) { TiltDown(); } diff --git a/examples/window-app/common/src/ZclCallbacks.cpp b/examples/window-app/common/src/ZclCallbacks.cpp index b564449abcef39..fdea8bac07fd86 100644 --- a/examples/window-app/common/src/ZclCallbacks.cpp +++ b/examples/window-app/common/src/ZclCallbacks.cpp @@ -55,8 +55,9 @@ void MatterPostAttributeChangeCallback(const app::ConcreteAttributePath & attrib WindowApp & app = WindowApp::Instance(); EndpointId endpoint = attributePath.mEndpointId; - uint16_t current; - uint16_t target; + + chip::app::DataModel::Nullable current; + chip::app::DataModel::Nullable target; switch (attributePath.mAttributeId) { @@ -73,28 +74,34 @@ void MatterPostAttributeChangeCallback(const app::ConcreteAttributePath & attrib break; case Attributes::TargetPositionLiftPercent100ths::Id: - Attributes::TargetPositionLiftPercent100ths::Get(endpoint, &target); - Attributes::CurrentPositionLiftPercent100ths::Get(endpoint, ¤t); - if (current > target) - { - app.PostEvent(WindowApp::Event(WindowApp::EventId::LiftDown, endpoint)); - } - else if (current < target) + Attributes::TargetPositionLiftPercent100ths::Get(endpoint, target); + Attributes::CurrentPositionLiftPercent100ths::Get(endpoint, current); + if (!current.IsNull() && !target.IsNull()) { - app.PostEvent(WindowApp::Event(WindowApp::EventId::LiftUp, endpoint)); + if (current.Value() > target.Value()) + { + app.PostEvent(WindowApp::Event(WindowApp::EventId::LiftDown, endpoint)); + } + else if (current.Value() < target.Value()) + { + app.PostEvent(WindowApp::Event(WindowApp::EventId::LiftUp, endpoint)); + } } break; case Attributes::TargetPositionTiltPercent100ths::Id: - Attributes::TargetPositionTiltPercent100ths::Get(endpoint, &target); - Attributes::CurrentPositionTiltPercent100ths::Get(endpoint, ¤t); - if (current > target) - { - app.PostEvent(WindowApp::Event(WindowApp::EventId::TiltDown, endpoint)); - } - else if (current < target) + Attributes::TargetPositionTiltPercent100ths::Get(endpoint, target); + Attributes::CurrentPositionTiltPercent100ths::Get(endpoint, current); + if (!current.IsNull() && !target.IsNull()) { - app.PostEvent(WindowApp::Event(WindowApp::EventId::TiltUp, endpoint)); + if (current.Value() > target.Value()) + { + app.PostEvent(WindowApp::Event(WindowApp::EventId::TiltDown, endpoint)); + } + else if (current.Value() < target.Value()) + { + app.PostEvent(WindowApp::Event(WindowApp::EventId::TiltUp, endpoint)); + } } break; diff --git a/examples/window-app/efr32/src/WindowAppImpl.cpp b/examples/window-app/efr32/src/WindowAppImpl.cpp index 6d19e2930b410f..6a294c941b5261 100644 --- a/examples/window-app/efr32/src/WindowAppImpl.cpp +++ b/examples/window-app/efr32/src/WindowAppImpl.cpp @@ -327,11 +327,11 @@ void WindowAppImpl::UpdateLEDs() { mActionLED.Blink(100); } - else if (IsOpen(cover.mEndpoint)) + else if (IsLiftOpen(cover.mEndpoint)) { mActionLED.Set(true); } - else if (IsClosed(cover.mEndpoint)) + else if (IsLiftClosed(cover.mEndpoint)) { mActionLED.Set(false); } @@ -350,11 +350,15 @@ void WindowAppImpl::UpdateLCD() { Cover & cover = GetCover(); EmberAfWcType type = TypeGet(cover.mEndpoint); - uint16_t lift = 0; - uint16_t tilt = 0; - Attributes::CurrentPositionLift::Get(cover.mEndpoint, &lift); - Attributes::CurrentPositionTilt::Get(cover.mEndpoint, &tilt); - LcdPainter::Paint(type, static_cast(lift), static_cast(tilt), mIcon); + chip::app::DataModel::Nullable lift; + chip::app::DataModel::Nullable tilt; + Attributes::CurrentPositionLift::Get(cover.mEndpoint, lift); + Attributes::CurrentPositionTilt::Get(cover.mEndpoint, tilt); + + if (!tilt.IsNull() && !lift.IsNull()) + { + LcdPainter::Paint(type, static_cast(lift.Value()), static_cast(tilt.Value()), mIcon); + } } else { diff --git a/src/app/clusters/window-covering-server/window-covering-server.cpp b/src/app/clusters/window-covering-server/window-covering-server.cpp index 04a65368ba72eb..f04f8d0915f582 100644 --- a/src/app/clusters/window-covering-server/window-covering-server.cpp +++ b/src/app/clusters/window-covering-server/window-covering-server.cpp @@ -15,23 +15,6 @@ * limitations under the License. */ -/** - * - * Copyright (c) 2020 Silicon Labs - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance 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 "window-covering-server.h" #include @@ -56,9 +39,10 @@ using namespace chip; using namespace chip::app::Clusters::WindowCovering; +#define WC_PERCENT100THS_MIN 0 #define WC_PERCENT100THS_MAX 10000 -static bool HasFeature(chip::EndpointId endpoint, WindowCoveringFeature feature) +static bool HasFeature(chip::EndpointId endpoint, WcFeature feature) { uint32_t FeatureMap = 0; if (EMBER_ZCL_STATUS_SUCCESS == @@ -72,6 +56,16 @@ static bool HasFeature(chip::EndpointId endpoint, WindowCoveringFeature feature) return false; } +static bool HasFeaturePaLift(chip::EndpointId endpoint) +{ + return (HasFeature(endpoint, WcFeature::kLift) && HasFeature(endpoint, WcFeature::kPositionAwareLift)); +} + +static bool HasFeaturePaTilt(chip::EndpointId endpoint) +{ + return (HasFeature(endpoint, WcFeature::kTilt) && HasFeature(endpoint, WcFeature::kPositionAwareTilt)); +} + static uint16_t ValueToPercent100ths(uint16_t openLimit, uint16_t closedLimit, uint16_t value) { uint16_t minimum = 0, range = UINT16_MAX; @@ -161,48 +155,56 @@ namespace app { namespace Clusters { namespace WindowCovering { -bool IsOpen(chip::EndpointId endpoint) +bool IsLiftOpen(chip::EndpointId endpoint) { - uint16_t liftPosition = 0; - uint16_t liftLimit = 0; - uint16_t tiltPosition = 0; - uint16_t tiltLimit = 0; - bool isOpen = false; + EmberAfStatus status; + app::DataModel::Nullable position; - if (HasFeature(endpoint, WindowCoveringFeature::kLift) && HasFeature(endpoint, WindowCoveringFeature::kPositionAwareLift) && - HasFeature(endpoint, WindowCoveringFeature::kAbsolutePosition) && - EMBER_ZCL_STATUS_SUCCESS == Attributes::TargetPositionLiftPercent100ths::Get(endpoint, &liftPosition) && - EMBER_ZCL_STATUS_SUCCESS == Attributes::InstalledOpenLimitLift::Get(endpoint, &liftLimit)) - { - isOpen = liftPosition == liftLimit; - } - else if (HasFeature(endpoint, WindowCoveringFeature::kLift) && - HasFeature(endpoint, WindowCoveringFeature::kPositionAwareLift) && - EMBER_ZCL_STATUS_SUCCESS == Attributes::TargetPositionLiftPercent100ths::Get(endpoint, &liftPosition)) - { - isOpen = 0 == liftPosition; - } + status = Attributes::TargetPositionLiftPercent100ths::Get(endpoint, position); - if (HasFeature(endpoint, WindowCoveringFeature::kTilt) && HasFeature(endpoint, WindowCoveringFeature::kPositionAwareTilt) && - HasFeature(endpoint, WindowCoveringFeature::kAbsolutePosition) && - EMBER_ZCL_STATUS_SUCCESS == Attributes::TargetPositionTiltPercent100ths::Get(endpoint, &tiltPosition) && - EMBER_ZCL_STATUS_SUCCESS == Attributes::InstalledOpenLimitTilt::Get(endpoint, &tiltLimit)) - { - isOpen = isOpen && tiltPosition == tiltLimit; - } - else if (HasFeature(endpoint, WindowCoveringFeature::kTilt) && - HasFeature(endpoint, WindowCoveringFeature::kPositionAwareTilt) && - EMBER_ZCL_STATUS_SUCCESS == Attributes::TargetPositionTiltPercent100ths::Get(endpoint, &tiltPosition)) - { - isOpen = isOpen && 0 == tiltPosition; - } + if ((status != EMBER_ZCL_STATUS_SUCCESS) || position.IsNull()) + return false; + + return ((position.Value() == WC_PERCENT100THS_MIN)); +} + +bool IsTiltOpen(chip::EndpointId endpoint) +{ + EmberAfStatus status; + app::DataModel::Nullable position; + + status = Attributes::TargetPositionTiltPercent100ths::Get(endpoint, position); + + if ((status != EMBER_ZCL_STATUS_SUCCESS) || position.IsNull()) + return false; + + return ((position.Value() == WC_PERCENT100THS_MIN)); +} + +bool IsLiftClosed(chip::EndpointId endpoint) +{ + EmberAfStatus status; + app::DataModel::Nullable position; - return isOpen; + status = Attributes::TargetPositionLiftPercent100ths::Get(endpoint, position); + + if ((status != EMBER_ZCL_STATUS_SUCCESS) || position.IsNull()) + return false; + + return ((position.Value() == WC_PERCENT100THS_MAX)); } -bool IsClosed(chip::EndpointId endpoint) +bool IsTiltClosed(chip::EndpointId endpoint) { - return !IsOpen(endpoint); + EmberAfStatus status; + app::DataModel::Nullable position; + + status = Attributes::TargetPositionTiltPercent100ths::Get(endpoint, position); + + if ((status != EMBER_ZCL_STATUS_SUCCESS) || position.IsNull()) + return false; + + return ((position.Value() == WC_PERCENT100THS_MAX)); } void TypeSet(chip::EndpointId endpoint, EmberAfWcType type) @@ -425,13 +427,13 @@ bool emberAfWindowCoveringClusterUpOrOpenCallback(app::CommandHandler * commandO EndpointId endpoint = commandPath.mEndpointId; emberAfWindowCoveringClusterPrint("UpOrOpen command received"); - if (HasFeature(endpoint, WindowCoveringFeature::kLift)) + if (HasFeature(endpoint, WcFeature::kLift)) { - Attributes::TargetPositionLiftPercent100ths::Set(endpoint, 0); + Attributes::TargetPositionLiftPercent100ths::Set(endpoint, WC_PERCENT100THS_MIN); } - if (HasFeature(endpoint, WindowCoveringFeature::kTilt)) + if (HasFeature(endpoint, WcFeature::kTilt)) { - Attributes::TargetPositionTiltPercent100ths::Set(endpoint, 0); + Attributes::TargetPositionTiltPercent100ths::Set(endpoint, WC_PERCENT100THS_MIN); } emberAfSendImmediateDefaultResponse(EMBER_ZCL_STATUS_SUCCESS); return true; @@ -446,11 +448,11 @@ bool emberAfWindowCoveringClusterDownOrCloseCallback(app::CommandHandler * comma EndpointId endpoint = commandPath.mEndpointId; emberAfWindowCoveringClusterPrint("DownOrClose command received"); - if (HasFeature(endpoint, WindowCoveringFeature::kLift)) + if (HasFeature(endpoint, WcFeature::kLift)) { Attributes::TargetPositionLiftPercent100ths::Set(endpoint, WC_PERCENT100THS_MAX); } - if (HasFeature(endpoint, WindowCoveringFeature::kTilt)) + if (HasFeature(endpoint, WcFeature::kTilt)) { Attributes::TargetPositionTiltPercent100ths::Set(endpoint, WC_PERCENT100THS_MAX); } @@ -466,18 +468,18 @@ emberAfWindowCoveringClusterStopMotionCallback(app::CommandHandler * commandObj, const Commands::StopMotion::DecodableType & fields) { emberAfWindowCoveringClusterPrint("StopMotion command received"); - uint16_t current = 0; + app::DataModel::Nullable current; chip::EndpointId endpoint = commandPath.mEndpointId; - if (HasFeature(endpoint, WindowCoveringFeature::kLift) && HasFeature(endpoint, WindowCoveringFeature::kPositionAwareLift)) + if (HasFeaturePaLift(endpoint)) { - (void) Attributes::CurrentPositionLiftPercent100ths::Get(endpoint, ¤t); + (void) Attributes::CurrentPositionLiftPercent100ths::Get(endpoint, current); (void) Attributes::TargetPositionLiftPercent100ths::Set(endpoint, current); } - if (HasFeature(endpoint, WindowCoveringFeature::kTilt) && HasFeature(endpoint, WindowCoveringFeature::kPositionAwareTilt)) + if (HasFeaturePaTilt(endpoint)) { - (void) Attributes::CurrentPositionTiltPercent100ths::Get(endpoint, ¤t); + (void) Attributes::CurrentPositionTiltPercent100ths::Get(endpoint, current); (void) Attributes::TargetPositionTiltPercent100ths::Set(endpoint, current); } @@ -495,18 +497,15 @@ bool emberAfWindowCoveringClusterGoToLiftValueCallback(app::CommandHandler * com EndpointId endpoint = commandPath.mEndpointId; - bool hasLift = HasFeature(endpoint, WindowCoveringFeature::kLift); - bool isPositionAware = HasFeature(endpoint, WindowCoveringFeature::kPositionAwareLift); - emberAfWindowCoveringClusterPrint("GoToLiftValue Value command received"); - if (hasLift && isPositionAware) + if (HasFeature(endpoint, WcFeature::kAbsolutePosition) && HasFeaturePaLift(endpoint)) { Attributes::TargetPositionLiftPercent100ths::Set(endpoint, LiftToPercent100ths(endpoint, liftValue)); emberAfSendImmediateDefaultResponse(EMBER_ZCL_STATUS_SUCCESS); } else { - emberAfWindowCoveringClusterPrint("Err Device is not PA=%u or LF=%u", isPositionAware, hasLift); + emberAfWindowCoveringClusterPrint("Err Device is not PA LF"); emberAfSendImmediateDefaultResponse(EMBER_ZCL_STATUS_ACTION_DENIED); } return true; @@ -524,11 +523,8 @@ bool emberAfWindowCoveringClusterGoToLiftPercentageCallback(app::CommandHandler EndpointId endpoint = commandPath.mEndpointId; - bool hasLift = HasFeature(endpoint, WindowCoveringFeature::kLift); - bool isPositionAware = HasFeature(endpoint, WindowCoveringFeature::kPositionAwareLift); - emberAfWindowCoveringClusterPrint("GoToLiftPercentage Percentage command received"); - if (hasLift && isPositionAware) + if (HasFeaturePaLift(endpoint)) { Attributes::TargetPositionLiftPercent100ths::Set( endpoint, static_cast(liftPercentageValue > 100 ? liftPercent100thsValue : liftPercentageValue * 100)); @@ -536,7 +532,7 @@ bool emberAfWindowCoveringClusterGoToLiftPercentageCallback(app::CommandHandler } else { - emberAfWindowCoveringClusterPrint("Err Device is not PA=%u or LF=%u", isPositionAware, hasLift); + emberAfWindowCoveringClusterPrint("Err Device is not PA LF"); emberAfSendImmediateDefaultResponse(EMBER_ZCL_STATUS_ACTION_DENIED); } return true; @@ -553,18 +549,15 @@ bool emberAfWindowCoveringClusterGoToTiltValueCallback(app::CommandHandler * com EndpointId endpoint = commandPath.mEndpointId; - bool hasTilt = HasFeature(endpoint, WindowCoveringFeature::kTilt); - bool isPositionAware = HasFeature(endpoint, WindowCoveringFeature::kPositionAwareTilt); - emberAfWindowCoveringClusterPrint("GoToTiltValue command received"); - if (hasTilt && isPositionAware) + if (HasFeature(endpoint, WcFeature::kAbsolutePosition) && HasFeaturePaTilt(endpoint)) { Attributes::TargetPositionTiltPercent100ths::Set(endpoint, TiltToPercent100ths(endpoint, tiltValue)); emberAfSendImmediateDefaultResponse(EMBER_ZCL_STATUS_SUCCESS); } else { - emberAfWindowCoveringClusterPrint("Err Device is not PA=%u or TL=%u", isPositionAware, hasTilt); + emberAfWindowCoveringClusterPrint("Err Device is not PA TL"); emberAfSendImmediateDefaultResponse(EMBER_ZCL_STATUS_ACTION_DENIED); } return true; @@ -582,11 +575,8 @@ bool emberAfWindowCoveringClusterGoToTiltPercentageCallback(app::CommandHandler EndpointId endpoint = commandPath.mEndpointId; - bool hasTilt = HasFeature(endpoint, WindowCoveringFeature::kTilt); - bool isPositionAware = HasFeature(endpoint, WindowCoveringFeature::kPositionAwareTilt); - emberAfWindowCoveringClusterPrint("GoToTiltPercentage command received"); - if (hasTilt && isPositionAware) + if (HasFeaturePaTilt(endpoint)) { Attributes::TargetPositionTiltPercent100ths::Set( endpoint, static_cast(tiltPercentageValue > 100 ? tiltPercent100thsValue : tiltPercentageValue * 100)); @@ -594,7 +584,7 @@ bool emberAfWindowCoveringClusterGoToTiltPercentageCallback(app::CommandHandler } else { - emberAfWindowCoveringClusterPrint("Err Device is not PA=%u or TL=%u", isPositionAware, hasTilt); + emberAfWindowCoveringClusterPrint("Err Device is not PA TL"); emberAfSendImmediateDefaultResponse(EMBER_ZCL_STATUS_ACTION_DENIED); } return true; diff --git a/src/app/clusters/window-covering-server/window-covering-server.h b/src/app/clusters/window-covering-server/window-covering-server.h index d0db0bff505b93..9106fed3c72bf8 100644 --- a/src/app/clusters/window-covering-server/window-covering-server.h +++ b/src/app/clusters/window-covering-server/window-covering-server.h @@ -81,8 +81,11 @@ struct SafetyStatus }; static_assert(sizeof(SafetyStatus) == sizeof(uint16_t), "SafetyStatus Size is not correct"); -bool IsOpen(chip::EndpointId endpoint); -bool IsClosed(chip::EndpointId endpoint); +bool IsLiftOpen(chip::EndpointId endpoint); +bool IsLiftClosed(chip::EndpointId endpoint); + +bool IsTiltOpen(chip::EndpointId endpoint); +bool IsTiltClosed(chip::EndpointId endpoint); void TypeSet(chip::EndpointId endpoint, EmberAfWcType type); EmberAfWcType TypeGet(chip::EndpointId endpoint); diff --git a/src/app/tests/suites/certification/Test_TC_WNCV_2_1.yaml b/src/app/tests/suites/certification/Test_TC_WNCV_2_1.yaml index bcccec313e5243..cf87152b1ab274 100644 --- a/src/app/tests/suites/certification/Test_TC_WNCV_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_WNCV_2_1.yaml @@ -162,7 +162,7 @@ tests: attribute: "TargetPositionLiftPercent100ths" response: constraints: - type: uint16 + type: Percent100ths minValue: 0 maxValue: 10000 @@ -183,7 +183,7 @@ tests: attribute: "TargetPositionLiftPercent100ths" response: constraints: - type: uint16 + type: Percent100ths notValue: 20000 ### Attribute[ 12]: TargetPositionTiltPercent100ths ==================== @@ -194,7 +194,7 @@ tests: attribute: "TargetPositionTiltPercent100ths" response: constraints: - type: uint16 + type: Percent100ths minValue: 0 maxValue: 10000 @@ -215,7 +215,7 @@ tests: attribute: "TargetPositionTiltPercent100ths" response: constraints: - type: uint16 + type: Percent100ths notValue: 20000 ### Attribute[ 14]: CurrentPositionLiftPercent100ths ==================== @@ -226,7 +226,7 @@ tests: attribute: "CurrentPositionLiftPercent100ths" response: constraints: - type: uint16 + type: Percent100ths minValue: 0 maxValue: 10000 @@ -247,7 +247,7 @@ tests: attribute: "CurrentPositionLiftPercent100ths" response: constraints: - type: uint16 + type: Percent100ths notValue: 20000 ### Attribute[ 15]: CurrentPositionTiltPercent100ths ==================== @@ -258,7 +258,7 @@ tests: attribute: "CurrentPositionTiltPercent100ths" response: constraints: - type: uint16 + type: Percent100ths minValue: 0 maxValue: 10000 @@ -279,7 +279,7 @@ tests: attribute: "CurrentPositionTiltPercent100ths" response: constraints: - type: uint16 + type: Percent100ths notValue: 20000 ### Attribute[ 16]: InstalledOpenLimitLift ==================== @@ -623,7 +623,7 @@ tests: attribute: "CurrentPositionLiftPercentage" response: constraints: - type: uint8 + type: Percent minValue: 0 maxValue: 100 @@ -644,7 +644,7 @@ tests: attribute: "CurrentPositionLiftPercentage" response: constraints: - type: uint8 + type: Percent notValue: 200 ### Attribute[ 9]: CurrentPositionTiltPercentage ==================== @@ -655,7 +655,7 @@ tests: attribute: "CurrentPositionTiltPercentage" response: constraints: - type: uint8 + type: Percent minValue: 0 maxValue: 100 @@ -676,7 +676,7 @@ tests: attribute: "CurrentPositionTiltPercentage" response: constraints: - type: uint8 + type: Percent notValue: 200 ################################################### # FYI Non Tested deprecated attributes diff --git a/src/app/util/ember-compatibility-functions.cpp b/src/app/util/ember-compatibility-functions.cpp index 80574826d138bc..c9e092d82409f0 100644 --- a/src/app/util/ember-compatibility-functions.cpp +++ b/src/app/util/ember-compatibility-functions.cpp @@ -76,18 +76,24 @@ EmberAfAttributeType BaseType(EmberAfAttributeType type) case ZCL_FABRIC_IDX_ATTRIBUTE_TYPE: // Fabric Index case ZCL_BITMAP8_ATTRIBUTE_TYPE: // 8-bit bitmap case ZCL_ENUM8_ATTRIBUTE_TYPE: // 8-bit enumeration + case ZCL_PERCENT_ATTRIBUTE_TYPE: // Percentage + static_assert(std::is_same::value, + "chip::Percent is expected to be uint8_t, change this when necessary"); return ZCL_INT8U_ATTRIBUTE_TYPE; - case ZCL_ENDPOINT_NO_ATTRIBUTE_TYPE: // Endpoint Number - case ZCL_GROUP_ID_ATTRIBUTE_TYPE: // Group Id - case ZCL_VENDOR_ID_ATTRIBUTE_TYPE: // Vendor Id - case ZCL_ENUM16_ATTRIBUTE_TYPE: // 16-bit enumeration - case ZCL_BITMAP16_ATTRIBUTE_TYPE: // 16-bit bitmap - case ZCL_STATUS_ATTRIBUTE_TYPE: // Status Code + case ZCL_ENDPOINT_NO_ATTRIBUTE_TYPE: // Endpoint Number + case ZCL_GROUP_ID_ATTRIBUTE_TYPE: // Group Id + case ZCL_VENDOR_ID_ATTRIBUTE_TYPE: // Vendor Id + case ZCL_ENUM16_ATTRIBUTE_TYPE: // 16-bit enumeration + case ZCL_BITMAP16_ATTRIBUTE_TYPE: // 16-bit bitmap + case ZCL_STATUS_ATTRIBUTE_TYPE: // Status Code + case ZCL_PERCENT100THS_ATTRIBUTE_TYPE: // 100ths of a percent static_assert(std::is_same::value, - "chip::EndpointId is expected to be uint8_t, change this when necessary"); + "chip::EndpointId is expected to be uint16_t, change this when necessary"); static_assert(std::is_same::value, "chip::GroupId is expected to be uint16_t, change this when necessary"); + static_assert(std::is_same::value, + "chip::Percent100ths is expected to be uint16_t, change this when necessary"); return ZCL_INT16U_ATTRIBUTE_TYPE; case ZCL_CLUSTER_ID_ATTRIBUTE_TYPE: // Cluster Id diff --git a/src/app/zap-templates/zcl/data-model/chip/window-covering.xml b/src/app/zap-templates/zcl/data-model/chip/window-covering.xml index eeff24927ab8a2..da40584f80ab81 100644 --- a/src/app/zap-templates/zcl/data-model/chip/window-covering.xml +++ b/src/app/zap-templates/zcl/data-model/chip/window-covering.xml @@ -16,49 +16,82 @@ limitations under the License. Window Covering Closures - Provides an interface for controlling and adjusting automatic window coverings. 0x0102 WINDOW_COVERING_CLUSTER - true - true + Provides an interface for controlling and adjusting automatic window coverings. + + - + - + + + true + true + + + + Type - PhysicalClosedLimitLift - PhysicalClosedLimitTilt - CurrentPositionLift - CurrentPositionTilt - NumberOfActuationsLift - NumberOfActuationsTilt + + PhysicalClosedLimitLift + + PhysicalClosedLimitTilt + + CurrentPositionLift + + CurrentPositionTilt + + NumberOfActuationsLift + + NumberOfActuationsTilt + ConfigStatus - CurrentPositionLiftPercentage - CurrentPositionTiltPercentage - OperationalStatus - TargetPositionLiftPercent100ths - TargetPositionTiltPercent100ths - EndProductType - CurrentPositionLiftPercent100ths - CurrentPositionTiltPercent100ths + + CurrentPositionLiftPercentage + + CurrentPositionTiltPercentage + + OperationalStatus + + TargetPositionLiftPercent100ths + + TargetPositionTiltPercent100ths + + EndProductType + + CurrentPositionLiftPercent100ths + + CurrentPositionTiltPercent100ths - InstalledOpenLimitLift - InstalledClosedLimitLift - InstalledOpenLimitTilt - InstalledClosedLimitTilt - VelocityLift - AccelerationTimeLift - DecelerationTimeLift - Mode - IntermediateSetpointsLift - IntermediateSetpointsTilt - SafetyStatus + + InstalledOpenLimitLift + InstalledClosedLimitLift + + InstalledOpenLimitTilt + InstalledClosedLimitTilt + + + + + + + Mode + + + + + + + + SafetyStatus + Moves window covering to InstalledOpenLimitLift and InstalledOpenLimitTilt @@ -68,23 +101,27 @@ limitations under the License. Stop any adjusting of window covering + Go to lift value specified + Go to lift percentage specified - - + + + Go to tilt value specified + Go to tilt percentage specified - - + + @@ -104,7 +141,7 @@ limitations under the License. - + @@ -130,7 +167,7 @@ limitations under the License. - + @@ -174,7 +211,7 @@ limitations under the License. - + diff --git a/src/controller/java/zap-generated/CHIPClusters-JNI.cpp b/src/controller/java/zap-generated/CHIPClusters-JNI.cpp index d4965e577fd456..63b5ce368bff7c 100644 --- a/src/controller/java/zap-generated/CHIPClusters-JNI.cpp +++ b/src/controller/java/zap-generated/CHIPClusters-JNI.cpp @@ -29525,8 +29525,10 @@ JNI_METHOD(void, WindowCoveringCluster, subscribeCurrentPositionLiftAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - std::unique_ptr onSuccess( - Platform::New(callback, true), chip::Platform::Delete); + std::unique_ptr + onSuccess(Platform::New(callback, true), + chip::Platform::Delete); VerifyOrReturn(onSuccess.get() != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); @@ -29548,9 +29550,9 @@ JNI_METHOD(void, WindowCoveringCluster, subscribeCurrentPositionLiftAttribute) onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, - static_cast(minInterval), static_cast(maxInterval), - CHIPInt16uAttributeCallback::OnSubscriptionEstablished); + err = cppCluster->SubscribeAttribute( + onSuccess->mContext, successFn->mCall, failureFn->mCall, static_cast(minInterval), + static_cast(maxInterval), CHIPWindowCoveringCurrentPositionLiftAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -29562,8 +29564,10 @@ JNI_METHOD(void, WindowCoveringCluster, subscribeCurrentPositionTiltAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - std::unique_ptr onSuccess( - Platform::New(callback, true), chip::Platform::Delete); + std::unique_ptr + onSuccess(Platform::New(callback, true), + chip::Platform::Delete); VerifyOrReturn(onSuccess.get() != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); @@ -29585,9 +29589,9 @@ JNI_METHOD(void, WindowCoveringCluster, subscribeCurrentPositionTiltAttribute) onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, - static_cast(minInterval), static_cast(maxInterval), - CHIPInt16uAttributeCallback::OnSubscriptionEstablished); + err = cppCluster->SubscribeAttribute( + onSuccess->mContext, successFn->mCall, failureFn->mCall, static_cast(minInterval), + static_cast(maxInterval), CHIPWindowCoveringCurrentPositionTiltAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -29636,8 +29640,10 @@ JNI_METHOD(void, WindowCoveringCluster, subscribeCurrentPositionLiftPercentageAt (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - std::unique_ptr onSuccess( - Platform::New(callback, true), chip::Platform::Delete); + std::unique_ptr + onSuccess(Platform::New(callback, true), + chip::Platform::Delete); VerifyOrReturn(onSuccess.get() != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); @@ -29660,9 +29666,10 @@ JNI_METHOD(void, WindowCoveringCluster, subscribeCurrentPositionLiftPercentageAt onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, - static_cast(minInterval), static_cast(maxInterval), - CHIPInt8uAttributeCallback::OnSubscriptionEstablished); + err = cppCluster->SubscribeAttribute( + onSuccess->mContext, successFn->mCall, failureFn->mCall, static_cast(minInterval), + static_cast(maxInterval), + CHIPWindowCoveringCurrentPositionLiftPercentageAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -29674,8 +29681,10 @@ JNI_METHOD(void, WindowCoveringCluster, subscribeCurrentPositionTiltPercentageAt (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - std::unique_ptr onSuccess( - Platform::New(callback, true), chip::Platform::Delete); + std::unique_ptr + onSuccess(Platform::New(callback, true), + chip::Platform::Delete); VerifyOrReturn(onSuccess.get() != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); @@ -29698,9 +29707,10 @@ JNI_METHOD(void, WindowCoveringCluster, subscribeCurrentPositionTiltPercentageAt onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, - static_cast(minInterval), static_cast(maxInterval), - CHIPInt8uAttributeCallback::OnSubscriptionEstablished); + err = cppCluster->SubscribeAttribute( + onSuccess->mContext, successFn->mCall, failureFn->mCall, static_cast(minInterval), + static_cast(maxInterval), + CHIPWindowCoveringCurrentPositionTiltPercentageAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -29749,8 +29759,10 @@ JNI_METHOD(void, WindowCoveringCluster, subscribeTargetPositionLiftPercent100ths (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - std::unique_ptr onSuccess( - Platform::New(callback, true), chip::Platform::Delete); + std::unique_ptr + onSuccess(Platform::New(callback, true), + chip::Platform::Delete); VerifyOrReturn(onSuccess.get() != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); @@ -29773,9 +29785,10 @@ JNI_METHOD(void, WindowCoveringCluster, subscribeTargetPositionLiftPercent100ths onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, - static_cast(minInterval), static_cast(maxInterval), - CHIPInt16uAttributeCallback::OnSubscriptionEstablished); + err = cppCluster->SubscribeAttribute( + onSuccess->mContext, successFn->mCall, failureFn->mCall, static_cast(minInterval), + static_cast(maxInterval), + CHIPWindowCoveringTargetPositionLiftPercent100thsAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -29787,8 +29800,10 @@ JNI_METHOD(void, WindowCoveringCluster, subscribeTargetPositionTiltPercent100ths (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - std::unique_ptr onSuccess( - Platform::New(callback, true), chip::Platform::Delete); + std::unique_ptr + onSuccess(Platform::New(callback, true), + chip::Platform::Delete); VerifyOrReturn(onSuccess.get() != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); @@ -29811,9 +29826,10 @@ JNI_METHOD(void, WindowCoveringCluster, subscribeTargetPositionTiltPercent100ths onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, - static_cast(minInterval), static_cast(maxInterval), - CHIPInt16uAttributeCallback::OnSubscriptionEstablished); + err = cppCluster->SubscribeAttribute( + onSuccess->mContext, successFn->mCall, failureFn->mCall, static_cast(minInterval), + static_cast(maxInterval), + CHIPWindowCoveringTargetPositionTiltPercent100thsAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -29862,8 +29878,10 @@ JNI_METHOD(void, WindowCoveringCluster, subscribeCurrentPositionLiftPercent100th (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - std::unique_ptr onSuccess( - Platform::New(callback, true), chip::Platform::Delete); + std::unique_ptr + onSuccess(Platform::New(callback, true), + chip::Platform::Delete); VerifyOrReturn(onSuccess.get() != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); @@ -29886,9 +29904,10 @@ JNI_METHOD(void, WindowCoveringCluster, subscribeCurrentPositionLiftPercent100th onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, - static_cast(minInterval), static_cast(maxInterval), - CHIPInt16uAttributeCallback::OnSubscriptionEstablished); + err = cppCluster->SubscribeAttribute( + onSuccess->mContext, successFn->mCall, failureFn->mCall, static_cast(minInterval), + static_cast(maxInterval), + CHIPWindowCoveringCurrentPositionLiftPercent100thsAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -29900,8 +29919,10 @@ JNI_METHOD(void, WindowCoveringCluster, subscribeCurrentPositionTiltPercent100th (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - std::unique_ptr onSuccess( - Platform::New(callback, true), chip::Platform::Delete); + std::unique_ptr + onSuccess(Platform::New(callback, true), + chip::Platform::Delete); VerifyOrReturn(onSuccess.get() != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); @@ -29924,9 +29945,10 @@ JNI_METHOD(void, WindowCoveringCluster, subscribeCurrentPositionTiltPercent100th onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, - static_cast(minInterval), static_cast(maxInterval), - CHIPInt16uAttributeCallback::OnSubscriptionEstablished); + err = cppCluster->SubscribeAttribute( + onSuccess->mContext, successFn->mCall, failureFn->mCall, static_cast(minInterval), + static_cast(maxInterval), + CHIPWindowCoveringCurrentPositionTiltPercent100thsAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); diff --git a/src/controller/java/zap-generated/CHIPClustersRead-JNI.cpp b/src/controller/java/zap-generated/CHIPClustersRead-JNI.cpp index a4623fff8a86b1..0838fb6d911368 100644 --- a/src/controller/java/zap-generated/CHIPClustersRead-JNI.cpp +++ b/src/controller/java/zap-generated/CHIPClustersRead-JNI.cpp @@ -20755,8 +20755,10 @@ JNI_METHOD(void, WindowCoveringCluster, readCurrentPositionLiftAttribute) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::WindowCovering::Attributes::CurrentPositionLift::TypeInfo; - std::unique_ptr onSuccess( - chip::Platform::New(callback, false), chip::Platform::Delete); + std::unique_ptr + onSuccess(chip::Platform::New(callback, false), + chip::Platform::Delete); VerifyOrReturn(onSuccess.get() != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); @@ -20790,8 +20792,10 @@ JNI_METHOD(void, WindowCoveringCluster, readCurrentPositionTiltAttribute) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::WindowCovering::Attributes::CurrentPositionTilt::TypeInfo; - std::unique_ptr onSuccess( - chip::Platform::New(callback, false), chip::Platform::Delete); + std::unique_ptr + onSuccess(chip::Platform::New(callback, false), + chip::Platform::Delete); VerifyOrReturn(onSuccess.get() != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); @@ -20859,8 +20863,10 @@ JNI_METHOD(void, WindowCoveringCluster, readCurrentPositionLiftPercentageAttribu { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::WindowCovering::Attributes::CurrentPositionLiftPercentage::TypeInfo; - std::unique_ptr onSuccess( - chip::Platform::New(callback, false), chip::Platform::Delete); + std::unique_ptr + onSuccess(chip::Platform::New(callback, false), + chip::Platform::Delete); VerifyOrReturn(onSuccess.get() != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); @@ -20895,8 +20901,10 @@ JNI_METHOD(void, WindowCoveringCluster, readCurrentPositionTiltPercentageAttribu { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::WindowCovering::Attributes::CurrentPositionTiltPercentage::TypeInfo; - std::unique_ptr onSuccess( - chip::Platform::New(callback, false), chip::Platform::Delete); + std::unique_ptr + onSuccess(chip::Platform::New(callback, false), + chip::Platform::Delete); VerifyOrReturn(onSuccess.get() != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); @@ -20966,8 +20974,10 @@ JNI_METHOD(void, WindowCoveringCluster, readTargetPositionLiftPercent100thsAttri { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::WindowCovering::Attributes::TargetPositionLiftPercent100ths::TypeInfo; - std::unique_ptr onSuccess( - chip::Platform::New(callback, false), chip::Platform::Delete); + std::unique_ptr + onSuccess(chip::Platform::New(callback, false), + chip::Platform::Delete); VerifyOrReturn(onSuccess.get() != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); @@ -21002,8 +21012,10 @@ JNI_METHOD(void, WindowCoveringCluster, readTargetPositionTiltPercent100thsAttri { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::WindowCovering::Attributes::TargetPositionTiltPercent100ths::TypeInfo; - std::unique_ptr onSuccess( - chip::Platform::New(callback, false), chip::Platform::Delete); + std::unique_ptr + onSuccess(chip::Platform::New(callback, false), + chip::Platform::Delete); VerifyOrReturn(onSuccess.get() != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); @@ -21072,8 +21084,10 @@ JNI_METHOD(void, WindowCoveringCluster, readCurrentPositionLiftPercent100thsAttr { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::WindowCovering::Attributes::CurrentPositionLiftPercent100ths::TypeInfo; - std::unique_ptr onSuccess( - chip::Platform::New(callback, false), chip::Platform::Delete); + std::unique_ptr + onSuccess(chip::Platform::New(callback, false), + chip::Platform::Delete); VerifyOrReturn(onSuccess.get() != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); @@ -21108,8 +21122,10 @@ JNI_METHOD(void, WindowCoveringCluster, readCurrentPositionTiltPercent100thsAttr { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::WindowCovering::Attributes::CurrentPositionTiltPercent100ths::TypeInfo; - std::unique_ptr onSuccess( - chip::Platform::New(callback, false), chip::Platform::Delete); + std::unique_ptr + onSuccess(chip::Platform::New(callback, false), + chip::Platform::Delete); VerifyOrReturn(onSuccess.get() != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); diff --git a/src/controller/java/zap-generated/CHIPReadCallbacks.cpp b/src/controller/java/zap-generated/CHIPReadCallbacks.cpp index 828d6b8423c075..bc948f4c32434c 100644 --- a/src/controller/java/zap-generated/CHIPReadCallbacks.cpp +++ b/src/controller/java/zap-generated/CHIPReadCallbacks.cpp @@ -14107,6 +14107,500 @@ void CHIPWiFiNetworkDiagnosticsAttributeListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } +CHIPWindowCoveringCurrentPositionLiftAttributeCallback::CHIPWindowCoveringCurrentPositionLiftAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPWindowCoveringCurrentPositionLiftAttributeCallback::~CHIPWindowCoveringCurrentPositionLiftAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPWindowCoveringCurrentPositionLiftAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPWindowCoveringCurrentPositionTiltAttributeCallback::CHIPWindowCoveringCurrentPositionTiltAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPWindowCoveringCurrentPositionTiltAttributeCallback::~CHIPWindowCoveringCurrentPositionTiltAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPWindowCoveringCurrentPositionTiltAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPWindowCoveringCurrentPositionLiftPercentageAttributeCallback::CHIPWindowCoveringCurrentPositionLiftPercentageAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPWindowCoveringCurrentPositionLiftPercentageAttributeCallback:: + ~CHIPWindowCoveringCurrentPositionLiftPercentageAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPWindowCoveringCurrentPositionLiftPercentageAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPWindowCoveringCurrentPositionTiltPercentageAttributeCallback::CHIPWindowCoveringCurrentPositionTiltPercentageAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPWindowCoveringCurrentPositionTiltPercentageAttributeCallback:: + ~CHIPWindowCoveringCurrentPositionTiltPercentageAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPWindowCoveringCurrentPositionTiltPercentageAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPWindowCoveringTargetPositionLiftPercent100thsAttributeCallback:: + CHIPWindowCoveringTargetPositionLiftPercent100thsAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPWindowCoveringTargetPositionLiftPercent100thsAttributeCallback:: + ~CHIPWindowCoveringTargetPositionLiftPercent100thsAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPWindowCoveringTargetPositionLiftPercent100thsAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + javaValueClassName.c_str(), javaValueCtorSignature.c_str(), value.Value(), javaValue); + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPWindowCoveringTargetPositionTiltPercent100thsAttributeCallback:: + CHIPWindowCoveringTargetPositionTiltPercent100thsAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPWindowCoveringTargetPositionTiltPercent100thsAttributeCallback:: + ~CHIPWindowCoveringTargetPositionTiltPercent100thsAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPWindowCoveringTargetPositionTiltPercent100thsAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + javaValueClassName.c_str(), javaValueCtorSignature.c_str(), value.Value(), javaValue); + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPWindowCoveringCurrentPositionLiftPercent100thsAttributeCallback:: + CHIPWindowCoveringCurrentPositionLiftPercent100thsAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPWindowCoveringCurrentPositionLiftPercent100thsAttributeCallback:: + ~CHIPWindowCoveringCurrentPositionLiftPercent100thsAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPWindowCoveringCurrentPositionLiftPercent100thsAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + javaValueClassName.c_str(), javaValueCtorSignature.c_str(), value.Value(), javaValue); + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPWindowCoveringCurrentPositionTiltPercent100thsAttributeCallback:: + CHIPWindowCoveringCurrentPositionTiltPercent100thsAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPWindowCoveringCurrentPositionTiltPercent100thsAttributeCallback:: + ~CHIPWindowCoveringCurrentPositionTiltPercent100thsAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPWindowCoveringCurrentPositionTiltPercent100thsAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + javaValueClassName.c_str(), javaValueCtorSignature.c_str(), value.Value(), javaValue); + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + CHIPWindowCoveringAttributeListAttributeCallback::CHIPWindowCoveringAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : chip::Callback::Callback(CallbackFn, this), diff --git a/src/controller/java/zap-generated/CHIPReadCallbacks.h b/src/controller/java/zap-generated/CHIPReadCallbacks.h index 94c461472370c1..2182ba5b1f617a 100644 --- a/src/controller/java/zap-generated/CHIPReadCallbacks.h +++ b/src/controller/java/zap-generated/CHIPReadCallbacks.h @@ -4833,6 +4833,246 @@ class CHIPWiFiNetworkDiagnosticsAttributeListAttributeCallback bool keepAlive; }; +class CHIPWindowCoveringCurrentPositionLiftAttributeCallback + : public chip::Callback::Callback +{ +public: + CHIPWindowCoveringCurrentPositionLiftAttributeCallback(jobject javaCallback, bool keepAlive = false); + + ~CHIPWindowCoveringCurrentPositionLiftAttributeCallback(); + + static void maybeDestroy(CHIPWindowCoveringCurrentPositionLiftAttributeCallback * callback) + { + if (!callback->keepAlive) + { + callback->Cancel(); + chip::Platform::Delete(callback); + } + } + + static void CallbackFn(void * context, const chip::app::DataModel::Nullable & value); + static void OnSubscriptionEstablished(void * context) + { + CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished( + reinterpret_cast(context)->javaCallbackRef); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); + }; + +private: + jobject javaCallbackRef; + bool keepAlive; +}; + +class CHIPWindowCoveringCurrentPositionTiltAttributeCallback + : public chip::Callback::Callback +{ +public: + CHIPWindowCoveringCurrentPositionTiltAttributeCallback(jobject javaCallback, bool keepAlive = false); + + ~CHIPWindowCoveringCurrentPositionTiltAttributeCallback(); + + static void maybeDestroy(CHIPWindowCoveringCurrentPositionTiltAttributeCallback * callback) + { + if (!callback->keepAlive) + { + callback->Cancel(); + chip::Platform::Delete(callback); + } + } + + static void CallbackFn(void * context, const chip::app::DataModel::Nullable & value); + static void OnSubscriptionEstablished(void * context) + { + CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished( + reinterpret_cast(context)->javaCallbackRef); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); + }; + +private: + jobject javaCallbackRef; + bool keepAlive; +}; + +class CHIPWindowCoveringCurrentPositionLiftPercentageAttributeCallback + : public chip::Callback::Callback +{ +public: + CHIPWindowCoveringCurrentPositionLiftPercentageAttributeCallback(jobject javaCallback, bool keepAlive = false); + + ~CHIPWindowCoveringCurrentPositionLiftPercentageAttributeCallback(); + + static void maybeDestroy(CHIPWindowCoveringCurrentPositionLiftPercentageAttributeCallback * callback) + { + if (!callback->keepAlive) + { + callback->Cancel(); + chip::Platform::Delete(callback); + } + } + + static void CallbackFn(void * context, const chip::app::DataModel::Nullable & value); + static void OnSubscriptionEstablished(void * context) + { + CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished( + reinterpret_cast(context)->javaCallbackRef); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); + }; + +private: + jobject javaCallbackRef; + bool keepAlive; +}; + +class CHIPWindowCoveringCurrentPositionTiltPercentageAttributeCallback + : public chip::Callback::Callback +{ +public: + CHIPWindowCoveringCurrentPositionTiltPercentageAttributeCallback(jobject javaCallback, bool keepAlive = false); + + ~CHIPWindowCoveringCurrentPositionTiltPercentageAttributeCallback(); + + static void maybeDestroy(CHIPWindowCoveringCurrentPositionTiltPercentageAttributeCallback * callback) + { + if (!callback->keepAlive) + { + callback->Cancel(); + chip::Platform::Delete(callback); + } + } + + static void CallbackFn(void * context, const chip::app::DataModel::Nullable & value); + static void OnSubscriptionEstablished(void * context) + { + CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished( + reinterpret_cast(context)->javaCallbackRef); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); + }; + +private: + jobject javaCallbackRef; + bool keepAlive; +}; + +class CHIPWindowCoveringTargetPositionLiftPercent100thsAttributeCallback + : public chip::Callback::Callback +{ +public: + CHIPWindowCoveringTargetPositionLiftPercent100thsAttributeCallback(jobject javaCallback, bool keepAlive = false); + + ~CHIPWindowCoveringTargetPositionLiftPercent100thsAttributeCallback(); + + static void maybeDestroy(CHIPWindowCoveringTargetPositionLiftPercent100thsAttributeCallback * callback) + { + if (!callback->keepAlive) + { + callback->Cancel(); + chip::Platform::Delete(callback); + } + } + + static void CallbackFn(void * context, const chip::app::DataModel::Nullable & value); + static void OnSubscriptionEstablished(void * context) + { + CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished( + reinterpret_cast(context)->javaCallbackRef); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); + }; + +private: + jobject javaCallbackRef; + bool keepAlive; +}; + +class CHIPWindowCoveringTargetPositionTiltPercent100thsAttributeCallback + : public chip::Callback::Callback +{ +public: + CHIPWindowCoveringTargetPositionTiltPercent100thsAttributeCallback(jobject javaCallback, bool keepAlive = false); + + ~CHIPWindowCoveringTargetPositionTiltPercent100thsAttributeCallback(); + + static void maybeDestroy(CHIPWindowCoveringTargetPositionTiltPercent100thsAttributeCallback * callback) + { + if (!callback->keepAlive) + { + callback->Cancel(); + chip::Platform::Delete(callback); + } + } + + static void CallbackFn(void * context, const chip::app::DataModel::Nullable & value); + static void OnSubscriptionEstablished(void * context) + { + CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished( + reinterpret_cast(context)->javaCallbackRef); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); + }; + +private: + jobject javaCallbackRef; + bool keepAlive; +}; + +class CHIPWindowCoveringCurrentPositionLiftPercent100thsAttributeCallback + : public chip::Callback::Callback +{ +public: + CHIPWindowCoveringCurrentPositionLiftPercent100thsAttributeCallback(jobject javaCallback, bool keepAlive = false); + + ~CHIPWindowCoveringCurrentPositionLiftPercent100thsAttributeCallback(); + + static void maybeDestroy(CHIPWindowCoveringCurrentPositionLiftPercent100thsAttributeCallback * callback) + { + if (!callback->keepAlive) + { + callback->Cancel(); + chip::Platform::Delete(callback); + } + } + + static void CallbackFn(void * context, const chip::app::DataModel::Nullable & value); + static void OnSubscriptionEstablished(void * context) + { + CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished( + reinterpret_cast(context)->javaCallbackRef); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); + }; + +private: + jobject javaCallbackRef; + bool keepAlive; +}; + +class CHIPWindowCoveringCurrentPositionTiltPercent100thsAttributeCallback + : public chip::Callback::Callback +{ +public: + CHIPWindowCoveringCurrentPositionTiltPercent100thsAttributeCallback(jobject javaCallback, bool keepAlive = false); + + ~CHIPWindowCoveringCurrentPositionTiltPercent100thsAttributeCallback(); + + static void maybeDestroy(CHIPWindowCoveringCurrentPositionTiltPercent100thsAttributeCallback * callback) + { + if (!callback->keepAlive) + { + callback->Cancel(); + chip::Platform::Delete(callback); + } + } + + static void CallbackFn(void * context, const chip::app::DataModel::Nullable & value); + static void OnSubscriptionEstablished(void * context) + { + CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished( + reinterpret_cast(context)->javaCallbackRef); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); + }; + +private: + jobject javaCallbackRef; + bool keepAlive; +}; + class CHIPWindowCoveringAttributeListAttributeCallback : public chip::Callback::Callback { diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java b/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java index e95106bdaa0383..0d702ede09e965 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java @@ -14335,6 +14335,70 @@ private native void goToTiltValue( private native void upOrOpen(long chipClusterPtr, DefaultClusterCallback Callback); + public interface CurrentPositionLiftAttributeCallback { + void onSuccess(@Nullable Integer value); + + void onError(Exception ex); + + default void onSubscriptionEstablished() {} + } + + public interface CurrentPositionTiltAttributeCallback { + void onSuccess(@Nullable Integer value); + + void onError(Exception ex); + + default void onSubscriptionEstablished() {} + } + + public interface CurrentPositionLiftPercentageAttributeCallback { + void onSuccess(@Nullable Integer value); + + void onError(Exception ex); + + default void onSubscriptionEstablished() {} + } + + public interface CurrentPositionTiltPercentageAttributeCallback { + void onSuccess(@Nullable Integer value); + + void onError(Exception ex); + + default void onSubscriptionEstablished() {} + } + + public interface TargetPositionLiftPercent100thsAttributeCallback { + void onSuccess(@Nullable Integer value); + + void onError(Exception ex); + + default void onSubscriptionEstablished() {} + } + + public interface TargetPositionTiltPercent100thsAttributeCallback { + void onSuccess(@Nullable Integer value); + + void onError(Exception ex); + + default void onSubscriptionEstablished() {} + } + + public interface CurrentPositionLiftPercent100thsAttributeCallback { + void onSuccess(@Nullable Integer value); + + void onError(Exception ex); + + default void onSubscriptionEstablished() {} + } + + public interface CurrentPositionTiltPercent100thsAttributeCallback { + void onSuccess(@Nullable Integer value); + + void onError(Exception ex); + + default void onSubscriptionEstablished() {} + } + public interface AttributeListAttributeCallback { void onSuccess(List valueList); @@ -14352,21 +14416,21 @@ public void subscribeTypeAttribute( subscribeTypeAttribute(chipClusterPtr, callback, minInterval, maxInterval); } - public void readCurrentPositionLiftAttribute(IntegerAttributeCallback callback) { + public void readCurrentPositionLiftAttribute(CurrentPositionLiftAttributeCallback callback) { readCurrentPositionLiftAttribute(chipClusterPtr, callback); } public void subscribeCurrentPositionLiftAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { + CurrentPositionLiftAttributeCallback callback, int minInterval, int maxInterval) { subscribeCurrentPositionLiftAttribute(chipClusterPtr, callback, minInterval, maxInterval); } - public void readCurrentPositionTiltAttribute(IntegerAttributeCallback callback) { + public void readCurrentPositionTiltAttribute(CurrentPositionTiltAttributeCallback callback) { readCurrentPositionTiltAttribute(chipClusterPtr, callback); } public void subscribeCurrentPositionTiltAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { + CurrentPositionTiltAttributeCallback callback, int minInterval, int maxInterval) { subscribeCurrentPositionTiltAttribute(chipClusterPtr, callback, minInterval, maxInterval); } @@ -14379,22 +14443,24 @@ public void subscribeConfigStatusAttribute( subscribeConfigStatusAttribute(chipClusterPtr, callback, minInterval, maxInterval); } - public void readCurrentPositionLiftPercentageAttribute(IntegerAttributeCallback callback) { + public void readCurrentPositionLiftPercentageAttribute( + CurrentPositionLiftPercentageAttributeCallback callback) { readCurrentPositionLiftPercentageAttribute(chipClusterPtr, callback); } public void subscribeCurrentPositionLiftPercentageAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { + CurrentPositionLiftPercentageAttributeCallback callback, int minInterval, int maxInterval) { subscribeCurrentPositionLiftPercentageAttribute( chipClusterPtr, callback, minInterval, maxInterval); } - public void readCurrentPositionTiltPercentageAttribute(IntegerAttributeCallback callback) { + public void readCurrentPositionTiltPercentageAttribute( + CurrentPositionTiltPercentageAttributeCallback callback) { readCurrentPositionTiltPercentageAttribute(chipClusterPtr, callback); } public void subscribeCurrentPositionTiltPercentageAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { + CurrentPositionTiltPercentageAttributeCallback callback, int minInterval, int maxInterval) { subscribeCurrentPositionTiltPercentageAttribute( chipClusterPtr, callback, minInterval, maxInterval); } @@ -14408,22 +14474,28 @@ public void subscribeOperationalStatusAttribute( subscribeOperationalStatusAttribute(chipClusterPtr, callback, minInterval, maxInterval); } - public void readTargetPositionLiftPercent100thsAttribute(IntegerAttributeCallback callback) { + public void readTargetPositionLiftPercent100thsAttribute( + TargetPositionLiftPercent100thsAttributeCallback callback) { readTargetPositionLiftPercent100thsAttribute(chipClusterPtr, callback); } public void subscribeTargetPositionLiftPercent100thsAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { + TargetPositionLiftPercent100thsAttributeCallback callback, + int minInterval, + int maxInterval) { subscribeTargetPositionLiftPercent100thsAttribute( chipClusterPtr, callback, minInterval, maxInterval); } - public void readTargetPositionTiltPercent100thsAttribute(IntegerAttributeCallback callback) { + public void readTargetPositionTiltPercent100thsAttribute( + TargetPositionTiltPercent100thsAttributeCallback callback) { readTargetPositionTiltPercent100thsAttribute(chipClusterPtr, callback); } public void subscribeTargetPositionTiltPercent100thsAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { + TargetPositionTiltPercent100thsAttributeCallback callback, + int minInterval, + int maxInterval) { subscribeTargetPositionTiltPercent100thsAttribute( chipClusterPtr, callback, minInterval, maxInterval); } @@ -14437,22 +14509,28 @@ public void subscribeEndProductTypeAttribute( subscribeEndProductTypeAttribute(chipClusterPtr, callback, minInterval, maxInterval); } - public void readCurrentPositionLiftPercent100thsAttribute(IntegerAttributeCallback callback) { + public void readCurrentPositionLiftPercent100thsAttribute( + CurrentPositionLiftPercent100thsAttributeCallback callback) { readCurrentPositionLiftPercent100thsAttribute(chipClusterPtr, callback); } public void subscribeCurrentPositionLiftPercent100thsAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { + CurrentPositionLiftPercent100thsAttributeCallback callback, + int minInterval, + int maxInterval) { subscribeCurrentPositionLiftPercent100thsAttribute( chipClusterPtr, callback, minInterval, maxInterval); } - public void readCurrentPositionTiltPercent100thsAttribute(IntegerAttributeCallback callback) { + public void readCurrentPositionTiltPercent100thsAttribute( + CurrentPositionTiltPercent100thsAttributeCallback callback) { readCurrentPositionTiltPercent100thsAttribute(chipClusterPtr, callback); } public void subscribeCurrentPositionTiltPercent100thsAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { + CurrentPositionTiltPercent100thsAttributeCallback callback, + int minInterval, + int maxInterval) { subscribeCurrentPositionTiltPercent100thsAttribute( chipClusterPtr, callback, minInterval, maxInterval); } @@ -14545,16 +14623,22 @@ private native void subscribeTypeAttribute( long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); private native void readCurrentPositionLiftAttribute( - long chipClusterPtr, IntegerAttributeCallback callback); + long chipClusterPtr, CurrentPositionLiftAttributeCallback callback); private native void subscribeCurrentPositionLiftAttribute( - long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); + long chipClusterPtr, + CurrentPositionLiftAttributeCallback callback, + int minInterval, + int maxInterval); private native void readCurrentPositionTiltAttribute( - long chipClusterPtr, IntegerAttributeCallback callback); + long chipClusterPtr, CurrentPositionTiltAttributeCallback callback); private native void subscribeCurrentPositionTiltAttribute( - long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); + long chipClusterPtr, + CurrentPositionTiltAttributeCallback callback, + int minInterval, + int maxInterval); private native void readConfigStatusAttribute( long chipClusterPtr, IntegerAttributeCallback callback); @@ -14563,16 +14647,22 @@ private native void subscribeConfigStatusAttribute( long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); private native void readCurrentPositionLiftPercentageAttribute( - long chipClusterPtr, IntegerAttributeCallback callback); + long chipClusterPtr, CurrentPositionLiftPercentageAttributeCallback callback); private native void subscribeCurrentPositionLiftPercentageAttribute( - long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); + long chipClusterPtr, + CurrentPositionLiftPercentageAttributeCallback callback, + int minInterval, + int maxInterval); private native void readCurrentPositionTiltPercentageAttribute( - long chipClusterPtr, IntegerAttributeCallback callback); + long chipClusterPtr, CurrentPositionTiltPercentageAttributeCallback callback); private native void subscribeCurrentPositionTiltPercentageAttribute( - long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); + long chipClusterPtr, + CurrentPositionTiltPercentageAttributeCallback callback, + int minInterval, + int maxInterval); private native void readOperationalStatusAttribute( long chipClusterPtr, IntegerAttributeCallback callback); @@ -14581,16 +14671,22 @@ private native void subscribeOperationalStatusAttribute( long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); private native void readTargetPositionLiftPercent100thsAttribute( - long chipClusterPtr, IntegerAttributeCallback callback); + long chipClusterPtr, TargetPositionLiftPercent100thsAttributeCallback callback); private native void subscribeTargetPositionLiftPercent100thsAttribute( - long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); + long chipClusterPtr, + TargetPositionLiftPercent100thsAttributeCallback callback, + int minInterval, + int maxInterval); private native void readTargetPositionTiltPercent100thsAttribute( - long chipClusterPtr, IntegerAttributeCallback callback); + long chipClusterPtr, TargetPositionTiltPercent100thsAttributeCallback callback); private native void subscribeTargetPositionTiltPercent100thsAttribute( - long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); + long chipClusterPtr, + TargetPositionTiltPercent100thsAttributeCallback callback, + int minInterval, + int maxInterval); private native void readEndProductTypeAttribute( long chipClusterPtr, IntegerAttributeCallback callback); @@ -14599,16 +14695,22 @@ private native void subscribeEndProductTypeAttribute( long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); private native void readCurrentPositionLiftPercent100thsAttribute( - long chipClusterPtr, IntegerAttributeCallback callback); + long chipClusterPtr, CurrentPositionLiftPercent100thsAttributeCallback callback); private native void subscribeCurrentPositionLiftPercent100thsAttribute( - long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); + long chipClusterPtr, + CurrentPositionLiftPercent100thsAttributeCallback callback, + int minInterval, + int maxInterval); private native void readCurrentPositionTiltPercent100thsAttribute( - long chipClusterPtr, IntegerAttributeCallback callback); + long chipClusterPtr, CurrentPositionTiltPercent100thsAttributeCallback callback); private native void subscribeCurrentPositionTiltPercent100thsAttribute( - long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); + long chipClusterPtr, + CurrentPositionTiltPercent100thsAttributeCallback callback, + int minInterval, + int maxInterval); private native void readInstalledOpenLimitLiftAttribute( long chipClusterPtr, IntegerAttributeCallback callback); diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ClusterReadMapping.java b/src/controller/java/zap-generated/chip/devicecontroller/ClusterReadMapping.java index e6cbbc74243475..86688c921b7f33 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ClusterReadMapping.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ClusterReadMapping.java @@ -7920,7 +7920,8 @@ public Map> getReadAttributeMap() { (cluster, callback, commandArguments) -> { ((ChipClusters.WindowCoveringCluster) cluster) .readCurrentPositionLiftAttribute( - (ChipClusters.IntegerAttributeCallback) callback); + (ChipClusters.WindowCoveringCluster.CurrentPositionLiftAttributeCallback) + callback); }, () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), readWindowCoveringCurrentPositionLiftCommandParams); @@ -7934,7 +7935,8 @@ public Map> getReadAttributeMap() { (cluster, callback, commandArguments) -> { ((ChipClusters.WindowCoveringCluster) cluster) .readCurrentPositionTiltAttribute( - (ChipClusters.IntegerAttributeCallback) callback); + (ChipClusters.WindowCoveringCluster.CurrentPositionTiltAttributeCallback) + callback); }, () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), readWindowCoveringCurrentPositionTiltCommandParams); @@ -7960,7 +7962,9 @@ public Map> getReadAttributeMap() { (cluster, callback, commandArguments) -> { ((ChipClusters.WindowCoveringCluster) cluster) .readCurrentPositionLiftPercentageAttribute( - (ChipClusters.IntegerAttributeCallback) callback); + (ChipClusters.WindowCoveringCluster + .CurrentPositionLiftPercentageAttributeCallback) + callback); }, () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), readWindowCoveringCurrentPositionLiftPercentageCommandParams); @@ -7974,7 +7978,9 @@ public Map> getReadAttributeMap() { (cluster, callback, commandArguments) -> { ((ChipClusters.WindowCoveringCluster) cluster) .readCurrentPositionTiltPercentageAttribute( - (ChipClusters.IntegerAttributeCallback) callback); + (ChipClusters.WindowCoveringCluster + .CurrentPositionTiltPercentageAttributeCallback) + callback); }, () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), readWindowCoveringCurrentPositionTiltPercentageCommandParams); @@ -8002,7 +8008,9 @@ public Map> getReadAttributeMap() { (cluster, callback, commandArguments) -> { ((ChipClusters.WindowCoveringCluster) cluster) .readTargetPositionLiftPercent100thsAttribute( - (ChipClusters.IntegerAttributeCallback) callback); + (ChipClusters.WindowCoveringCluster + .TargetPositionLiftPercent100thsAttributeCallback) + callback); }, () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), readWindowCoveringTargetPositionLiftPercent100thsCommandParams); @@ -8017,7 +8025,9 @@ public Map> getReadAttributeMap() { (cluster, callback, commandArguments) -> { ((ChipClusters.WindowCoveringCluster) cluster) .readTargetPositionTiltPercent100thsAttribute( - (ChipClusters.IntegerAttributeCallback) callback); + (ChipClusters.WindowCoveringCluster + .TargetPositionTiltPercent100thsAttributeCallback) + callback); }, () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), readWindowCoveringTargetPositionTiltPercent100thsCommandParams); @@ -8044,7 +8054,9 @@ public Map> getReadAttributeMap() { (cluster, callback, commandArguments) -> { ((ChipClusters.WindowCoveringCluster) cluster) .readCurrentPositionLiftPercent100thsAttribute( - (ChipClusters.IntegerAttributeCallback) callback); + (ChipClusters.WindowCoveringCluster + .CurrentPositionLiftPercent100thsAttributeCallback) + callback); }, () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), readWindowCoveringCurrentPositionLiftPercent100thsCommandParams); @@ -8059,7 +8071,9 @@ public Map> getReadAttributeMap() { (cluster, callback, commandArguments) -> { ((ChipClusters.WindowCoveringCluster) cluster) .readCurrentPositionTiltPercent100thsAttribute( - (ChipClusters.IntegerAttributeCallback) callback); + (ChipClusters.WindowCoveringCluster + .CurrentPositionTiltPercent100thsAttributeCallback) + callback); }, () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), readWindowCoveringCurrentPositionTiltPercent100thsCommandParams); diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py index 4ecc61568a0c0b..3cd20fe81cb7af 100644 --- a/src/controller/python/chip/clusters/Objects.py +++ b/src/controller/python/chip/clusters/Objects.py @@ -15978,29 +15978,24 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="type", Tag=0x00000000, Type=uint), ClusterObjectFieldDescriptor(Label="physicalClosedLimitLift", Tag=0x00000001, Type=typing.Optional[uint]), ClusterObjectFieldDescriptor(Label="physicalClosedLimitTilt", Tag=0x00000002, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="currentPositionLift", Tag=0x00000003, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="currentPositionTilt", Tag=0x00000004, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="currentPositionLift", Tag=0x00000003, Type=typing.Union[None, Nullable, uint]), + ClusterObjectFieldDescriptor(Label="currentPositionTilt", Tag=0x00000004, Type=typing.Union[None, Nullable, uint]), ClusterObjectFieldDescriptor(Label="numberOfActuationsLift", Tag=0x00000005, Type=typing.Optional[uint]), ClusterObjectFieldDescriptor(Label="numberOfActuationsTilt", Tag=0x00000006, Type=typing.Optional[uint]), ClusterObjectFieldDescriptor(Label="configStatus", Tag=0x00000007, Type=uint), - ClusterObjectFieldDescriptor(Label="currentPositionLiftPercentage", Tag=0x00000008, Type=uint), - ClusterObjectFieldDescriptor(Label="currentPositionTiltPercentage", Tag=0x00000009, Type=uint), + ClusterObjectFieldDescriptor(Label="currentPositionLiftPercentage", Tag=0x00000008, Type=typing.Union[None, Nullable, uint]), + ClusterObjectFieldDescriptor(Label="currentPositionTiltPercentage", Tag=0x00000009, Type=typing.Union[None, Nullable, uint]), ClusterObjectFieldDescriptor(Label="operationalStatus", Tag=0x0000000A, Type=uint), - ClusterObjectFieldDescriptor(Label="targetPositionLiftPercent100ths", Tag=0x0000000B, Type=uint), - ClusterObjectFieldDescriptor(Label="targetPositionTiltPercent100ths", Tag=0x0000000C, Type=uint), + ClusterObjectFieldDescriptor(Label="targetPositionLiftPercent100ths", Tag=0x0000000B, Type=typing.Union[None, Nullable, uint]), + ClusterObjectFieldDescriptor(Label="targetPositionTiltPercent100ths", Tag=0x0000000C, Type=typing.Union[None, Nullable, uint]), ClusterObjectFieldDescriptor(Label="endProductType", Tag=0x0000000D, Type=uint), - ClusterObjectFieldDescriptor(Label="currentPositionLiftPercent100ths", Tag=0x0000000E, Type=uint), - ClusterObjectFieldDescriptor(Label="currentPositionTiltPercent100ths", Tag=0x0000000F, Type=uint), - ClusterObjectFieldDescriptor(Label="installedOpenLimitLift", Tag=0x00000010, Type=uint), - ClusterObjectFieldDescriptor(Label="installedClosedLimitLift", Tag=0x00000011, Type=uint), - ClusterObjectFieldDescriptor(Label="installedOpenLimitTilt", Tag=0x00000012, Type=uint), - ClusterObjectFieldDescriptor(Label="installedClosedLimitTilt", Tag=0x00000013, Type=uint), - ClusterObjectFieldDescriptor(Label="velocityLift", Tag=0x00000014, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="accelerationTimeLift", Tag=0x00000015, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="decelerationTimeLift", Tag=0x00000016, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="currentPositionLiftPercent100ths", Tag=0x0000000E, Type=typing.Union[None, Nullable, uint]), + ClusterObjectFieldDescriptor(Label="currentPositionTiltPercent100ths", Tag=0x0000000F, Type=typing.Union[None, Nullable, uint]), + ClusterObjectFieldDescriptor(Label="installedOpenLimitLift", Tag=0x00000010, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="installedClosedLimitLift", Tag=0x00000011, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="installedOpenLimitTilt", Tag=0x00000012, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="installedClosedLimitTilt", Tag=0x00000013, Type=typing.Optional[uint]), ClusterObjectFieldDescriptor(Label="mode", Tag=0x00000017, Type=uint), - ClusterObjectFieldDescriptor(Label="intermediateSetpointsLift", Tag=0x00000018, Type=typing.Optional[bytes]), - ClusterObjectFieldDescriptor(Label="intermediateSetpointsTilt", Tag=0x00000019, Type=typing.Optional[bytes]), ClusterObjectFieldDescriptor(Label="safetyStatus", Tag=0x0000001A, Type=typing.Optional[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=typing.Optional[uint]), @@ -16010,29 +16005,24 @@ def descriptor(cls) -> ClusterObjectDescriptor: type: 'uint' = None physicalClosedLimitLift: 'typing.Optional[uint]' = None physicalClosedLimitTilt: 'typing.Optional[uint]' = None - currentPositionLift: 'typing.Optional[uint]' = None - currentPositionTilt: 'typing.Optional[uint]' = None + currentPositionLift: 'typing.Union[None, Nullable, uint]' = None + currentPositionTilt: 'typing.Union[None, Nullable, uint]' = None numberOfActuationsLift: 'typing.Optional[uint]' = None numberOfActuationsTilt: 'typing.Optional[uint]' = None configStatus: 'uint' = None - currentPositionLiftPercentage: 'uint' = None - currentPositionTiltPercentage: 'uint' = None + currentPositionLiftPercentage: 'typing.Union[None, Nullable, uint]' = None + currentPositionTiltPercentage: 'typing.Union[None, Nullable, uint]' = None operationalStatus: 'uint' = None - targetPositionLiftPercent100ths: 'uint' = None - targetPositionTiltPercent100ths: 'uint' = None + targetPositionLiftPercent100ths: 'typing.Union[None, Nullable, uint]' = None + targetPositionTiltPercent100ths: 'typing.Union[None, Nullable, uint]' = None endProductType: 'uint' = None - currentPositionLiftPercent100ths: 'uint' = None - currentPositionTiltPercent100ths: 'uint' = None - installedOpenLimitLift: 'uint' = None - installedClosedLimitLift: 'uint' = None - installedOpenLimitTilt: 'uint' = None - installedClosedLimitTilt: 'uint' = None - velocityLift: 'typing.Optional[uint]' = None - accelerationTimeLift: 'typing.Optional[uint]' = None - decelerationTimeLift: 'typing.Optional[uint]' = None + currentPositionLiftPercent100ths: 'typing.Union[None, Nullable, uint]' = None + currentPositionTiltPercent100ths: 'typing.Union[None, Nullable, uint]' = None + installedOpenLimitLift: 'typing.Optional[uint]' = None + installedClosedLimitLift: 'typing.Optional[uint]' = None + installedOpenLimitTilt: 'typing.Optional[uint]' = None + installedClosedLimitTilt: 'typing.Optional[uint]' = None mode: 'uint' = None - intermediateSetpointsLift: 'typing.Optional[bytes]' = None - intermediateSetpointsTilt: 'typing.Optional[bytes]' = None safetyStatus: 'typing.Optional[uint]' = None attributeList: 'typing.List[uint]' = None featureMap: 'typing.Optional[uint]' = None @@ -16206,9 +16196,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Optional[uint]' = None + value: 'typing.Union[None, Nullable, uint]' = None @dataclass class CurrentPositionTilt(ClusterAttributeDescriptor): @@ -16222,9 +16212,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Optional[uint]' = None + value: 'typing.Union[None, Nullable, uint]' = None @dataclass class NumberOfActuationsLift(ClusterAttributeDescriptor): @@ -16286,9 +16276,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=uint) + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'uint' = 0 + value: 'typing.Union[None, Nullable, uint]' = None @dataclass class CurrentPositionTiltPercentage(ClusterAttributeDescriptor): @@ -16302,9 +16292,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=uint) + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'uint' = 0 + value: 'typing.Union[None, Nullable, uint]' = None @dataclass class OperationalStatus(ClusterAttributeDescriptor): @@ -16334,9 +16324,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=uint) + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'uint' = 0 + value: 'typing.Union[None, Nullable, uint]' = None @dataclass class TargetPositionTiltPercent100ths(ClusterAttributeDescriptor): @@ -16350,9 +16340,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=uint) + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'uint' = 0 + value: 'typing.Union[None, Nullable, uint]' = None @dataclass class EndProductType(ClusterAttributeDescriptor): @@ -16382,9 +16372,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=uint) + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'uint' = 0 + value: 'typing.Union[None, Nullable, uint]' = None @dataclass class CurrentPositionTiltPercent100ths(ClusterAttributeDescriptor): @@ -16398,9 +16388,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=uint) + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'uint' = 0 + value: 'typing.Union[None, Nullable, uint]' = None @dataclass class InstalledOpenLimitLift(ClusterAttributeDescriptor): @@ -16414,9 +16404,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=uint) + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'uint' = 0 + value: 'typing.Optional[uint]' = None @dataclass class InstalledClosedLimitLift(ClusterAttributeDescriptor): @@ -16428,54 +16418,6 @@ def cluster_id(cls) -> int: def attribute_id(cls) -> int: return 0x00000011 - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=uint) - - value: 'uint' = 0 - - @dataclass - class InstalledOpenLimitTilt(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0102 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000012 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=uint) - - value: 'uint' = 0 - - @dataclass - class InstalledClosedLimitTilt(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0102 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000013 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=uint) - - value: 'uint' = 0 - - @dataclass - class VelocityLift(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0102 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000014 - @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) @@ -16483,14 +16425,14 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Optional[uint]' = None @dataclass - class AccelerationTimeLift(ClusterAttributeDescriptor): + class InstalledOpenLimitTilt(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: return 0x0102 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000015 + return 0x00000012 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: @@ -16499,14 +16441,14 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Optional[uint]' = None @dataclass - class DecelerationTimeLift(ClusterAttributeDescriptor): + class InstalledClosedLimitTilt(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: return 0x0102 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000016 + return 0x00000013 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: @@ -16530,38 +16472,6 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'uint' = 0 - @dataclass - class IntermediateSetpointsLift(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0102 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000018 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[bytes]) - - value: 'typing.Optional[bytes]' = None - - @dataclass - class IntermediateSetpointsTilt(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0102 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000019 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[bytes]) - - value: 'typing.Optional[bytes]' = None - @dataclass class SafetyStatus(ClusterAttributeDescriptor): @ChipUtility.classproperty diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPAttributeTLVValueDecoder.mm b/src/darwin/Framework/CHIP/zap-generated/CHIPAttributeTLVValueDecoder.mm index 25f0df61b9060d..58a8993c30d40c 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPAttributeTLVValueDecoder.mm +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPAttributeTLVValueDecoder.mm @@ -9093,8 +9093,12 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; + } return value; } case Attributes::CurrentPositionTilt::Id: { @@ -9104,8 +9108,12 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; + } return value; } case Attributes::ConfigStatus::Id: { @@ -9126,8 +9134,12 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; + } return value; } case Attributes::CurrentPositionTiltPercentage::Id: { @@ -9137,8 +9149,12 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; + } return value; } case Attributes::OperationalStatus::Id: { @@ -9159,8 +9175,12 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; + } return value; } case Attributes::TargetPositionTiltPercent100ths::Id: { @@ -9170,8 +9190,12 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; + } return value; } case Attributes::EndProductType::Id: { @@ -9192,8 +9216,12 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; + } return value; } case Attributes::CurrentPositionTiltPercent100ths::Id: { @@ -9203,8 +9231,12 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; + } return value; } case Attributes::InstalledOpenLimitLift::Id: { diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm index 73516d9029ccba..5fc509541bccb3 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm @@ -22519,12 +22519,13 @@ new CHIPInt8uAttributeCallbackSubscriptionBridge( - (void)readAttributeCurrentPositionLiftWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = WindowCovering::Attributes::CurrentPositionLift::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPNullableInt16uAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = WindowCovering::Attributes::CurrentPositionLift::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeCurrentPositionLiftWithMinInterval:(uint16_t)minInterval @@ -22534,14 +22535,14 @@ - (void)subscribeAttributeCurrentPositionLiftWithMinInterval:(uint16_t)minInterv reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt16uAttributeCallbackSubscriptionBridge( + new CHIPNullableInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = WindowCovering::Attributes::CurrentPositionLift::TypeInfo; - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - minInterval, maxInterval, CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); + minInterval, maxInterval, CHIPNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); }, subscriptionEstablishedHandler); } @@ -22549,12 +22550,13 @@ new CHIPInt16uAttributeCallbackSubscriptionBridge( - (void)readAttributeCurrentPositionTiltWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = WindowCovering::Attributes::CurrentPositionTilt::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPNullableInt16uAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = WindowCovering::Attributes::CurrentPositionTilt::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeCurrentPositionTiltWithMinInterval:(uint16_t)minInterval @@ -22564,14 +22566,14 @@ - (void)subscribeAttributeCurrentPositionTiltWithMinInterval:(uint16_t)minInterv reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt16uAttributeCallbackSubscriptionBridge( + new CHIPNullableInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = WindowCovering::Attributes::CurrentPositionTilt::TypeInfo; - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - minInterval, maxInterval, CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); + minInterval, maxInterval, CHIPNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); }, subscriptionEstablishedHandler); } @@ -22607,12 +22609,13 @@ new CHIPInt8uAttributeCallbackSubscriptionBridge( - (void)readAttributeCurrentPositionLiftPercentageWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = WindowCovering::Attributes::CurrentPositionLiftPercentage::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPNullableInt8uAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = WindowCovering::Attributes::CurrentPositionLiftPercentage::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeCurrentPositionLiftPercentageWithMinInterval:(uint16_t)minInterval @@ -22622,14 +22625,14 @@ - (void)subscribeAttributeCurrentPositionLiftPercentageWithMinInterval:(uint16_t reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt8uAttributeCallbackSubscriptionBridge( + new CHIPNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = WindowCovering::Attributes::CurrentPositionLiftPercentage::TypeInfo; - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - minInterval, maxInterval, CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); + minInterval, maxInterval, CHIPNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); }, subscriptionEstablishedHandler); } @@ -22637,12 +22640,13 @@ new CHIPInt8uAttributeCallbackSubscriptionBridge( - (void)readAttributeCurrentPositionTiltPercentageWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = WindowCovering::Attributes::CurrentPositionTiltPercentage::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPNullableInt8uAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = WindowCovering::Attributes::CurrentPositionTiltPercentage::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeCurrentPositionTiltPercentageWithMinInterval:(uint16_t)minInterval @@ -22652,14 +22656,14 @@ - (void)subscribeAttributeCurrentPositionTiltPercentageWithMinInterval:(uint16_t reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt8uAttributeCallbackSubscriptionBridge( + new CHIPNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = WindowCovering::Attributes::CurrentPositionTiltPercentage::TypeInfo; - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - minInterval, maxInterval, CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); + minInterval, maxInterval, CHIPNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); }, subscriptionEstablishedHandler); } @@ -22696,12 +22700,13 @@ new CHIPInt8uAttributeCallbackSubscriptionBridge( - (void)readAttributeTargetPositionLiftPercent100thsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = WindowCovering::Attributes::TargetPositionLiftPercent100ths::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPNullableInt16uAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = WindowCovering::Attributes::TargetPositionLiftPercent100ths::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeTargetPositionLiftPercent100thsWithMinInterval:(uint16_t)minInterval @@ -22711,14 +22716,14 @@ - (void)subscribeAttributeTargetPositionLiftPercent100thsWithMinInterval:(uint16 reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt16uAttributeCallbackSubscriptionBridge( + new CHIPNullableInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = WindowCovering::Attributes::TargetPositionLiftPercent100ths::TypeInfo; - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - minInterval, maxInterval, CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); + minInterval, maxInterval, CHIPNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); }, subscriptionEstablishedHandler); } @@ -22726,12 +22731,13 @@ new CHIPInt16uAttributeCallbackSubscriptionBridge( - (void)readAttributeTargetPositionTiltPercent100thsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = WindowCovering::Attributes::TargetPositionTiltPercent100ths::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPNullableInt16uAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = WindowCovering::Attributes::TargetPositionTiltPercent100ths::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeTargetPositionTiltPercent100thsWithMinInterval:(uint16_t)minInterval @@ -22741,14 +22747,14 @@ - (void)subscribeAttributeTargetPositionTiltPercent100thsWithMinInterval:(uint16 reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt16uAttributeCallbackSubscriptionBridge( + new CHIPNullableInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = WindowCovering::Attributes::TargetPositionTiltPercent100ths::TypeInfo; - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - minInterval, maxInterval, CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); + minInterval, maxInterval, CHIPNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); }, subscriptionEstablishedHandler); } @@ -22785,12 +22791,13 @@ new CHIPInt8uAttributeCallbackSubscriptionBridge( - (void)readAttributeCurrentPositionLiftPercent100thsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = WindowCovering::Attributes::CurrentPositionLiftPercent100ths::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPNullableInt16uAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = WindowCovering::Attributes::CurrentPositionLiftPercent100ths::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeCurrentPositionLiftPercent100thsWithMinInterval:(uint16_t)minInterval @@ -22800,14 +22807,14 @@ - (void)subscribeAttributeCurrentPositionLiftPercent100thsWithMinInterval:(uint1 reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt16uAttributeCallbackSubscriptionBridge( + new CHIPNullableInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = WindowCovering::Attributes::CurrentPositionLiftPercent100ths::TypeInfo; - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - minInterval, maxInterval, CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); + minInterval, maxInterval, CHIPNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); }, subscriptionEstablishedHandler); } @@ -22815,12 +22822,13 @@ new CHIPInt16uAttributeCallbackSubscriptionBridge( - (void)readAttributeCurrentPositionTiltPercent100thsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = WindowCovering::Attributes::CurrentPositionTiltPercent100ths::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPNullableInt16uAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = WindowCovering::Attributes::CurrentPositionTiltPercent100ths::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeCurrentPositionTiltPercent100thsWithMinInterval:(uint16_t)minInterval @@ -22830,14 +22838,14 @@ - (void)subscribeAttributeCurrentPositionTiltPercent100thsWithMinInterval:(uint1 reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt16uAttributeCallbackSubscriptionBridge( + new CHIPNullableInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = WindowCovering::Attributes::CurrentPositionTiltPercent100ths::TypeInfo; - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - minInterval, maxInterval, CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); + minInterval, maxInterval, CHIPNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); }, subscriptionEstablishedHandler); } diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.h b/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.h index 5f0e5bf6415fb1..2a0013a804303d 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.h @@ -1058,22 +1058,24 @@ NS_ASSUME_NONNULL_BEGIN @interface CHIPTestWindowCovering : CHIPWindowCovering - (void)writeAttributeTypeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeCurrentPositionLiftWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeCurrentPositionTiltWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeCurrentPositionLiftWithValue:(NSNumber * _Nullable)value + completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeCurrentPositionTiltWithValue:(NSNumber * _Nullable)value + completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeConfigStatusWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeCurrentPositionLiftPercentageWithValue:(NSNumber * _Nonnull)value +- (void)writeAttributeCurrentPositionLiftPercentageWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeCurrentPositionTiltPercentageWithValue:(NSNumber * _Nonnull)value +- (void)writeAttributeCurrentPositionTiltPercentageWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeOperationalStatusWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeTargetPositionLiftPercent100thsWithValue:(NSNumber * _Nonnull)value +- (void)writeAttributeTargetPositionLiftPercent100thsWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeTargetPositionTiltPercent100thsWithValue:(NSNumber * _Nonnull)value +- (void)writeAttributeTargetPositionTiltPercent100thsWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeEndProductTypeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeCurrentPositionLiftPercent100thsWithValue:(NSNumber * _Nonnull)value +- (void)writeAttributeCurrentPositionLiftPercent100thsWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeCurrentPositionTiltPercent100thsWithValue:(NSNumber * _Nonnull)value +- (void)writeAttributeCurrentPositionTiltPercent100thsWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeInstalledOpenLimitLiftWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.mm b/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.mm index d018a05f5bdace..27e60116c1a84b 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.mm @@ -11134,7 +11134,7 @@ new CHIPDefaultSuccessCallbackBridge( }); } -- (void)writeAttributeCurrentPositionLiftWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeCurrentPositionLiftWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( self.callbackQueue, @@ -11145,14 +11145,19 @@ new CHIPDefaultSuccessCallbackBridge( ListFreer listFreer; using TypeInfo = WindowCovering::Attributes::CurrentPositionLift::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedShortValue; + } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeCurrentPositionTiltWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeCurrentPositionTiltWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( self.callbackQueue, @@ -11163,7 +11168,12 @@ new CHIPDefaultSuccessCallbackBridge( ListFreer listFreer; using TypeInfo = WindowCovering::Attributes::CurrentPositionTilt::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedShortValue; + } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); @@ -11188,7 +11198,7 @@ new CHIPDefaultSuccessCallbackBridge( }); } -- (void)writeAttributeCurrentPositionLiftPercentageWithValue:(NSNumber * _Nonnull)value +- (void)writeAttributeCurrentPositionLiftPercentageWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( @@ -11200,14 +11210,19 @@ new CHIPDefaultSuccessCallbackBridge( ListFreer listFreer; using TypeInfo = WindowCovering::Attributes::CurrentPositionLiftPercentage::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedCharValue; + } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeCurrentPositionTiltPercentageWithValue:(NSNumber * _Nonnull)value +- (void)writeAttributeCurrentPositionTiltPercentageWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( @@ -11219,7 +11234,12 @@ new CHIPDefaultSuccessCallbackBridge( ListFreer listFreer; using TypeInfo = WindowCovering::Attributes::CurrentPositionTiltPercentage::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedCharValue; + } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); @@ -11244,7 +11264,7 @@ new CHIPDefaultSuccessCallbackBridge( }); } -- (void)writeAttributeTargetPositionLiftPercent100thsWithValue:(NSNumber * _Nonnull)value +- (void)writeAttributeTargetPositionLiftPercent100thsWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( @@ -11256,14 +11276,19 @@ new CHIPDefaultSuccessCallbackBridge( ListFreer listFreer; using TypeInfo = WindowCovering::Attributes::TargetPositionLiftPercent100ths::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedShortValue; + } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeTargetPositionTiltPercent100thsWithValue:(NSNumber * _Nonnull)value +- (void)writeAttributeTargetPositionTiltPercent100thsWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( @@ -11275,7 +11300,12 @@ new CHIPDefaultSuccessCallbackBridge( ListFreer listFreer; using TypeInfo = WindowCovering::Attributes::TargetPositionTiltPercent100ths::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedShortValue; + } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); @@ -11300,7 +11330,7 @@ new CHIPDefaultSuccessCallbackBridge( }); } -- (void)writeAttributeCurrentPositionLiftPercent100thsWithValue:(NSNumber * _Nonnull)value +- (void)writeAttributeCurrentPositionLiftPercent100thsWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( @@ -11312,14 +11342,19 @@ new CHIPDefaultSuccessCallbackBridge( ListFreer listFreer; using TypeInfo = WindowCovering::Attributes::CurrentPositionLiftPercent100ths::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedShortValue; + } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeCurrentPositionTiltPercent100thsWithValue:(NSNumber * _Nonnull)value +- (void)writeAttributeCurrentPositionTiltPercent100thsWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( @@ -11331,7 +11366,12 @@ new CHIPDefaultSuccessCallbackBridge( ListFreer listFreer; using TypeInfo = WindowCovering::Attributes::CurrentPositionTiltPercent100ths::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedShortValue; + } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); diff --git a/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h b/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h index 51722ad886d700..d849fd40d7c92c 100644 --- a/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h +++ b/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h @@ -1828,18 +1828,24 @@ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Window Covering (server) */ \ - { 0x0000, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* Type */ \ - { 0x0003, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x7FFF) }, /* CurrentPositionLift */ \ - { 0x0004, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x7FFF) }, /* CurrentPositionTilt */ \ - { 0x0007, ZAP_TYPE(BITMAP8), 1, 0, ZAP_SIMPLE_DEFAULT(0x03) }, /* ConfigStatus */ \ - { 0x0008, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(50) }, /* CurrentPositionLiftPercentage */ \ - { 0x0009, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(50) }, /* CurrentPositionTiltPercentage */ \ - { 0x000A, ZAP_TYPE(BITMAP8), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* OperationalStatus */ \ - { 0x000B, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(500) }, /* TargetPositionLiftPercent100ths */ \ - { 0x000C, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(500) }, /* TargetPositionTiltPercent100ths */ \ - { 0x000D, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* EndProductType */ \ - { 0x000E, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(500) }, /* CurrentPositionLiftPercent100ths */ \ - { 0x000F, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(500) }, /* CurrentPositionTiltPercent100ths */ \ + { 0x0000, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* Type */ \ + { 0x0003, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_SIMPLE_DEFAULT(0x7FFF) }, /* CurrentPositionLift */ \ + { 0x0004, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_SIMPLE_DEFAULT(0x7FFF) }, /* CurrentPositionTilt */ \ + { 0x0007, ZAP_TYPE(BITMAP8), 1, 0, ZAP_SIMPLE_DEFAULT(0x03) }, /* ConfigStatus */ \ + { 0x0008, ZAP_TYPE(PERCENT), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_SIMPLE_DEFAULT(50) }, /* CurrentPositionLiftPercentage */ \ + { 0x0009, ZAP_TYPE(PERCENT), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_SIMPLE_DEFAULT(50) }, /* CurrentPositionTiltPercentage */ \ + { 0x000A, ZAP_TYPE(BITMAP8), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* OperationalStatus */ \ + { 0x000B, ZAP_TYPE(PERCENT100THS), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_SIMPLE_DEFAULT(500) }, /* TargetPositionLiftPercent100ths */ \ + { 0x000C, ZAP_TYPE(PERCENT100THS), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_SIMPLE_DEFAULT(500) }, /* TargetPositionTiltPercent100ths */ \ + { 0x000D, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* EndProductType */ \ + { 0x000E, ZAP_TYPE(PERCENT100THS), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_SIMPLE_DEFAULT(500) }, /* CurrentPositionLiftPercent100ths */ \ + { 0x000F, ZAP_TYPE(PERCENT100THS), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_SIMPLE_DEFAULT(500) }, /* CurrentPositionTiltPercent100ths */ \ { 0x0010, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* InstalledOpenLimitLift */ \ { 0x0011, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0xFFFF) }, /* InstalledClosedLimitLift */ \ { 0x0012, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* InstalledOpenLimitTilt */ \ diff --git a/zzz_generated/app-common/app-common/zap-generated/attribute-id.h b/zzz_generated/app-common/app-common/zap-generated/attribute-id.h index 9e3971d9122152..dbfe2d788be81b 100644 --- a/zzz_generated/app-common/app-common/zap-generated/attribute-id.h +++ b/zzz_generated/app-common/app-common/zap-generated/attribute-id.h @@ -744,12 +744,7 @@ #define ZCL_WC_INSTALLED_CLOSED_LIMIT_LIFT_ATTRIBUTE_ID (0x0011) #define ZCL_WC_INSTALLED_OPEN_LIMIT_TILT_ATTRIBUTE_ID (0x0012) #define ZCL_WC_INSTALLED_CLOSED_LIMIT_TILT_ATTRIBUTE_ID (0x0013) -#define ZCL_WC_VELOCITY_LIFT_ATTRIBUTE_ID (0x0014) -#define ZCL_WC_ACCELERATION_TIME_LIFT_ATTRIBUTE_ID (0x0015) -#define ZCL_WC_DECELERATION_TIME_LIFT_ATTRIBUTE_ID (0x0016) #define ZCL_WC_MODE_ATTRIBUTE_ID (0x0017) -#define ZCL_WC_INTERMEDIATE_SETPOINTS_LIFT_ATTRIBUTE_ID (0x0018) -#define ZCL_WC_INTERMEDIATE_SETPOINTS_TILT_ATTRIBUTE_ID (0x0019) #define ZCL_WC_SAFETY_STATUS_ATTRIBUTE_ID (0x001A) // Attribute ids for cluster: Barrier Control diff --git a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp index 299f9b47a10ec6..f950a76e4853b5 100644 --- a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp +++ b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp @@ -14875,24 +14875,27 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) namespace CurrentPositionLift { -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + if (Traits::IsNullValue(temp)) { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + value.SetNull(); + } + else + { + value.SetNonNull() = Traits::StorageToWorking(temp); } - *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } @@ -14902,28 +14905,50 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) return emberAfWriteServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } +EmberAfStatus SetNull(chip::EndpointId endpoint) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); +} + +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +{ + if (value.IsNull()) + { + return SetNull(endpoint); + } + + return Set(endpoint, value.Value()); +} + } // namespace CurrentPositionLift namespace CurrentPositionTilt { -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + if (Traits::IsNullValue(temp)) { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + value.SetNull(); + } + else + { + value.SetNonNull() = Traits::StorageToWorking(temp); } - *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } @@ -14933,6 +14958,25 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) return emberAfWriteServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } +EmberAfStatus SetNull(chip::EndpointId endpoint) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); +} + +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +{ + if (value.IsNull()) + { + return SetNull(endpoint); + } + + return Set(endpoint, value.Value()); +} + } // namespace CurrentPositionTilt namespace NumberOfActuationsLift { @@ -15030,62 +15074,106 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) namespace CurrentPositionLiftPercentage { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + if (Traits::IsNullValue(temp)) { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + value.SetNull(); + } + else + { + value.SetNonNull() = Traits::StorageToWorking(temp); } - *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::Percent value) { - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_PERCENT_ATTRIBUTE_TYPE); +} + +EmberAfStatus SetNull(chip::EndpointId endpoint) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_PERCENT_ATTRIBUTE_TYPE); +} + +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +{ + if (value.IsNull()) + { + return SetNull(endpoint); + } + + return Set(endpoint, value.Value()); } } // namespace CurrentPositionLiftPercentage namespace CurrentPositionTiltPercentage { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + if (Traits::IsNullValue(temp)) { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + value.SetNull(); + } + else + { + value.SetNonNull() = Traits::StorageToWorking(temp); } - *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::Percent value) { - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_PERCENT_ATTRIBUTE_TYPE); +} + +EmberAfStatus SetNull(chip::EndpointId endpoint) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_PERCENT_ATTRIBUTE_TYPE); +} + +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +{ + if (value.IsNull()) + { + return SetNull(endpoint); + } + + return Set(endpoint, value.Value()); } } // namespace CurrentPositionTiltPercentage @@ -15123,62 +15211,106 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) namespace TargetPositionLiftPercent100ths { -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + if (Traits::IsNullValue(temp)) { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + value.SetNull(); + } + else + { + value.SetNonNull() = Traits::StorageToWorking(temp); } - *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::Percent100ths value) { - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_PERCENT100THS_ATTRIBUTE_TYPE); +} + +EmberAfStatus SetNull(chip::EndpointId endpoint) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_PERCENT100THS_ATTRIBUTE_TYPE); +} + +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +{ + if (value.IsNull()) + { + return SetNull(endpoint); + } + + return Set(endpoint, value.Value()); } } // namespace TargetPositionLiftPercent100ths namespace TargetPositionTiltPercent100ths { -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + if (Traits::IsNullValue(temp)) { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + value.SetNull(); + } + else + { + value.SetNonNull() = Traits::StorageToWorking(temp); } - *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::Percent100ths value) { - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_PERCENT100THS_ATTRIBUTE_TYPE); +} + +EmberAfStatus SetNull(chip::EndpointId endpoint) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_PERCENT100THS_ATTRIBUTE_TYPE); +} + +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +{ + if (value.IsNull()) + { + return SetNull(endpoint); + } + + return Set(endpoint, value.Value()); } } // namespace TargetPositionTiltPercent100ths @@ -15216,160 +15348,111 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) namespace CurrentPositionLiftPercent100ths { -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - *value = Traits::StorageToWorking(temp); - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + if (Traits::IsNullValue(temp)) { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + value.SetNull(); } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); -} - -} // namespace CurrentPositionLiftPercent100ths - -namespace CurrentPositionTiltPercent100ths { - -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + else { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + value.SetNonNull() = Traits::StorageToWorking(temp); } - *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::Percent100ths value) { - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_PERCENT100THS_ATTRIBUTE_TYPE); } -} // namespace CurrentPositionTiltPercent100ths - -namespace InstalledOpenLimitLift { - -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +EmberAfStatus SetNull(chip::EndpointId endpoint) { - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - *value = Traits::StorageToWorking(temp); - return status; + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_PERCENT100THS_ATTRIBUTE_TYPE); } -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) + +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + if (value.IsNull()) { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + return SetNull(endpoint); } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + + return Set(endpoint, value.Value()); } -} // namespace InstalledOpenLimitLift +} // namespace CurrentPositionLiftPercent100ths -namespace InstalledClosedLimitLift { +namespace CurrentPositionTiltPercent100ths { -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + if (Traits::IsNullValue(temp)) { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + value.SetNull(); + } + else + { + value.SetNonNull() = Traits::StorageToWorking(temp); } - *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::Percent100ths value) { - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_PERCENT100THS_ATTRIBUTE_TYPE); } -} // namespace InstalledClosedLimitLift - -namespace InstalledOpenLimitTilt { - -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +EmberAfStatus SetNull(chip::EndpointId endpoint) { - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - *value = Traits::StorageToWorking(temp); - return status; + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_PERCENT100THS_ATTRIBUTE_TYPE); } -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) + +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + if (value.IsNull()) { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + return SetNull(endpoint); } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + + return Set(endpoint, value.Value()); } -} // namespace InstalledOpenLimitTilt +} // namespace CurrentPositionTiltPercent100ths -namespace InstalledClosedLimitTilt { +namespace InstalledOpenLimitLift { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { @@ -15398,9 +15481,9 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) return emberAfWriteServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace InstalledClosedLimitTilt +} // namespace InstalledOpenLimitLift -namespace VelocityLift { +namespace InstalledClosedLimitLift { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { @@ -15429,9 +15512,9 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) return emberAfWriteServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace VelocityLift +} // namespace InstalledClosedLimitLift -namespace AccelerationTimeLift { +namespace InstalledOpenLimitTilt { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { @@ -15460,9 +15543,9 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) return emberAfWriteServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace AccelerationTimeLift +} // namespace InstalledOpenLimitTilt -namespace DecelerationTimeLift { +namespace InstalledClosedLimitTilt { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { @@ -15491,7 +15574,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) return emberAfWriteServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace DecelerationTimeLift +} // namespace InstalledClosedLimitTilt namespace Mode { @@ -15524,66 +15607,6 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) } // namespace Mode -namespace IntermediateSetpointsLift { - -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableByteSpan value) -{ - uint8_t zclString[254 + 1]; - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, zclString, sizeof(zclString)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - size_t length = emberAfStringLength(zclString); - if (length == NumericAttributeTraits::kNullValue) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - - VerifyOrReturnError(value.size() == 254, EMBER_ZCL_STATUS_INVALID_DATA_TYPE); - memcpy(value.data(), &zclString[1], 254); - value.reduce_size(length); - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, chip::ByteSpan value) -{ - static_assert(254 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); - VerifyOrReturnError(value.size() <= 254, EMBER_ZCL_STATUS_CONSTRAINT_ERROR); - uint8_t zclString[254 + 1]; - emberAfCopyInt8u(zclString, 0, static_cast(value.size())); - memcpy(&zclString[1], value.data(), value.size()); - return emberAfWriteServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, zclString, ZCL_OCTET_STRING_ATTRIBUTE_TYPE); -} - -} // namespace IntermediateSetpointsLift - -namespace IntermediateSetpointsTilt { - -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableByteSpan value) -{ - uint8_t zclString[254 + 1]; - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, zclString, sizeof(zclString)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - size_t length = emberAfStringLength(zclString); - if (length == NumericAttributeTraits::kNullValue) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - - VerifyOrReturnError(value.size() == 254, EMBER_ZCL_STATUS_INVALID_DATA_TYPE); - memcpy(value.data(), &zclString[1], 254); - value.reduce_size(length); - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, chip::ByteSpan value) -{ - static_assert(254 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); - VerifyOrReturnError(value.size() <= 254, EMBER_ZCL_STATUS_CONSTRAINT_ERROR); - uint8_t zclString[254 + 1]; - emberAfCopyInt8u(zclString, 0, static_cast(value.size())); - memcpy(&zclString[1], value.data(), value.size()); - return emberAfWriteServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, zclString, ZCL_OCTET_STRING_ATTRIBUTE_TYPE); -} - -} // namespace IntermediateSetpointsTilt - namespace SafetyStatus { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) diff --git a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h index aa147af6ffeb09..b7963ab6f92b7c 100644 --- a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h +++ b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h @@ -2672,13 +2672,17 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); } // namespace PhysicalClosedLimitTilt namespace CurrentPositionLift { -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value); // int16u +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int16u EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); +EmberAfStatus SetNull(chip::EndpointId endpoint); +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); } // namespace CurrentPositionLift namespace CurrentPositionTilt { -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value); // int16u +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int16u EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); +EmberAfStatus SetNull(chip::EndpointId endpoint); +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); } // namespace CurrentPositionTilt namespace NumberOfActuationsLift { @@ -2697,13 +2701,17 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); } // namespace ConfigStatus namespace CurrentPositionLiftPercentage { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // int8u -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // Percent +EmberAfStatus Set(chip::EndpointId endpoint, chip::Percent value); +EmberAfStatus SetNull(chip::EndpointId endpoint); +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); } // namespace CurrentPositionLiftPercentage namespace CurrentPositionTiltPercentage { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // int8u -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // Percent +EmberAfStatus Set(chip::EndpointId endpoint, chip::Percent value); +EmberAfStatus SetNull(chip::EndpointId endpoint); +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); } // namespace CurrentPositionTiltPercentage namespace OperationalStatus { @@ -2712,13 +2720,17 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); } // namespace OperationalStatus namespace TargetPositionLiftPercent100ths { -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value); // int16u -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // Percent100ths +EmberAfStatus Set(chip::EndpointId endpoint, chip::Percent100ths value); +EmberAfStatus SetNull(chip::EndpointId endpoint); +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); } // namespace TargetPositionLiftPercent100ths namespace TargetPositionTiltPercent100ths { -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value); // int16u -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // Percent100ths +EmberAfStatus Set(chip::EndpointId endpoint, chip::Percent100ths value); +EmberAfStatus SetNull(chip::EndpointId endpoint); +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); } // namespace TargetPositionTiltPercent100ths namespace EndProductType { @@ -2727,13 +2739,17 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); } // namespace EndProductType namespace CurrentPositionLiftPercent100ths { -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value); // int16u -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // Percent100ths +EmberAfStatus Set(chip::EndpointId endpoint, chip::Percent100ths value); +EmberAfStatus SetNull(chip::EndpointId endpoint); +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); } // namespace CurrentPositionLiftPercent100ths namespace CurrentPositionTiltPercent100ths { -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value); // int16u -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // Percent100ths +EmberAfStatus Set(chip::EndpointId endpoint, chip::Percent100ths value); +EmberAfStatus SetNull(chip::EndpointId endpoint); +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); } // namespace CurrentPositionTiltPercent100ths namespace InstalledOpenLimitLift { @@ -2756,36 +2772,11 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value); // int16u EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); } // namespace InstalledClosedLimitTilt -namespace VelocityLift { -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value); // int16u -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); -} // namespace VelocityLift - -namespace AccelerationTimeLift { -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value); // int16u -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); -} // namespace AccelerationTimeLift - -namespace DecelerationTimeLift { -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value); // int16u -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); -} // namespace DecelerationTimeLift - namespace Mode { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // bitmap8 EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); } // namespace Mode -namespace IntermediateSetpointsLift { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableByteSpan value); // octet_string -EmberAfStatus Set(chip::EndpointId endpoint, chip::ByteSpan value); -} // namespace IntermediateSetpointsLift - -namespace IntermediateSetpointsTilt { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableByteSpan value); // octet_string -EmberAfStatus Set(chip::EndpointId endpoint, chip::ByteSpan value); -} // namespace IntermediateSetpointsTilt - namespace SafetyStatus { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value); // bitmap16 EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp index b51b15a0a1257a..af86e8da235004 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp @@ -13750,24 +13750,9 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre case Attributes::InstalledClosedLimitTilt::TypeInfo::GetAttributeId(): ReturnErrorOnFailure(DataModel::Decode(reader, installedClosedLimitTilt)); break; - case Attributes::VelocityLift::TypeInfo::GetAttributeId(): - ReturnErrorOnFailure(DataModel::Decode(reader, velocityLift)); - break; - case Attributes::AccelerationTimeLift::TypeInfo::GetAttributeId(): - ReturnErrorOnFailure(DataModel::Decode(reader, accelerationTimeLift)); - break; - case Attributes::DecelerationTimeLift::TypeInfo::GetAttributeId(): - ReturnErrorOnFailure(DataModel::Decode(reader, decelerationTimeLift)); - break; case Attributes::Mode::TypeInfo::GetAttributeId(): ReturnErrorOnFailure(DataModel::Decode(reader, mode)); break; - case Attributes::IntermediateSetpointsLift::TypeInfo::GetAttributeId(): - ReturnErrorOnFailure(DataModel::Decode(reader, intermediateSetpointsLift)); - break; - case Attributes::IntermediateSetpointsTilt::TypeInfo::GetAttributeId(): - ReturnErrorOnFailure(DataModel::Decode(reader, intermediateSetpointsTilt)); - break; case Attributes::SafetyStatus::TypeInfo::GetAttributeId(): ReturnErrorOnFailure(DataModel::Decode(reader, safetyStatus)); break; diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h index 1ea87e95ed5316..ad8fc491517c30 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h @@ -19362,6 +19362,16 @@ enum class WcConfigStatus : uint8_t kTiltEncoderControlled = 0x40, }; +// Bitmap for WcFeature +enum class WcFeature : uint32_t +{ + kLift = 0x1, + kTilt = 0x2, + kPositionAwareLift = 0x4, + kAbsolutePosition = 0x8, + kPositionAwareTilt = 0x10, +}; + // Bitmap for WcMode enum class WcMode : uint8_t { @@ -19396,16 +19406,6 @@ enum class WcSafetyStatus : uint16_t kProtection = 0x800, }; -// Bitmap for WindowCoveringFeature -enum class WindowCoveringFeature : uint32_t -{ - kLift = 0x1, - kTilt = 0x2, - kPositionAwareLift = 0x4, - kAbsolutePosition = 0x8, - kPositionAwareTilt = 0x10, -}; - namespace Commands { // Forward-declarations so we can reference these later. @@ -19577,8 +19577,8 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::GoToLiftPercentage::Id; } static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } - uint8_t liftPercentageValue; - uint16_t liftPercent100thsValue; + chip::Percent liftPercentageValue; + chip::Percent100ths liftPercent100thsValue; CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -19593,8 +19593,8 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::GoToLiftPercentage::Id; } static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } - uint8_t liftPercentageValue; - uint16_t liftPercent100thsValue; + chip::Percent liftPercentageValue; + chip::Percent100ths liftPercent100thsValue; CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace GoToLiftPercentage @@ -19644,8 +19644,8 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::GoToTiltPercentage::Id; } static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } - uint8_t tiltPercentageValue; - uint16_t tiltPercent100thsValue; + chip::Percent tiltPercentageValue; + chip::Percent100ths tiltPercent100thsValue; CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -19660,8 +19660,8 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::GoToTiltPercentage::Id; } static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } - uint8_t tiltPercentageValue; - uint16_t tiltPercent100thsValue; + chip::Percent tiltPercentageValue; + chip::Percent100ths tiltPercent100thsValue; CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace GoToTiltPercentage @@ -19708,9 +19708,9 @@ struct TypeInfo namespace CurrentPositionLift { struct TypeInfo { - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::CurrentPositionLift::Id; } @@ -19720,9 +19720,9 @@ struct TypeInfo namespace CurrentPositionTilt { struct TypeInfo { - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::CurrentPositionTilt::Id; } @@ -19768,9 +19768,9 @@ struct TypeInfo namespace CurrentPositionLiftPercentage { struct TypeInfo { - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::CurrentPositionLiftPercentage::Id; } @@ -19780,9 +19780,9 @@ struct TypeInfo namespace CurrentPositionTiltPercentage { struct TypeInfo { - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::CurrentPositionTiltPercentage::Id; } @@ -19804,9 +19804,9 @@ struct TypeInfo namespace TargetPositionLiftPercent100ths { struct TypeInfo { - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::TargetPositionLiftPercent100ths::Id; } @@ -19816,9 +19816,9 @@ struct TypeInfo namespace TargetPositionTiltPercent100ths { struct TypeInfo { - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::TargetPositionTiltPercent100ths::Id; } @@ -19840,9 +19840,9 @@ struct TypeInfo namespace CurrentPositionLiftPercent100ths { struct TypeInfo { - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::CurrentPositionLiftPercent100ths::Id; } @@ -19852,9 +19852,9 @@ struct TypeInfo namespace CurrentPositionTiltPercent100ths { struct TypeInfo { - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::CurrentPositionTiltPercent100ths::Id; } @@ -19909,42 +19909,6 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace InstalledClosedLimitTilt -namespace VelocityLift { -struct TypeInfo -{ - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::VelocityLift::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace VelocityLift -namespace AccelerationTimeLift { -struct TypeInfo -{ - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::AccelerationTimeLift::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace AccelerationTimeLift -namespace DecelerationTimeLift { -struct TypeInfo -{ - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::DecelerationTimeLift::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace DecelerationTimeLift namespace Mode { struct TypeInfo { @@ -19957,30 +19921,6 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace Mode -namespace IntermediateSetpointsLift { -struct TypeInfo -{ - using Type = chip::ByteSpan; - using DecodableType = chip::ByteSpan; - using DecodableArgType = chip::ByteSpan; - - static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::IntermediateSetpointsLift::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace IntermediateSetpointsLift -namespace IntermediateSetpointsTilt { -struct TypeInfo -{ - using Type = chip::ByteSpan; - using DecodableType = chip::ByteSpan; - using DecodableArgType = chip::ByteSpan; - - static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::IntermediateSetpointsTilt::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace IntermediateSetpointsTilt namespace SafetyStatus { struct TypeInfo { @@ -20058,12 +19998,7 @@ struct TypeInfo Attributes::InstalledClosedLimitLift::TypeInfo::DecodableType installedClosedLimitLift; Attributes::InstalledOpenLimitTilt::TypeInfo::DecodableType installedOpenLimitTilt; Attributes::InstalledClosedLimitTilt::TypeInfo::DecodableType installedClosedLimitTilt; - Attributes::VelocityLift::TypeInfo::DecodableType velocityLift; - Attributes::AccelerationTimeLift::TypeInfo::DecodableType accelerationTimeLift; - Attributes::DecelerationTimeLift::TypeInfo::DecodableType decelerationTimeLift; Attributes::Mode::TypeInfo::DecodableType mode; - Attributes::IntermediateSetpointsLift::TypeInfo::DecodableType intermediateSetpointsLift; - Attributes::IntermediateSetpointsTilt::TypeInfo::DecodableType intermediateSetpointsTilt; Attributes::SafetyStatus::TypeInfo::DecodableType safetyStatus; Attributes::AttributeList::TypeInfo::DecodableType attributeList; Attributes::FeatureMap::TypeInfo::DecodableType featureMap; diff --git a/zzz_generated/app-common/app-common/zap-generated/enums.h b/zzz_generated/app-common/app-common/zap-generated/enums.h index 93d0a3b6728194..96bd03e8da7fd9 100644 --- a/zzz_generated/app-common/app-common/zap-generated/enums.h +++ b/zzz_generated/app-common/app-common/zap-generated/enums.h @@ -1304,6 +1304,16 @@ enum EmberAfWiFiVersionType : uint8_t #define EMBER_AF_WC_CONFIG_STATUS_LIFT_ENCODER_CONTROLLED_OFFSET (5) #define EMBER_AF_WC_CONFIG_STATUS_TILT_ENCODER_CONTROLLED (64) #define EMBER_AF_WC_CONFIG_STATUS_TILT_ENCODER_CONTROLLED_OFFSET (6) +#define EMBER_AF_WC_FEATURE_LIFT (1) +#define EMBER_AF_WC_FEATURE_LIFT_OFFSET (0) +#define EMBER_AF_WC_FEATURE_TILT (2) +#define EMBER_AF_WC_FEATURE_TILT_OFFSET (1) +#define EMBER_AF_WC_FEATURE_POSITION_AWARE_LIFT (4) +#define EMBER_AF_WC_FEATURE_POSITION_AWARE_LIFT_OFFSET (2) +#define EMBER_AF_WC_FEATURE_ABSOLUTE_POSITION (8) +#define EMBER_AF_WC_FEATURE_ABSOLUTE_POSITION_OFFSET (3) +#define EMBER_AF_WC_FEATURE_POSITION_AWARE_TILT (16) +#define EMBER_AF_WC_FEATURE_POSITION_AWARE_TILT_OFFSET (4) #define EMBER_AF_WC_MODE_MOTOR_DIRECTION_REVERSED (1) #define EMBER_AF_WC_MODE_MOTOR_DIRECTION_REVERSED_OFFSET (0) #define EMBER_AF_WC_MODE_CALIBRATION_MODE (2) @@ -1346,13 +1356,3 @@ enum EmberAfWiFiVersionType : uint8_t #define EMBER_AF_WI_FI_NETWORK_DIAGNOSTICS_FEATURE_PACKET_COUNTS_OFFSET (0) #define EMBER_AF_WI_FI_NETWORK_DIAGNOSTICS_FEATURE_ERROR_COUNTS (2) #define EMBER_AF_WI_FI_NETWORK_DIAGNOSTICS_FEATURE_ERROR_COUNTS_OFFSET (1) -#define EMBER_AF_WINDOW_COVERING_FEATURE_LIFT (1) -#define EMBER_AF_WINDOW_COVERING_FEATURE_LIFT_OFFSET (0) -#define EMBER_AF_WINDOW_COVERING_FEATURE_TILT (2) -#define EMBER_AF_WINDOW_COVERING_FEATURE_TILT_OFFSET (1) -#define EMBER_AF_WINDOW_COVERING_FEATURE_POSITION_AWARE_LIFT (4) -#define EMBER_AF_WINDOW_COVERING_FEATURE_POSITION_AWARE_LIFT_OFFSET (2) -#define EMBER_AF_WINDOW_COVERING_FEATURE_ABSOLUTE_POSITION (8) -#define EMBER_AF_WINDOW_COVERING_FEATURE_ABSOLUTE_POSITION_OFFSET (3) -#define EMBER_AF_WINDOW_COVERING_FEATURE_POSITION_AWARE_TILT (16) -#define EMBER_AF_WINDOW_COVERING_FEATURE_POSITION_AWARE_TILT_OFFSET (4) diff --git a/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h b/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h index 7ec6eab6166808..e3095e38277663 100644 --- a/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h +++ b/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h @@ -2594,30 +2594,10 @@ namespace InstalledClosedLimitTilt { static constexpr AttributeId Id = 0x00000013; } // namespace InstalledClosedLimitTilt -namespace VelocityLift { -static constexpr AttributeId Id = 0x00000014; -} // namespace VelocityLift - -namespace AccelerationTimeLift { -static constexpr AttributeId Id = 0x00000015; -} // namespace AccelerationTimeLift - -namespace DecelerationTimeLift { -static constexpr AttributeId Id = 0x00000016; -} // namespace DecelerationTimeLift - namespace Mode { static constexpr AttributeId Id = 0x00000017; } // namespace Mode -namespace IntermediateSetpointsLift { -static constexpr AttributeId Id = 0x00000018; -} // namespace IntermediateSetpointsLift - -namespace IntermediateSetpointsTilt { -static constexpr AttributeId Id = 0x00000019; -} // namespace IntermediateSetpointsTilt - namespace SafetyStatus { static constexpr AttributeId Id = 0x0000001A; } // namespace SafetyStatus diff --git a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h index d403a514804b18..bb230623dc26d2 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h @@ -49812,7 +49812,7 @@ class ReadWindowCoveringCurrentPositionLift : public ModelCommand this, OnAttributeResponse, OnDefaultFailure); } - static void OnAttributeResponse(void * context, uint16_t value) + static void OnAttributeResponse(void * context, const chip::app::DataModel::Nullable & value) { OnGeneralAttributeResponse(context, "WindowCovering.CurrentPositionLift response", value); } @@ -49849,7 +49849,10 @@ class ReportWindowCoveringCurrentPositionLift : public ModelCommand return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); } - static void OnValueReport(void * context, uint16_t value) { LogValue("WindowCovering.CurrentPositionLift report", 0, value); } + static void OnValueReport(void * context, const chip::app::DataModel::Nullable & value) + { + LogValue("WindowCovering.CurrentPositionLift report", 0, value); + } private: uint16_t mMinInterval; @@ -49881,7 +49884,7 @@ class ReadWindowCoveringCurrentPositionTilt : public ModelCommand this, OnAttributeResponse, OnDefaultFailure); } - static void OnAttributeResponse(void * context, uint16_t value) + static void OnAttributeResponse(void * context, const chip::app::DataModel::Nullable & value) { OnGeneralAttributeResponse(context, "WindowCovering.CurrentPositionTilt response", value); } @@ -49918,7 +49921,10 @@ class ReportWindowCoveringCurrentPositionTilt : public ModelCommand return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); } - static void OnValueReport(void * context, uint16_t value) { LogValue("WindowCovering.CurrentPositionTilt report", 0, value); } + static void OnValueReport(void * context, const chip::app::DataModel::Nullable & value) + { + LogValue("WindowCovering.CurrentPositionTilt report", 0, value); + } private: uint16_t mMinInterval; @@ -50019,7 +50025,7 @@ class ReadWindowCoveringCurrentPositionLiftPercentage : public ModelCommand this, OnAttributeResponse, OnDefaultFailure); } - static void OnAttributeResponse(void * context, uint8_t value) + static void OnAttributeResponse(void * context, const chip::app::DataModel::Nullable & value) { OnGeneralAttributeResponse(context, "WindowCovering.CurrentPositionLiftPercentage response", value); } @@ -50056,7 +50062,7 @@ class ReportWindowCoveringCurrentPositionLiftPercentage : public ModelCommand return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); } - static void OnValueReport(void * context, uint8_t value) + static void OnValueReport(void * context, const chip::app::DataModel::Nullable & value) { LogValue("WindowCovering.CurrentPositionLiftPercentage report", 0, value); } @@ -50091,7 +50097,7 @@ class ReadWindowCoveringCurrentPositionTiltPercentage : public ModelCommand this, OnAttributeResponse, OnDefaultFailure); } - static void OnAttributeResponse(void * context, uint8_t value) + static void OnAttributeResponse(void * context, const chip::app::DataModel::Nullable & value) { OnGeneralAttributeResponse(context, "WindowCovering.CurrentPositionTiltPercentage response", value); } @@ -50128,7 +50134,7 @@ class ReportWindowCoveringCurrentPositionTiltPercentage : public ModelCommand return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); } - static void OnValueReport(void * context, uint8_t value) + static void OnValueReport(void * context, const chip::app::DataModel::Nullable & value) { LogValue("WindowCovering.CurrentPositionTiltPercentage report", 0, value); } @@ -50232,7 +50238,7 @@ class ReadWindowCoveringTargetPositionLiftPercent100ths : public ModelCommand this, OnAttributeResponse, OnDefaultFailure); } - static void OnAttributeResponse(void * context, uint16_t value) + static void OnAttributeResponse(void * context, const chip::app::DataModel::Nullable & value) { OnGeneralAttributeResponse(context, "WindowCovering.TargetPositionLiftPercent100ths response", value); } @@ -50270,7 +50276,7 @@ class ReportWindowCoveringTargetPositionLiftPercent100ths : public ModelCommand return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); } - static void OnValueReport(void * context, uint16_t value) + static void OnValueReport(void * context, const chip::app::DataModel::Nullable & value) { LogValue("WindowCovering.TargetPositionLiftPercent100ths report", 0, value); } @@ -50305,7 +50311,7 @@ class ReadWindowCoveringTargetPositionTiltPercent100ths : public ModelCommand this, OnAttributeResponse, OnDefaultFailure); } - static void OnAttributeResponse(void * context, uint16_t value) + static void OnAttributeResponse(void * context, const chip::app::DataModel::Nullable & value) { OnGeneralAttributeResponse(context, "WindowCovering.TargetPositionTiltPercent100ths response", value); } @@ -50343,7 +50349,7 @@ class ReportWindowCoveringTargetPositionTiltPercent100ths : public ModelCommand return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); } - static void OnValueReport(void * context, uint16_t value) + static void OnValueReport(void * context, const chip::app::DataModel::Nullable & value) { LogValue("WindowCovering.TargetPositionTiltPercent100ths report", 0, value); } @@ -50447,7 +50453,7 @@ class ReadWindowCoveringCurrentPositionLiftPercent100ths : public ModelCommand this, OnAttributeResponse, OnDefaultFailure); } - static void OnAttributeResponse(void * context, uint16_t value) + static void OnAttributeResponse(void * context, const chip::app::DataModel::Nullable & value) { OnGeneralAttributeResponse(context, "WindowCovering.CurrentPositionLiftPercent100ths response", value); } @@ -50485,7 +50491,7 @@ class ReportWindowCoveringCurrentPositionLiftPercent100ths : public ModelCommand return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); } - static void OnValueReport(void * context, uint16_t value) + static void OnValueReport(void * context, const chip::app::DataModel::Nullable & value) { LogValue("WindowCovering.CurrentPositionLiftPercent100ths report", 0, value); } @@ -50520,7 +50526,7 @@ class ReadWindowCoveringCurrentPositionTiltPercent100ths : public ModelCommand this, OnAttributeResponse, OnDefaultFailure); } - static void OnAttributeResponse(void * context, uint16_t value) + static void OnAttributeResponse(void * context, const chip::app::DataModel::Nullable & value) { OnGeneralAttributeResponse(context, "WindowCovering.CurrentPositionTiltPercent100ths response", value); } @@ -50558,7 +50564,7 @@ class ReportWindowCoveringCurrentPositionTiltPercent100ths : public ModelCommand return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); } - static void OnValueReport(void * context, uint16_t value) + static void OnValueReport(void * context, const chip::app::DataModel::Nullable & value) { LogValue("WindowCovering.CurrentPositionTiltPercent100ths report", 0, value); } diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index 055a7811a29727..cb22ab2cd080a4 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -29776,7 +29776,8 @@ class Test_TC_WNCV_2_1 : public TestCommand (static_cast(context))->OnFailureResponse_16(status); } - static void OnSuccessCallback_16(void * context, uint16_t targetPositionLiftPercent100ths) + static void OnSuccessCallback_16(void * context, + const chip::app::DataModel::Nullable & targetPositionLiftPercent100ths) { (static_cast(context))->OnSuccessResponse_16(targetPositionLiftPercent100ths); } @@ -29793,7 +29794,8 @@ class Test_TC_WNCV_2_1 : public TestCommand (static_cast(context))->OnFailureResponse_18(status); } - static void OnSuccessCallback_18(void * context, uint16_t targetPositionLiftPercent100ths) + static void OnSuccessCallback_18(void * context, + const chip::app::DataModel::Nullable & targetPositionLiftPercent100ths) { (static_cast(context))->OnSuccessResponse_18(targetPositionLiftPercent100ths); } @@ -29803,7 +29805,8 @@ class Test_TC_WNCV_2_1 : public TestCommand (static_cast(context))->OnFailureResponse_19(status); } - static void OnSuccessCallback_19(void * context, uint16_t targetPositionTiltPercent100ths) + static void OnSuccessCallback_19(void * context, + const chip::app::DataModel::Nullable & targetPositionTiltPercent100ths) { (static_cast(context))->OnSuccessResponse_19(targetPositionTiltPercent100ths); } @@ -29820,7 +29823,8 @@ class Test_TC_WNCV_2_1 : public TestCommand (static_cast(context))->OnFailureResponse_21(status); } - static void OnSuccessCallback_21(void * context, uint16_t targetPositionTiltPercent100ths) + static void OnSuccessCallback_21(void * context, + const chip::app::DataModel::Nullable & targetPositionTiltPercent100ths) { (static_cast(context))->OnSuccessResponse_21(targetPositionTiltPercent100ths); } @@ -29830,7 +29834,8 @@ class Test_TC_WNCV_2_1 : public TestCommand (static_cast(context))->OnFailureResponse_22(status); } - static void OnSuccessCallback_22(void * context, uint16_t currentPositionLiftPercent100ths) + static void OnSuccessCallback_22(void * context, + const chip::app::DataModel::Nullable & currentPositionLiftPercent100ths) { (static_cast(context))->OnSuccessResponse_22(currentPositionLiftPercent100ths); } @@ -29847,7 +29852,8 @@ class Test_TC_WNCV_2_1 : public TestCommand (static_cast(context))->OnFailureResponse_24(status); } - static void OnSuccessCallback_24(void * context, uint16_t currentPositionLiftPercent100ths) + static void OnSuccessCallback_24(void * context, + const chip::app::DataModel::Nullable & currentPositionLiftPercent100ths) { (static_cast(context))->OnSuccessResponse_24(currentPositionLiftPercent100ths); } @@ -29857,7 +29863,8 @@ class Test_TC_WNCV_2_1 : public TestCommand (static_cast(context))->OnFailureResponse_25(status); } - static void OnSuccessCallback_25(void * context, uint16_t currentPositionTiltPercent100ths) + static void OnSuccessCallback_25(void * context, + const chip::app::DataModel::Nullable & currentPositionTiltPercent100ths) { (static_cast(context))->OnSuccessResponse_25(currentPositionTiltPercent100ths); } @@ -29874,7 +29881,8 @@ class Test_TC_WNCV_2_1 : public TestCommand (static_cast(context))->OnFailureResponse_27(status); } - static void OnSuccessCallback_27(void * context, uint16_t currentPositionTiltPercent100ths) + static void OnSuccessCallback_27(void * context, + const chip::app::DataModel::Nullable & currentPositionTiltPercent100ths) { (static_cast(context))->OnSuccessResponse_27(currentPositionTiltPercent100ths); } @@ -30019,7 +30027,7 @@ class Test_TC_WNCV_2_1 : public TestCommand (static_cast(context))->OnFailureResponse_43(status); } - static void OnSuccessCallback_43(void * context, uint16_t currentPositionLift) + static void OnSuccessCallback_43(void * context, const chip::app::DataModel::Nullable & currentPositionLift) { (static_cast(context))->OnSuccessResponse_43(currentPositionLift); } @@ -30036,7 +30044,7 @@ class Test_TC_WNCV_2_1 : public TestCommand (static_cast(context))->OnFailureResponse_45(status); } - static void OnSuccessCallback_45(void * context, uint16_t currentPositionLift) + static void OnSuccessCallback_45(void * context, const chip::app::DataModel::Nullable & currentPositionLift) { (static_cast(context))->OnSuccessResponse_45(currentPositionLift); } @@ -30046,7 +30054,7 @@ class Test_TC_WNCV_2_1 : public TestCommand (static_cast(context))->OnFailureResponse_46(status); } - static void OnSuccessCallback_46(void * context, uint16_t currentPositionTilt) + static void OnSuccessCallback_46(void * context, const chip::app::DataModel::Nullable & currentPositionTilt) { (static_cast(context))->OnSuccessResponse_46(currentPositionTilt); } @@ -30063,7 +30071,7 @@ class Test_TC_WNCV_2_1 : public TestCommand (static_cast(context))->OnFailureResponse_48(status); } - static void OnSuccessCallback_48(void * context, uint16_t currentPositionTilt) + static void OnSuccessCallback_48(void * context, const chip::app::DataModel::Nullable & currentPositionTilt) { (static_cast(context))->OnSuccessResponse_48(currentPositionTilt); } @@ -30073,7 +30081,8 @@ class Test_TC_WNCV_2_1 : public TestCommand (static_cast(context))->OnFailureResponse_49(status); } - static void OnSuccessCallback_49(void * context, uint8_t currentPositionLiftPercentage) + static void OnSuccessCallback_49(void * context, + const chip::app::DataModel::Nullable & currentPositionLiftPercentage) { (static_cast(context))->OnSuccessResponse_49(currentPositionLiftPercentage); } @@ -30090,7 +30099,8 @@ class Test_TC_WNCV_2_1 : public TestCommand (static_cast(context))->OnFailureResponse_51(status); } - static void OnSuccessCallback_51(void * context, uint8_t currentPositionLiftPercentage) + static void OnSuccessCallback_51(void * context, + const chip::app::DataModel::Nullable & currentPositionLiftPercentage) { (static_cast(context))->OnSuccessResponse_51(currentPositionLiftPercentage); } @@ -30100,7 +30110,8 @@ class Test_TC_WNCV_2_1 : public TestCommand (static_cast(context))->OnFailureResponse_52(status); } - static void OnSuccessCallback_52(void * context, uint8_t currentPositionTiltPercentage) + static void OnSuccessCallback_52(void * context, + const chip::app::DataModel::Nullable & currentPositionTiltPercentage) { (static_cast(context))->OnSuccessResponse_52(currentPositionTiltPercentage); } @@ -30117,7 +30128,8 @@ class Test_TC_WNCV_2_1 : public TestCommand (static_cast(context))->OnFailureResponse_54(status); } - static void OnSuccessCallback_54(void * context, uint8_t currentPositionTiltPercentage) + static void OnSuccessCallback_54(void * context, + const chip::app::DataModel::Nullable & currentPositionTiltPercentage) { (static_cast(context))->OnSuccessResponse_54(currentPositionTiltPercentage); } @@ -30456,11 +30468,11 @@ class Test_TC_WNCV_2_1 : public TestCommand void OnFailureResponse_16(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_16(uint16_t targetPositionLiftPercent100ths) + void OnSuccessResponse_16(const chip::app::DataModel::Nullable & targetPositionLiftPercent100ths) { - VerifyOrReturn(CheckConstraintType("targetPositionLiftPercent100ths", "", "uint16")); - VerifyOrReturn( - CheckConstraintMaxValue("targetPositionLiftPercent100ths", targetPositionLiftPercent100ths, 10000U)); + VerifyOrReturn(CheckConstraintType("targetPositionLiftPercent100ths", "", "Percent100ths")); + VerifyOrReturn(CheckConstraintMaxValue("targetPositionLiftPercent100ths", + targetPositionLiftPercent100ths, 10000U)); NextTest(); } @@ -30470,8 +30482,8 @@ class Test_TC_WNCV_2_1 : public TestCommand chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - uint16_t targetPositionLiftPercent100thsArgument; - targetPositionLiftPercent100thsArgument = 20000U; + chip::app::DataModel::Nullable targetPositionLiftPercent100thsArgument; + targetPositionLiftPercent100thsArgument.SetNonNull() = 20000U; ReturnErrorOnFailure( cluster.WriteAttribute( @@ -30501,9 +30513,9 @@ class Test_TC_WNCV_2_1 : public TestCommand void OnFailureResponse_18(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_18(uint16_t targetPositionLiftPercent100ths) + void OnSuccessResponse_18(const chip::app::DataModel::Nullable & targetPositionLiftPercent100ths) { - VerifyOrReturn(CheckConstraintType("targetPositionLiftPercent100ths", "", "uint16")); + VerifyOrReturn(CheckConstraintType("targetPositionLiftPercent100ths", "", "Percent100ths")); VerifyOrReturn(CheckConstraintNotValue("targetPositionLiftPercent100ths", targetPositionLiftPercent100ths, 20000U)); NextTest(); @@ -30523,11 +30535,11 @@ class Test_TC_WNCV_2_1 : public TestCommand void OnFailureResponse_19(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_19(uint16_t targetPositionTiltPercent100ths) + void OnSuccessResponse_19(const chip::app::DataModel::Nullable & targetPositionTiltPercent100ths) { - VerifyOrReturn(CheckConstraintType("targetPositionTiltPercent100ths", "", "uint16")); - VerifyOrReturn( - CheckConstraintMaxValue("targetPositionTiltPercent100ths", targetPositionTiltPercent100ths, 10000U)); + VerifyOrReturn(CheckConstraintType("targetPositionTiltPercent100ths", "", "Percent100ths")); + VerifyOrReturn(CheckConstraintMaxValue("targetPositionTiltPercent100ths", + targetPositionTiltPercent100ths, 10000U)); NextTest(); } @@ -30537,8 +30549,8 @@ class Test_TC_WNCV_2_1 : public TestCommand chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - uint16_t targetPositionTiltPercent100thsArgument; - targetPositionTiltPercent100thsArgument = 20000U; + chip::app::DataModel::Nullable targetPositionTiltPercent100thsArgument; + targetPositionTiltPercent100thsArgument.SetNonNull() = 20000U; ReturnErrorOnFailure( cluster.WriteAttribute( @@ -30568,9 +30580,9 @@ class Test_TC_WNCV_2_1 : public TestCommand void OnFailureResponse_21(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_21(uint16_t targetPositionTiltPercent100ths) + void OnSuccessResponse_21(const chip::app::DataModel::Nullable & targetPositionTiltPercent100ths) { - VerifyOrReturn(CheckConstraintType("targetPositionTiltPercent100ths", "", "uint16")); + VerifyOrReturn(CheckConstraintType("targetPositionTiltPercent100ths", "", "Percent100ths")); VerifyOrReturn(CheckConstraintNotValue("targetPositionTiltPercent100ths", targetPositionTiltPercent100ths, 20000U)); NextTest(); @@ -30590,11 +30602,11 @@ class Test_TC_WNCV_2_1 : public TestCommand void OnFailureResponse_22(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_22(uint16_t currentPositionLiftPercent100ths) + void OnSuccessResponse_22(const chip::app::DataModel::Nullable & currentPositionLiftPercent100ths) { - VerifyOrReturn(CheckConstraintType("currentPositionLiftPercent100ths", "", "uint16")); - VerifyOrReturn( - CheckConstraintMaxValue("currentPositionLiftPercent100ths", currentPositionLiftPercent100ths, 10000U)); + VerifyOrReturn(CheckConstraintType("currentPositionLiftPercent100ths", "", "Percent100ths")); + VerifyOrReturn(CheckConstraintMaxValue("currentPositionLiftPercent100ths", + currentPositionLiftPercent100ths, 10000U)); NextTest(); } @@ -30604,8 +30616,8 @@ class Test_TC_WNCV_2_1 : public TestCommand chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - uint16_t currentPositionLiftPercent100thsArgument; - currentPositionLiftPercent100thsArgument = 20000U; + chip::app::DataModel::Nullable currentPositionLiftPercent100thsArgument; + currentPositionLiftPercent100thsArgument.SetNonNull() = 20000U; ReturnErrorOnFailure( cluster.WriteAttribute( @@ -30635,9 +30647,9 @@ class Test_TC_WNCV_2_1 : public TestCommand void OnFailureResponse_24(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_24(uint16_t currentPositionLiftPercent100ths) + void OnSuccessResponse_24(const chip::app::DataModel::Nullable & currentPositionLiftPercent100ths) { - VerifyOrReturn(CheckConstraintType("currentPositionLiftPercent100ths", "", "uint16")); + VerifyOrReturn(CheckConstraintType("currentPositionLiftPercent100ths", "", "Percent100ths")); VerifyOrReturn(CheckConstraintNotValue("currentPositionLiftPercent100ths", currentPositionLiftPercent100ths, 20000U)); NextTest(); @@ -30657,11 +30669,11 @@ class Test_TC_WNCV_2_1 : public TestCommand void OnFailureResponse_25(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_25(uint16_t currentPositionTiltPercent100ths) + void OnSuccessResponse_25(const chip::app::DataModel::Nullable & currentPositionTiltPercent100ths) { - VerifyOrReturn(CheckConstraintType("currentPositionTiltPercent100ths", "", "uint16")); - VerifyOrReturn( - CheckConstraintMaxValue("currentPositionTiltPercent100ths", currentPositionTiltPercent100ths, 10000U)); + VerifyOrReturn(CheckConstraintType("currentPositionTiltPercent100ths", "", "Percent100ths")); + VerifyOrReturn(CheckConstraintMaxValue("currentPositionTiltPercent100ths", + currentPositionTiltPercent100ths, 10000U)); NextTest(); } @@ -30671,8 +30683,8 @@ class Test_TC_WNCV_2_1 : public TestCommand chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - uint16_t currentPositionTiltPercent100thsArgument; - currentPositionTiltPercent100thsArgument = 20000U; + chip::app::DataModel::Nullable currentPositionTiltPercent100thsArgument; + currentPositionTiltPercent100thsArgument.SetNonNull() = 20000U; ReturnErrorOnFailure( cluster.WriteAttribute( @@ -30702,9 +30714,9 @@ class Test_TC_WNCV_2_1 : public TestCommand void OnFailureResponse_27(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_27(uint16_t currentPositionTiltPercent100ths) + void OnSuccessResponse_27(const chip::app::DataModel::Nullable & currentPositionTiltPercent100ths) { - VerifyOrReturn(CheckConstraintType("currentPositionTiltPercent100ths", "", "uint16")); + VerifyOrReturn(CheckConstraintType("currentPositionTiltPercent100ths", "", "Percent100ths")); VerifyOrReturn(CheckConstraintNotValue("currentPositionTiltPercent100ths", currentPositionTiltPercent100ths, 20000U)); NextTest(); @@ -31046,7 +31058,7 @@ class Test_TC_WNCV_2_1 : public TestCommand void OnFailureResponse_43(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_43(uint16_t currentPositionLift) + void OnSuccessResponse_43(const chip::app::DataModel::Nullable & currentPositionLift) { VerifyOrReturn(CheckConstraintType("currentPositionLift", "", "uint16")); VerifyOrReturn(CheckConstraintMaxValue("currentPositionLift", currentPositionLift, 65535U)); @@ -31059,8 +31071,8 @@ class Test_TC_WNCV_2_1 : public TestCommand chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - uint16_t currentPositionLiftArgument; - currentPositionLiftArgument = 255U; + chip::app::DataModel::Nullable currentPositionLiftArgument; + currentPositionLiftArgument.SetNonNull() = 255U; ReturnErrorOnFailure(cluster.WriteAttribute( currentPositionLiftArgument, this, OnSuccessCallback_44, OnFailureCallback_44)); @@ -31088,7 +31100,7 @@ class Test_TC_WNCV_2_1 : public TestCommand void OnFailureResponse_45(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_45(uint16_t currentPositionLift) + void OnSuccessResponse_45(const chip::app::DataModel::Nullable & currentPositionLift) { VerifyOrReturn(CheckConstraintType("currentPositionLift", "", "uint16")); VerifyOrReturn(CheckConstraintMaxValue("currentPositionLift", currentPositionLift, 65535U)); @@ -31108,7 +31120,7 @@ class Test_TC_WNCV_2_1 : public TestCommand void OnFailureResponse_46(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_46(uint16_t currentPositionTilt) + void OnSuccessResponse_46(const chip::app::DataModel::Nullable & currentPositionTilt) { VerifyOrReturn(CheckConstraintType("currentPositionTilt", "", "uint16")); VerifyOrReturn(CheckConstraintMaxValue("currentPositionTilt", currentPositionTilt, 65535U)); @@ -31121,8 +31133,8 @@ class Test_TC_WNCV_2_1 : public TestCommand chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - uint16_t currentPositionTiltArgument; - currentPositionTiltArgument = 255U; + chip::app::DataModel::Nullable currentPositionTiltArgument; + currentPositionTiltArgument.SetNonNull() = 255U; ReturnErrorOnFailure(cluster.WriteAttribute( currentPositionTiltArgument, this, OnSuccessCallback_47, OnFailureCallback_47)); @@ -31150,7 +31162,7 @@ class Test_TC_WNCV_2_1 : public TestCommand void OnFailureResponse_48(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_48(uint16_t currentPositionTilt) + void OnSuccessResponse_48(const chip::app::DataModel::Nullable & currentPositionTilt) { VerifyOrReturn(CheckConstraintType("currentPositionTilt", "", "uint16")); VerifyOrReturn(CheckConstraintMaxValue("currentPositionTilt", currentPositionTilt, 65535U)); @@ -31171,10 +31183,10 @@ class Test_TC_WNCV_2_1 : public TestCommand void OnFailureResponse_49(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_49(uint8_t currentPositionLiftPercentage) + void OnSuccessResponse_49(const chip::app::DataModel::Nullable & currentPositionLiftPercentage) { - VerifyOrReturn(CheckConstraintType("currentPositionLiftPercentage", "", "uint8")); - VerifyOrReturn(CheckConstraintMaxValue("currentPositionLiftPercentage", currentPositionLiftPercentage, 100)); + VerifyOrReturn(CheckConstraintType("currentPositionLiftPercentage", "", "Percent")); + VerifyOrReturn(CheckConstraintMaxValue("currentPositionLiftPercentage", currentPositionLiftPercentage, 100)); NextTest(); } @@ -31184,8 +31196,8 @@ class Test_TC_WNCV_2_1 : public TestCommand chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - uint8_t currentPositionLiftPercentageArgument; - currentPositionLiftPercentageArgument = 200; + chip::app::DataModel::Nullable currentPositionLiftPercentageArgument; + currentPositionLiftPercentageArgument.SetNonNull() = 200; ReturnErrorOnFailure( cluster.WriteAttribute( @@ -31215,9 +31227,9 @@ class Test_TC_WNCV_2_1 : public TestCommand void OnFailureResponse_51(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_51(uint8_t currentPositionLiftPercentage) + void OnSuccessResponse_51(const chip::app::DataModel::Nullable & currentPositionLiftPercentage) { - VerifyOrReturn(CheckConstraintType("currentPositionLiftPercentage", "", "uint8")); + VerifyOrReturn(CheckConstraintType("currentPositionLiftPercentage", "", "Percent")); VerifyOrReturn(CheckConstraintNotValue("currentPositionLiftPercentage", currentPositionLiftPercentage, 200)); NextTest(); @@ -31237,10 +31249,10 @@ class Test_TC_WNCV_2_1 : public TestCommand void OnFailureResponse_52(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_52(uint8_t currentPositionTiltPercentage) + void OnSuccessResponse_52(const chip::app::DataModel::Nullable & currentPositionTiltPercentage) { - VerifyOrReturn(CheckConstraintType("currentPositionTiltPercentage", "", "uint8")); - VerifyOrReturn(CheckConstraintMaxValue("currentPositionTiltPercentage", currentPositionTiltPercentage, 100)); + VerifyOrReturn(CheckConstraintType("currentPositionTiltPercentage", "", "Percent")); + VerifyOrReturn(CheckConstraintMaxValue("currentPositionTiltPercentage", currentPositionTiltPercentage, 100)); NextTest(); } @@ -31250,8 +31262,8 @@ class Test_TC_WNCV_2_1 : public TestCommand chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - uint8_t currentPositionTiltPercentageArgument; - currentPositionTiltPercentageArgument = 200; + chip::app::DataModel::Nullable currentPositionTiltPercentageArgument; + currentPositionTiltPercentageArgument.SetNonNull() = 200; ReturnErrorOnFailure( cluster.WriteAttribute( @@ -31281,9 +31293,9 @@ class Test_TC_WNCV_2_1 : public TestCommand void OnFailureResponse_54(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_54(uint8_t currentPositionTiltPercentage) + void OnSuccessResponse_54(const chip::app::DataModel::Nullable & currentPositionTiltPercentage) { - VerifyOrReturn(CheckConstraintType("currentPositionTiltPercentage", "", "uint8")); + VerifyOrReturn(CheckConstraintType("currentPositionTiltPercentage", "", "Percent")); VerifyOrReturn(CheckConstraintNotValue("currentPositionTiltPercentage", currentPositionTiltPercentage, 200)); NextTest(); diff --git a/zzz_generated/controller-clusters/zap-generated/CHIPClusters.cpp b/zzz_generated/controller-clusters/zap-generated/CHIPClusters.cpp index 0471685191652e..e2ae7d4335d453 100644 --- a/zzz_generated/controller-clusters/zap-generated/CHIPClusters.cpp +++ b/zzz_generated/controller-clusters/zap-generated/CHIPClusters.cpp @@ -7325,8 +7325,8 @@ CHIP_ERROR WindowCoveringCluster::DownOrClose(Callback::Cancelable * onSuccessCa } CHIP_ERROR WindowCoveringCluster::GoToLiftPercentage(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint8_t liftPercentageValue, - uint16_t liftPercent100thsValue) + Callback::Cancelable * onFailureCallback, chip::Percent liftPercentageValue, + chip::Percent100ths liftPercent100thsValue) { CHIP_ERROR err = CHIP_NO_ERROR; TLV::TLVWriter * writer = nullptr; @@ -7349,9 +7349,9 @@ CHIP_ERROR WindowCoveringCluster::GoToLiftPercentage(Callback::Cancelable * onSu SuccessOrExit(err = sender->PrepareCommand(cmdParams)); VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); - // liftPercentageValue: int8u + // liftPercentageValue: percent SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), liftPercentageValue)); - // liftPercent100thsValue: int16u + // liftPercent100thsValue: percent100ths SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), liftPercent100thsValue)); SuccessOrExit(err = sender->FinishCommand()); @@ -7410,8 +7410,8 @@ CHIP_ERROR WindowCoveringCluster::GoToLiftValue(Callback::Cancelable * onSuccess } CHIP_ERROR WindowCoveringCluster::GoToTiltPercentage(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint8_t tiltPercentageValue, - uint16_t tiltPercent100thsValue) + Callback::Cancelable * onFailureCallback, chip::Percent tiltPercentageValue, + chip::Percent100ths tiltPercent100thsValue) { CHIP_ERROR err = CHIP_NO_ERROR; TLV::TLVWriter * writer = nullptr; @@ -7434,9 +7434,9 @@ CHIP_ERROR WindowCoveringCluster::GoToTiltPercentage(Callback::Cancelable * onSu SuccessOrExit(err = sender->PrepareCommand(cmdParams)); VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); - // tiltPercentageValue: int8u + // tiltPercentageValue: percent SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), tiltPercentageValue)); - // tiltPercent100thsValue: int16u + // tiltPercent100thsValue: percent100ths SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), tiltPercent100thsValue)); SuccessOrExit(err = sender->FinishCommand()); diff --git a/zzz_generated/controller-clusters/zap-generated/CHIPClusters.h b/zzz_generated/controller-clusters/zap-generated/CHIPClusters.h index a1803060bd700f..a10a06c45aadd3 100644 --- a/zzz_generated/controller-clusters/zap-generated/CHIPClusters.h +++ b/zzz_generated/controller-clusters/zap-generated/CHIPClusters.h @@ -826,11 +826,11 @@ class DLL_EXPORT WindowCoveringCluster : public ClusterBase // Cluster Commands CHIP_ERROR DownOrClose(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback); CHIP_ERROR GoToLiftPercentage(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint8_t liftPercentageValue, uint16_t liftPercent100thsValue); + chip::Percent liftPercentageValue, chip::Percent100ths liftPercent100thsValue); CHIP_ERROR GoToLiftValue(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint16_t liftValue); CHIP_ERROR GoToTiltPercentage(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint8_t tiltPercentageValue, uint16_t tiltPercent100thsValue); + chip::Percent tiltPercentageValue, chip::Percent100ths tiltPercent100thsValue); CHIP_ERROR GoToTiltValue(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint16_t tiltValue); CHIP_ERROR StopMotion(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback); diff --git a/zzz_generated/tv-casting-app/zap-generated/endpoint_config.h b/zzz_generated/tv-casting-app/zap-generated/endpoint_config.h index 05b019bb2d6562..fafb00330d795f 100644 --- a/zzz_generated/tv-casting-app/zap-generated/endpoint_config.h +++ b/zzz_generated/tv-casting-app/zap-generated/endpoint_config.h @@ -1204,18 +1204,24 @@ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Window Covering (server) */ \ - { 0x0000, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* Type */ \ - { 0x0003, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* CurrentPositionLift */ \ - { 0x0004, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* CurrentPositionTilt */ \ - { 0x0007, ZAP_TYPE(BITMAP8), 1, 0, ZAP_SIMPLE_DEFAULT(0x03) }, /* ConfigStatus */ \ - { 0x0008, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0xFF) }, /* CurrentPositionLiftPercentage */ \ - { 0x0009, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0xFF) }, /* CurrentPositionTiltPercentage */ \ - { 0x000A, ZAP_TYPE(BITMAP8), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* OperationalStatus */ \ - { 0x000B, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0xFF) }, /* TargetPositionLiftPercent100ths */ \ - { 0x000C, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0xFFFF) }, /* TargetPositionTiltPercent100ths */ \ - { 0x000D, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* EndProductType */ \ - { 0x000E, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0xFF) }, /* CurrentPositionLiftPercent100ths */ \ - { 0x000F, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0xFF) }, /* CurrentPositionTiltPercent100ths */ \ + { 0x0000, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* Type */ \ + { 0x0003, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_SIMPLE_DEFAULT(0x0000) }, /* CurrentPositionLift */ \ + { 0x0004, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_SIMPLE_DEFAULT(0x0000) }, /* CurrentPositionTilt */ \ + { 0x0007, ZAP_TYPE(BITMAP8), 1, 0, ZAP_SIMPLE_DEFAULT(0x03) }, /* ConfigStatus */ \ + { 0x0008, ZAP_TYPE(PERCENT), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_SIMPLE_DEFAULT(0xFF) }, /* CurrentPositionLiftPercentage */ \ + { 0x0009, ZAP_TYPE(PERCENT), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_SIMPLE_DEFAULT(0xFF) }, /* CurrentPositionTiltPercentage */ \ + { 0x000A, ZAP_TYPE(BITMAP8), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* OperationalStatus */ \ + { 0x000B, ZAP_TYPE(PERCENT100THS), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_SIMPLE_DEFAULT(0xFF) }, /* TargetPositionLiftPercent100ths */ \ + { 0x000C, ZAP_TYPE(PERCENT100THS), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_SIMPLE_DEFAULT(0xFFFF) }, /* TargetPositionTiltPercent100ths */ \ + { 0x000D, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* EndProductType */ \ + { 0x000E, ZAP_TYPE(PERCENT100THS), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_SIMPLE_DEFAULT(0xFF) }, /* CurrentPositionLiftPercent100ths */ \ + { 0x000F, ZAP_TYPE(PERCENT100THS), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_SIMPLE_DEFAULT(0xFF) }, /* CurrentPositionTiltPercent100ths */ \ { 0x0010, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* InstalledOpenLimitLift */ \ { 0x0011, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0xFFFF) }, /* InstalledClosedLimitLift */ \ { 0x0012, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* InstalledOpenLimitTilt */ \ diff --git a/zzz_generated/window-app/zap-generated/endpoint_config.h b/zzz_generated/window-app/zap-generated/endpoint_config.h index 157a5f9364acea..8e69a187b18f07 100644 --- a/zzz_generated/window-app/zap-generated/endpoint_config.h +++ b/zzz_generated/window-app/zap-generated/endpoint_config.h @@ -835,18 +835,24 @@ { 0xFFFD, ZAP_TYPE(INT16U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Window Covering (server) */ \ - { 0x0000, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* Type */ \ - { 0x0003, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* CurrentPositionLift */ \ - { 0x0004, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* CurrentPositionTilt */ \ - { 0x0007, ZAP_TYPE(BITMAP8), 1, 0, ZAP_SIMPLE_DEFAULT(0x03) }, /* ConfigStatus */ \ - { 0x0008, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0xFF) }, /* CurrentPositionLiftPercentage */ \ - { 0x0009, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0xFF) }, /* CurrentPositionTiltPercentage */ \ - { 0x000A, ZAP_TYPE(BITMAP8), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* OperationalStatus */ \ - { 0x000B, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0xFF) }, /* TargetPositionLiftPercent100ths */ \ - { 0x000C, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0xFF) }, /* TargetPositionTiltPercent100ths */ \ - { 0x000D, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* EndProductType */ \ - { 0x000E, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0xFF) }, /* CurrentPositionLiftPercent100ths */ \ - { 0x000F, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0xFF) }, /* CurrentPositionTiltPercent100ths */ \ + { 0x0000, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* Type */ \ + { 0x0003, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_SIMPLE_DEFAULT(0x0000) }, /* CurrentPositionLift */ \ + { 0x0004, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_SIMPLE_DEFAULT(0x0000) }, /* CurrentPositionTilt */ \ + { 0x0007, ZAP_TYPE(BITMAP8), 1, 0, ZAP_SIMPLE_DEFAULT(0x03) }, /* ConfigStatus */ \ + { 0x0008, ZAP_TYPE(PERCENT), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_SIMPLE_DEFAULT(0xFF) }, /* CurrentPositionLiftPercentage */ \ + { 0x0009, ZAP_TYPE(PERCENT), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_SIMPLE_DEFAULT(0xFF) }, /* CurrentPositionTiltPercentage */ \ + { 0x000A, ZAP_TYPE(BITMAP8), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* OperationalStatus */ \ + { 0x000B, ZAP_TYPE(PERCENT100THS), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_SIMPLE_DEFAULT(0xFF) }, /* TargetPositionLiftPercent100ths */ \ + { 0x000C, ZAP_TYPE(PERCENT100THS), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_SIMPLE_DEFAULT(0xFF) }, /* TargetPositionTiltPercent100ths */ \ + { 0x000D, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* EndProductType */ \ + { 0x000E, ZAP_TYPE(PERCENT100THS), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_SIMPLE_DEFAULT(0xFF) }, /* CurrentPositionLiftPercent100ths */ \ + { 0x000F, ZAP_TYPE(PERCENT100THS), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_SIMPLE_DEFAULT(0xFF) }, /* CurrentPositionTiltPercent100ths */ \ { 0x0010, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* InstalledOpenLimitLift */ \ { 0x0011, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0xFFFF) }, /* InstalledClosedLimitLift */ \ { 0x0012, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* InstalledOpenLimitTilt */ \ @@ -865,18 +871,24 @@ { 0xFFFD, ZAP_TYPE(INT16U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 2, Cluster: Window Covering (server) */ \ - { 0x0000, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* Type */ \ - { 0x0003, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* CurrentPositionLift */ \ - { 0x0004, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* CurrentPositionTilt */ \ - { 0x0007, ZAP_TYPE(BITMAP8), 1, 0, ZAP_SIMPLE_DEFAULT(0x03) }, /* ConfigStatus */ \ - { 0x0008, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0xFF) }, /* CurrentPositionLiftPercentage */ \ - { 0x0009, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0xFF) }, /* CurrentPositionTiltPercentage */ \ - { 0x000A, ZAP_TYPE(BITMAP8), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* OperationalStatus */ \ - { 0x000B, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0xFF) }, /* TargetPositionLiftPercent100ths */ \ - { 0x000C, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0xFF) }, /* TargetPositionTiltPercent100ths */ \ - { 0x000D, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* EndProductType */ \ - { 0x000E, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0xFF) }, /* CurrentPositionLiftPercent100ths */ \ - { 0x000F, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0xFF) }, /* CurrentPositionTiltPercent100ths */ \ + { 0x0000, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* Type */ \ + { 0x0003, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_SIMPLE_DEFAULT(0x0000) }, /* CurrentPositionLift */ \ + { 0x0004, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_SIMPLE_DEFAULT(0x0000) }, /* CurrentPositionTilt */ \ + { 0x0007, ZAP_TYPE(BITMAP8), 1, 0, ZAP_SIMPLE_DEFAULT(0x03) }, /* ConfigStatus */ \ + { 0x0008, ZAP_TYPE(PERCENT), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_SIMPLE_DEFAULT(0xFF) }, /* CurrentPositionLiftPercentage */ \ + { 0x0009, ZAP_TYPE(PERCENT), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_SIMPLE_DEFAULT(0xFF) }, /* CurrentPositionTiltPercentage */ \ + { 0x000A, ZAP_TYPE(BITMAP8), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* OperationalStatus */ \ + { 0x000B, ZAP_TYPE(PERCENT100THS), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_SIMPLE_DEFAULT(0xFF) }, /* TargetPositionLiftPercent100ths */ \ + { 0x000C, ZAP_TYPE(PERCENT100THS), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_SIMPLE_DEFAULT(0xFF) }, /* TargetPositionTiltPercent100ths */ \ + { 0x000D, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* EndProductType */ \ + { 0x000E, ZAP_TYPE(PERCENT100THS), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_SIMPLE_DEFAULT(0xFF) }, /* CurrentPositionLiftPercent100ths */ \ + { 0x000F, ZAP_TYPE(PERCENT100THS), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_SIMPLE_DEFAULT(0xFF) }, /* CurrentPositionTiltPercent100ths */ \ { 0x0010, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* InstalledOpenLimitLift */ \ { 0x0011, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0xFFFF) }, /* InstalledClosedLimitLift */ \ { 0x0012, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* InstalledOpenLimitTilt */ \