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 0fcf8775dca274..0483ee28590bf3 100644 --- a/src/app/clusters/window-covering-server/window-covering-server.cpp +++ b/src/app/clusters/window-covering-server/window-covering-server.cpp @@ -59,7 +59,7 @@ 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 == @@ -73,6 +73,16 @@ static bool HasFeature(chip::EndpointId endpoint, WindowCoveringFeature feature) return false; } +static inline bool HasFeaturePaLift(chip::EndpointId endpoint) +{ + return (HasFeature(endpoint, WcFeature::kLift) && HasFeature(endpoint, WcFeature::kPositionAwareLift)); +} + +static inline 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; @@ -422,11 +432,11 @@ 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); } - if (HasFeature(endpoint, WindowCoveringFeature::kTilt)) + if (HasFeature(endpoint, WcFeature::kTilt)) { Attributes::TargetPositionTiltPercent100ths::Set(endpoint, 0); } @@ -443,11 +453,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); } @@ -463,18 +473,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); } @@ -492,8 +502,8 @@ bool emberAfWindowCoveringClusterGoToLiftValueCallback(app::CommandHandler * com EndpointId endpoint = commandPath.mEndpointId; - bool hasLift = HasFeature(endpoint, WindowCoveringFeature::kLift); - bool isPositionAware = HasFeature(endpoint, WindowCoveringFeature::kPositionAwareLift); + bool hasLift = HasFeature(endpoint, WcFeature::kLift); + bool isPositionAware = HasFeature(endpoint, WcFeature::kPositionAwareLift); emberAfWindowCoveringClusterPrint("GoToLiftValue Value command received"); if (hasLift && isPositionAware) @@ -521,11 +531,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)); @@ -533,7 +540,7 @@ bool emberAfWindowCoveringClusterGoToLiftPercentageCallback(app::CommandHandler } else { - emberAfWindowCoveringClusterPrint("Err Device is not PA=%u or LF=%u", isPositionAware, hasLift); + emberAfWindowCoveringClusterPrint("Err Device is not LF_PA"); emberAfSendImmediateDefaultResponse(EMBER_ZCL_STATUS_ACTION_DENIED); } return true; @@ -550,8 +557,8 @@ bool emberAfWindowCoveringClusterGoToTiltValueCallback(app::CommandHandler * com EndpointId endpoint = commandPath.mEndpointId; - bool hasTilt = HasFeature(endpoint, WindowCoveringFeature::kTilt); - bool isPositionAware = HasFeature(endpoint, WindowCoveringFeature::kPositionAwareTilt); + bool hasTilt = HasFeature(endpoint, WcFeature::kTilt); + bool isPositionAware = HasFeature(endpoint, WcFeature::kPositionAwareTilt); emberAfWindowCoveringClusterPrint("GoToTiltValue command received"); if (hasTilt && isPositionAware) @@ -579,11 +586,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)); @@ -591,7 +595,7 @@ bool emberAfWindowCoveringClusterGoToTiltPercentageCallback(app::CommandHandler } else { - emberAfWindowCoveringClusterPrint("Err Device is not PA=%u or TL=%u", isPositionAware, hasTilt); + emberAfWindowCoveringClusterPrint("Err Device is not TL_PA"); emberAfSendImmediateDefaultResponse(EMBER_ZCL_STATUS_ACTION_DENIED); } return true; 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 ae402c17c1dbc7..359cd3a3112c21 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 @@ -211,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 6858e8dac9c58e..308e21cf3fc61c 100644 --- a/src/controller/java/zap-generated/CHIPClusters-JNI.cpp +++ b/src/controller/java/zap-generated/CHIPClusters-JNI.cpp @@ -29358,8 +29358,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)); @@ -29381,9 +29383,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)); @@ -29395,8 +29397,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)); @@ -29418,9 +29422,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)); @@ -29469,8 +29473,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)); @@ -29493,9 +29499,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)); @@ -29507,8 +29514,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)); @@ -29531,9 +29540,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)); @@ -29582,8 +29592,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)); @@ -29606,9 +29618,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)); @@ -29620,8 +29633,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)); @@ -29644,9 +29659,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)); @@ -29695,8 +29711,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)); @@ -29719,9 +29737,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)); @@ -29733,8 +29752,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)); @@ -29757,9 +29778,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/CHIPReadCallbacks.h b/src/controller/java/zap-generated/CHIPReadCallbacks.h index 766e9894421cd0..28cdb38b656134 100644 --- a/src/controller/java/zap-generated/CHIPReadCallbacks.h +++ b/src/controller/java/zap-generated/CHIPReadCallbacks.h @@ -4789,6 +4789,12 @@ class CHIPWindowCoveringCurrentPositionLiftAttributeCallback } 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; @@ -4813,6 +4819,12 @@ class CHIPWindowCoveringCurrentPositionTiltAttributeCallback } 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; @@ -4837,6 +4849,12 @@ class CHIPWindowCoveringCurrentPositionLiftPercentageAttributeCallback } 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; @@ -4861,6 +4879,12 @@ class CHIPWindowCoveringCurrentPositionTiltPercentageAttributeCallback } 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; @@ -4885,6 +4909,12 @@ class CHIPWindowCoveringTargetPositionLiftPercent100thsAttributeCallback } 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; @@ -4909,6 +4939,12 @@ class CHIPWindowCoveringTargetPositionTiltPercent100thsAttributeCallback } 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; @@ -4933,6 +4969,12 @@ class CHIPWindowCoveringCurrentPositionLiftPercent100thsAttributeCallback } 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; @@ -4957,6 +4999,12 @@ class CHIPWindowCoveringCurrentPositionTiltPercent100thsAttributeCallback } 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; diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java b/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java index aac3ab56f1b7d0..9b6d1e1de2f5a9 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java @@ -14199,6 +14199,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); @@ -14216,21 +14280,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); } @@ -14243,22 +14307,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); } @@ -14272,22 +14338,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); } @@ -14301,22 +14373,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); } @@ -14409,16 +14487,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); @@ -14427,16 +14511,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); @@ -14445,16 +14535,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); @@ -14463,16 +14559,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/darwin/Framework/CHIPTests/CHIPClustersTests.m b/src/darwin/Framework/CHIPTests/CHIPClustersTests.m index 9c4be6de85347e..2609a465414fc7 100644 --- a/src/darwin/Framework/CHIPTests/CHIPClustersTests.m +++ b/src/darwin/Framework/CHIPTests/CHIPClustersTests.m @@ -18565,576 +18565,15 @@ - (void)testSendClusterTest_TC_WNCV_2_1_000015_ReadAttribute - (void)testSendClusterTest_TC_WNCV_2_1_000016_ReadAttribute { XCTestExpectation * expectation = - [self expectationWithDescription:@"2: read the RO optional attribute default: TargetPositionLiftPercent100ths"]; - - CHIPDevice * device = GetConnectedDevice(); - dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:queue]; - XCTAssertNotNil(cluster); - - [cluster - readAttributeTargetPositionLiftPercent100thsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"2: read the RO optional attribute default: TargetPositionLiftPercent100ths Error: %@", err); - - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); - - { - id actualValue = value; - if (actualValue != nil) { - XCTAssertLessThanOrEqual([actualValue unsignedShortValue], 10000); - } - } - - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; -} -- (void)testSendClusterTest_TC_WNCV_2_1_000017_WriteAttribute -{ - XCTestExpectation * expectation = - [self expectationWithDescription:@"3a: write a value into the RO optional attribute: TargetPositionLiftPercent100ths"]; - - CHIPDevice * device = GetConnectedDevice(); - dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:queue]; - XCTAssertNotNil(cluster); - - id targetPositionLiftPercent100thsArgument; - targetPositionLiftPercent100thsArgument = [NSNumber numberWithUnsignedShort:20000U]; - [cluster writeAttributeTargetPositionLiftPercent100thsWithValue:targetPositionLiftPercent100thsArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"3a: write a value into the RO optional attribute: " - @"TargetPositionLiftPercent100ths Error: %@", - err); - - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], - EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; -} -- (void)testSendClusterTest_TC_WNCV_2_1_000018_ReadAttribute -{ - XCTestExpectation * expectation = - [self expectationWithDescription:@"3b: reads back the RO optional attribute: TargetPositionLiftPercent100ths"]; - - CHIPDevice * device = GetConnectedDevice(); - dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:queue]; - XCTAssertNotNil(cluster); - - [cluster - readAttributeTargetPositionLiftPercent100thsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"3b: reads back the RO optional attribute: TargetPositionLiftPercent100ths Error: %@", err); - - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); - - { - id actualValue = value; - if (actualValue != nil) { - XCTAssertNotEqual([actualValue unsignedShortValue], 20000); - } - } - - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; -} -- (void)testSendClusterTest_TC_WNCV_2_1_000019_ReadAttribute -{ - XCTestExpectation * expectation = - [self expectationWithDescription:@"2: read the RO optional attribute default: TargetPositionTiltPercent100ths"]; - - CHIPDevice * device = GetConnectedDevice(); - dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:queue]; - XCTAssertNotNil(cluster); - - [cluster - readAttributeTargetPositionTiltPercent100thsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"2: read the RO optional attribute default: TargetPositionTiltPercent100ths Error: %@", err); - - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); - - { - id actualValue = value; - if (actualValue != nil) { - XCTAssertLessThanOrEqual([actualValue unsignedShortValue], 10000); - } - } - - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; -} -- (void)testSendClusterTest_TC_WNCV_2_1_000020_WriteAttribute -{ - XCTestExpectation * expectation = - [self expectationWithDescription:@"3a: write a value into the RO optional attribute: TargetPositionTiltPercent100ths"]; - - CHIPDevice * device = GetConnectedDevice(); - dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:queue]; - XCTAssertNotNil(cluster); - - id targetPositionTiltPercent100thsArgument; - targetPositionTiltPercent100thsArgument = [NSNumber numberWithUnsignedShort:20000U]; - [cluster writeAttributeTargetPositionTiltPercent100thsWithValue:targetPositionTiltPercent100thsArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"3a: write a value into the RO optional attribute: " - @"TargetPositionTiltPercent100ths Error: %@", - err); - - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], - EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; -} -- (void)testSendClusterTest_TC_WNCV_2_1_000021_ReadAttribute -{ - XCTestExpectation * expectation = - [self expectationWithDescription:@"3b: reads back the RO optional attribute: TargetPositionTiltPercent100ths"]; - - CHIPDevice * device = GetConnectedDevice(); - dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:queue]; - XCTAssertNotNil(cluster); - - [cluster - readAttributeTargetPositionTiltPercent100thsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"3b: reads back the RO optional attribute: TargetPositionTiltPercent100ths Error: %@", err); - - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); - - { - id actualValue = value; - if (actualValue != nil) { - XCTAssertNotEqual([actualValue unsignedShortValue], 20000); - } - } - - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; -} -- (void)testSendClusterTest_TC_WNCV_2_1_000022_ReadAttribute -{ - XCTestExpectation * expectation = - [self expectationWithDescription:@"2: read the RO optional attribute default: CurrentPositionLiftPercent100ths"]; - - CHIPDevice * device = GetConnectedDevice(); - dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:queue]; - XCTAssertNotNil(cluster); - - [cluster - readAttributeCurrentPositionLiftPercent100thsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"2: read the RO optional attribute default: CurrentPositionLiftPercent100ths Error: %@", err); - - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); - - { - id actualValue = value; - if (actualValue != nil) { - XCTAssertLessThanOrEqual([actualValue unsignedShortValue], 10000); - } - } - - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; -} -- (void)testSendClusterTest_TC_WNCV_2_1_000023_WriteAttribute -{ - XCTestExpectation * expectation = - [self expectationWithDescription:@"3a: write a value into the RO optional attribute: CurrentPositionLiftPercent100ths"]; - - CHIPDevice * device = GetConnectedDevice(); - dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:queue]; - XCTAssertNotNil(cluster); - - id currentPositionLiftPercent100thsArgument; - currentPositionLiftPercent100thsArgument = [NSNumber numberWithUnsignedShort:20000U]; - [cluster writeAttributeCurrentPositionLiftPercent100thsWithValue:currentPositionLiftPercent100thsArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"3a: write a value into the RO optional attribute: " - @"CurrentPositionLiftPercent100ths Error: %@", - err); - - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], - EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; -} -- (void)testSendClusterTest_TC_WNCV_2_1_000024_ReadAttribute -{ - XCTestExpectation * expectation = - [self expectationWithDescription:@"3b: reads back the RO optional attribute: CurrentPositionLiftPercent100ths"]; - - CHIPDevice * device = GetConnectedDevice(); - dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:queue]; - XCTAssertNotNil(cluster); - - [cluster - readAttributeCurrentPositionLiftPercent100thsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"3b: reads back the RO optional attribute: CurrentPositionLiftPercent100ths Error: %@", err); - - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); - - { - id actualValue = value; - if (actualValue != nil) { - XCTAssertNotEqual([actualValue unsignedShortValue], 20000); - } - } - - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; -} -- (void)testSendClusterTest_TC_WNCV_2_1_000025_ReadAttribute -{ - XCTestExpectation * expectation = - [self expectationWithDescription:@"2: read the RO optional attribute default: CurrentPositionTiltPercent100ths"]; - - CHIPDevice * device = GetConnectedDevice(); - dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:queue]; - XCTAssertNotNil(cluster); - - [cluster - readAttributeCurrentPositionTiltPercent100thsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"2: read the RO optional attribute default: CurrentPositionTiltPercent100ths Error: %@", err); - - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); - - { - id actualValue = value; - if (actualValue != nil) { - XCTAssertLessThanOrEqual([actualValue unsignedShortValue], 10000); - } - } - - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; -} -- (void)testSendClusterTest_TC_WNCV_2_1_000026_WriteAttribute -{ - XCTestExpectation * expectation = - [self expectationWithDescription:@"3a: write a value into the RO optional attribute: CurrentPositionTiltPercent100ths"]; - - CHIPDevice * device = GetConnectedDevice(); - dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:queue]; - XCTAssertNotNil(cluster); - - id currentPositionTiltPercent100thsArgument; - currentPositionTiltPercent100thsArgument = [NSNumber numberWithUnsignedShort:20000U]; - [cluster writeAttributeCurrentPositionTiltPercent100thsWithValue:currentPositionTiltPercent100thsArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"3a: write a value into the RO optional attribute: " - @"CurrentPositionTiltPercent100ths Error: %@", - err); - - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], - EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; -} -- (void)testSendClusterTest_TC_WNCV_2_1_000027_ReadAttribute -{ - XCTestExpectation * expectation = - [self expectationWithDescription:@"3b: reads back the RO optional attribute: CurrentPositionTiltPercent100ths"]; - - CHIPDevice * device = GetConnectedDevice(); - dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:queue]; - XCTAssertNotNil(cluster); - - [cluster - readAttributeCurrentPositionTiltPercent100thsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"3b: reads back the RO optional attribute: CurrentPositionTiltPercent100ths Error: %@", err); - - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); - - { - id actualValue = value; - if (actualValue != nil) { - XCTAssertNotEqual([actualValue unsignedShortValue], 20000); - } - } - - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; -} -- (void)testSendClusterTest_TC_WNCV_2_1_000028_ReadAttribute -{ - XCTestExpectation * expectation = - [self expectationWithDescription:@"2: read the RO optional attribute default: InstalledOpenLimitLift"]; - - CHIPDevice * device = GetConnectedDevice(); - dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:queue]; - XCTAssertNotNil(cluster); - - [cluster readAttributeInstalledOpenLimitLiftWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"2: read the RO optional attribute default: InstalledOpenLimitLift Error: %@", err); - - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); - - { - id actualValue = value; - if (actualValue != nil) { - XCTAssertLessThanOrEqual([actualValue unsignedShortValue], 65535); - } - } - - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; -} -- (void)testSendClusterTest_TC_WNCV_2_1_000029_WriteAttribute -{ - XCTestExpectation * expectation = - [self expectationWithDescription:@"3a: write a value into the RO optional attribute: InstalledOpenLimitLift"]; - - CHIPDevice * device = GetConnectedDevice(); - dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:queue]; - XCTAssertNotNil(cluster); - - id installedOpenLimitLiftArgument; - installedOpenLimitLiftArgument = [NSNumber numberWithUnsignedShort:255U]; - [cluster - writeAttributeInstalledOpenLimitLiftWithValue:installedOpenLimitLiftArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"3a: write a value into the RO optional attribute: InstalledOpenLimitLift Error: %@", - err); - - XCTAssertEqual( - [CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; -} -- (void)testSendClusterTest_TC_WNCV_2_1_000030_ReadAttribute -{ - XCTestExpectation * expectation = - [self expectationWithDescription:@"3b: reads back the RO optional attribute: InstalledOpenLimitLift"]; - - CHIPDevice * device = GetConnectedDevice(); - dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:queue]; - XCTAssertNotNil(cluster); - - [cluster readAttributeInstalledOpenLimitLiftWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"3b: reads back the RO optional attribute: InstalledOpenLimitLift Error: %@", err); - - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); - - { - id actualValue = value; - if (actualValue != nil) { - XCTAssertLessThanOrEqual([actualValue unsignedShortValue], 65535); - } - } - - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; -} -- (void)testSendClusterTest_TC_WNCV_2_1_000031_ReadAttribute -{ - XCTestExpectation * expectation = - [self expectationWithDescription:@"2: read the RO optional attribute default: InstalledClosedLimitLift"]; - - CHIPDevice * device = GetConnectedDevice(); - dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:queue]; - XCTAssertNotNil(cluster); - - [cluster readAttributeInstalledClosedLimitLiftWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"2: read the RO optional attribute default: InstalledClosedLimitLift Error: %@", err); - - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); - - { - id actualValue = value; - if (actualValue != nil) { - XCTAssertLessThanOrEqual([actualValue unsignedShortValue], 65535); - } - } - - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; -} -- (void)testSendClusterTest_TC_WNCV_2_1_000032_WriteAttribute -{ - XCTestExpectation * expectation = - [self expectationWithDescription:@"3a: write a value into the RO optional attribute: InstalledClosedLimitLift"]; - - CHIPDevice * device = GetConnectedDevice(); - dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:queue]; - XCTAssertNotNil(cluster); - - id installedClosedLimitLiftArgument; - installedClosedLimitLiftArgument = [NSNumber numberWithUnsignedShort:255U]; - [cluster writeAttributeInstalledClosedLimitLiftWithValue:installedClosedLimitLiftArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"3a: write a value into the RO optional attribute: InstalledClosedLimitLift " - @"Error: %@", - err); - - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], - EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; -} -- (void)testSendClusterTest_TC_WNCV_2_1_000033_ReadAttribute -{ - XCTestExpectation * expectation = - [self expectationWithDescription:@"3b: reads back the RO optional attribute: InstalledClosedLimitLift"]; - - CHIPDevice * device = GetConnectedDevice(); - dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:queue]; - XCTAssertNotNil(cluster); - - [cluster readAttributeInstalledClosedLimitLiftWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"3b: reads back the RO optional attribute: InstalledClosedLimitLift Error: %@", err); - - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); - - { - id actualValue = value; - if (actualValue != nil) { - XCTAssertLessThanOrEqual([actualValue unsignedShortValue], 65535); - } - } - - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; -} -- (void)testSendClusterTest_TC_WNCV_2_1_000034_ReadAttribute -{ - XCTestExpectation * expectation = - [self expectationWithDescription:@"2: read the RO optional attribute default: InstalledOpenLimitTilt"]; - - CHIPDevice * device = GetConnectedDevice(); - dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:queue]; - XCTAssertNotNil(cluster); - - [cluster readAttributeInstalledOpenLimitTiltWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"2: read the RO optional attribute default: InstalledOpenLimitTilt Error: %@", err); - - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); - - { - id actualValue = value; - if (actualValue != nil) { - XCTAssertLessThanOrEqual([actualValue unsignedShortValue], 65535); - } - } - - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; -} -- (void)testSendClusterTest_TC_WNCV_2_1_000035_WriteAttribute -{ - XCTestExpectation * expectation = - [self expectationWithDescription:@"3a: write a value into the RO optional attribute: InstalledOpenLimitTilt"]; - - CHIPDevice * device = GetConnectedDevice(); - dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:queue]; - XCTAssertNotNil(cluster); - - id installedOpenLimitTiltArgument; - installedOpenLimitTiltArgument = [NSNumber numberWithUnsignedShort:255U]; - [cluster - writeAttributeInstalledOpenLimitTiltWithValue:installedOpenLimitTiltArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"3a: write a value into the RO optional attribute: InstalledOpenLimitTilt Error: %@", - err); - - XCTAssertEqual( - [CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; -} -- (void)testSendClusterTest_TC_WNCV_2_1_000036_ReadAttribute -{ - XCTestExpectation * expectation = - [self expectationWithDescription:@"3b: reads back the RO optional attribute: InstalledOpenLimitTilt"]; - - CHIPDevice * device = GetConnectedDevice(); - dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:queue]; - XCTAssertNotNil(cluster); - - [cluster readAttributeInstalledOpenLimitTiltWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"3b: reads back the RO optional attribute: InstalledOpenLimitTilt Error: %@", err); - - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); - - { - id actualValue = value; - if (actualValue != nil) { - XCTAssertLessThanOrEqual([actualValue unsignedShortValue], 65535); - } - } - - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; -} -- (void)testSendClusterTest_TC_WNCV_2_1_000037_ReadAttribute -{ - XCTestExpectation * expectation = - [self expectationWithDescription:@"2: read the RO optional attribute default: InstalledClosedLimitTilt"]; + [self expectationWithDescription:@"2: read the RO optional attribute default: InstalledOpenLimitLift"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeInstalledClosedLimitTiltWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"2: read the RO optional attribute default: InstalledClosedLimitTilt Error: %@", err); + [cluster readAttributeInstalledOpenLimitLiftWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"2: read the RO optional attribute default: InstalledOpenLimitLift Error: %@", err); XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); @@ -19150,43 +18589,43 @@ - (void)testSendClusterTest_TC_WNCV_2_1_000037_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_WNCV_2_1_000038_WriteAttribute +- (void)testSendClusterTest_TC_WNCV_2_1_000017_WriteAttribute { XCTestExpectation * expectation = - [self expectationWithDescription:@"3a: write a value into the RO optional attribute: InstalledClosedLimitTilt"]; + [self expectationWithDescription:@"3a: write a value into the RO optional attribute: InstalledOpenLimitLift"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - id installedClosedLimitTiltArgument; - installedClosedLimitTiltArgument = [NSNumber numberWithUnsignedShort:255U]; - [cluster writeAttributeInstalledClosedLimitTiltWithValue:installedClosedLimitTiltArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"3a: write a value into the RO optional attribute: InstalledClosedLimitTilt " - @"Error: %@", - err); + id installedOpenLimitLiftArgument; + installedOpenLimitLiftArgument = [NSNumber numberWithUnsignedShort:255U]; + [cluster + writeAttributeInstalledOpenLimitLiftWithValue:installedOpenLimitLiftArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"3a: write a value into the RO optional attribute: InstalledOpenLimitLift Error: %@", + err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], - EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); - [expectation fulfill]; - }]; + XCTAssertEqual( + [CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_WNCV_2_1_000039_ReadAttribute +- (void)testSendClusterTest_TC_WNCV_2_1_000018_ReadAttribute { XCTestExpectation * expectation = - [self expectationWithDescription:@"3b: reads back the RO optional attribute: InstalledClosedLimitTilt"]; + [self expectationWithDescription:@"3b: reads back the RO optional attribute: InstalledOpenLimitLift"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeInstalledClosedLimitTiltWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"3b: reads back the RO optional attribute: InstalledClosedLimitTilt Error: %@", err); + [cluster readAttributeInstalledOpenLimitLiftWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"3b: reads back the RO optional attribute: InstalledOpenLimitLift Error: %@", err); XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); @@ -19202,24 +18641,25 @@ - (void)testSendClusterTest_TC_WNCV_2_1_000039_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_WNCV_2_1_000040_ReadAttribute +- (void)testSendClusterTest_TC_WNCV_2_1_000019_ReadAttribute { - XCTestExpectation * expectation = [self expectationWithDescription:@"4: read the RO mandatory attribute default: SafetyStatus"]; + XCTestExpectation * expectation = + [self expectationWithDescription:@"2: read the RO optional attribute default: InstalledClosedLimitLift"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeSafetyStatusWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"4: read the RO mandatory attribute default: SafetyStatus Error: %@", err); + [cluster readAttributeInstalledClosedLimitLiftWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"2: read the RO optional attribute default: InstalledClosedLimitLift Error: %@", err); XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); { id actualValue = value; if (actualValue != nil) { - XCTAssertLessThanOrEqual([actualValue unsignedShortValue], 2047); + XCTAssertLessThanOrEqual([actualValue unsignedShortValue], 65535); } } @@ -19228,46 +18668,50 @@ - (void)testSendClusterTest_TC_WNCV_2_1_000040_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_WNCV_2_1_000041_WriteAttribute +- (void)testSendClusterTest_TC_WNCV_2_1_000020_WriteAttribute { XCTestExpectation * expectation = - [self expectationWithDescription:@"5a: write a value into the RO mandatory attribute: SafetyStatus"]; + [self expectationWithDescription:@"3a: write a value into the RO optional attribute: InstalledClosedLimitLift"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - id safetyStatusArgument; - safetyStatusArgument = [NSNumber numberWithUnsignedShort:4096U]; - [cluster writeAttributeSafetyStatusWithValue:safetyStatusArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"5a: write a value into the RO mandatory attribute: SafetyStatus Error: %@", err); + id installedClosedLimitLiftArgument; + installedClosedLimitLiftArgument = [NSNumber numberWithUnsignedShort:255U]; + [cluster writeAttributeInstalledClosedLimitLiftWithValue:installedClosedLimitLiftArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"3a: write a value into the RO optional attribute: InstalledClosedLimitLift " + @"Error: %@", + err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); - [expectation fulfill]; - }]; + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], + EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_WNCV_2_1_000042_ReadAttribute +- (void)testSendClusterTest_TC_WNCV_2_1_000021_ReadAttribute { - XCTestExpectation * expectation = [self expectationWithDescription:@"5b: reads back the RO mandatory attribute: SafetyStatus"]; + XCTestExpectation * expectation = + [self expectationWithDescription:@"3b: reads back the RO optional attribute: InstalledClosedLimitLift"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeSafetyStatusWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"5b: reads back the RO mandatory attribute: SafetyStatus Error: %@", err); + [cluster readAttributeInstalledClosedLimitLiftWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"3b: reads back the RO optional attribute: InstalledClosedLimitLift Error: %@", err); XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); { id actualValue = value; if (actualValue != nil) { - XCTAssertNotEqual([actualValue unsignedShortValue], 4096); + XCTAssertLessThanOrEqual([actualValue unsignedShortValue], 65535); } } @@ -19276,18 +18720,18 @@ - (void)testSendClusterTest_TC_WNCV_2_1_000042_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_WNCV_2_1_000043_ReadAttribute +- (void)testSendClusterTest_TC_WNCV_2_1_000022_ReadAttribute { XCTestExpectation * expectation = - [self expectationWithDescription:@"4: read the RO optional attribute default: CurrentPositionLift"]; + [self expectationWithDescription:@"2: read the RO optional attribute default: InstalledOpenLimitTilt"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeCurrentPositionLiftWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"4: read the RO optional attribute default: CurrentPositionLift Error: %@", err); + [cluster readAttributeInstalledOpenLimitTiltWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"2: read the RO optional attribute default: InstalledOpenLimitTilt Error: %@", err); XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); @@ -19303,42 +18747,43 @@ - (void)testSendClusterTest_TC_WNCV_2_1_000043_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_WNCV_2_1_000044_WriteAttribute +- (void)testSendClusterTest_TC_WNCV_2_1_000023_WriteAttribute { XCTestExpectation * expectation = - [self expectationWithDescription:@"5a: write a value into the RO optional attribute: CurrentPositionLift"]; + [self expectationWithDescription:@"3a: write a value into the RO optional attribute: InstalledOpenLimitTilt"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - id currentPositionLiftArgument; - currentPositionLiftArgument = [NSNumber numberWithUnsignedShort:255U]; + id installedOpenLimitTiltArgument; + installedOpenLimitTiltArgument = [NSNumber numberWithUnsignedShort:255U]; [cluster - writeAttributeCurrentPositionLiftWithValue:currentPositionLiftArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"5a: write a value into the RO optional attribute: CurrentPositionLift Error: %@", err); + writeAttributeInstalledOpenLimitTiltWithValue:installedOpenLimitTiltArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"3a: write a value into the RO optional attribute: InstalledOpenLimitTilt Error: %@", + err); - XCTAssertEqual( - [CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); - [expectation fulfill]; - }]; + XCTAssertEqual( + [CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_WNCV_2_1_000045_ReadAttribute +- (void)testSendClusterTest_TC_WNCV_2_1_000024_ReadAttribute { XCTestExpectation * expectation = - [self expectationWithDescription:@"5b: reads back the RO optional attribute: CurrentPositionLift"]; + [self expectationWithDescription:@"3b: reads back the RO optional attribute: InstalledOpenLimitTilt"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeCurrentPositionLiftWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"5b: reads back the RO optional attribute: CurrentPositionLift Error: %@", err); + [cluster readAttributeInstalledOpenLimitTiltWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"3b: reads back the RO optional attribute: InstalledOpenLimitTilt Error: %@", err); XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); @@ -19354,18 +18799,18 @@ - (void)testSendClusterTest_TC_WNCV_2_1_000045_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_WNCV_2_1_000046_ReadAttribute +- (void)testSendClusterTest_TC_WNCV_2_1_000025_ReadAttribute { XCTestExpectation * expectation = - [self expectationWithDescription:@"4: read the RO optional attribute default: CurrentPositionTilt"]; + [self expectationWithDescription:@"2: read the RO optional attribute default: InstalledClosedLimitTilt"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeCurrentPositionTiltWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"4: read the RO optional attribute default: CurrentPositionTilt Error: %@", err); + [cluster readAttributeInstalledClosedLimitTiltWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"2: read the RO optional attribute default: InstalledClosedLimitTilt Error: %@", err); XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); @@ -19381,42 +18826,43 @@ - (void)testSendClusterTest_TC_WNCV_2_1_000046_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_WNCV_2_1_000047_WriteAttribute +- (void)testSendClusterTest_TC_WNCV_2_1_000026_WriteAttribute { XCTestExpectation * expectation = - [self expectationWithDescription:@"5a: write a value into the RO optional attribute: CurrentPositionTilt"]; + [self expectationWithDescription:@"3a: write a value into the RO optional attribute: InstalledClosedLimitTilt"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - id currentPositionTiltArgument; - currentPositionTiltArgument = [NSNumber numberWithUnsignedShort:255U]; - [cluster - writeAttributeCurrentPositionTiltWithValue:currentPositionTiltArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"5a: write a value into the RO optional attribute: CurrentPositionTilt Error: %@", err); + id installedClosedLimitTiltArgument; + installedClosedLimitTiltArgument = [NSNumber numberWithUnsignedShort:255U]; + [cluster writeAttributeInstalledClosedLimitTiltWithValue:installedClosedLimitTiltArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"3a: write a value into the RO optional attribute: InstalledClosedLimitTilt " + @"Error: %@", + err); - XCTAssertEqual( - [CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); - [expectation fulfill]; - }]; + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], + EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_WNCV_2_1_000048_ReadAttribute +- (void)testSendClusterTest_TC_WNCV_2_1_000027_ReadAttribute { XCTestExpectation * expectation = - [self expectationWithDescription:@"5b: reads back the RO optional attribute: CurrentPositionTilt"]; + [self expectationWithDescription:@"3b: reads back the RO optional attribute: InstalledClosedLimitTilt"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeCurrentPositionTiltWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"5b: reads back the RO optional attribute: CurrentPositionTilt Error: %@", err); + [cluster readAttributeInstalledClosedLimitTiltWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"3b: reads back the RO optional attribute: InstalledClosedLimitTilt Error: %@", err); XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); @@ -19432,165 +18878,77 @@ - (void)testSendClusterTest_TC_WNCV_2_1_000048_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_WNCV_2_1_000049_ReadAttribute -{ - XCTestExpectation * expectation = - [self expectationWithDescription:@"4: read the RO optional attribute default: CurrentPositionLiftPercentage"]; - - CHIPDevice * device = GetConnectedDevice(); - dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:queue]; - XCTAssertNotNil(cluster); - - [cluster - readAttributeCurrentPositionLiftPercentageWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"4: read the RO optional attribute default: CurrentPositionLiftPercentage Error: %@", err); - - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); - - { - id actualValue = value; - if (actualValue != nil) { - XCTAssertLessThanOrEqual([actualValue unsignedCharValue], 100); - } - } - - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; -} -- (void)testSendClusterTest_TC_WNCV_2_1_000050_WriteAttribute -{ - XCTestExpectation * expectation = - [self expectationWithDescription:@"5a: write a value into the RO optional attribute: CurrentPositionLiftPercentage"]; - - CHIPDevice * device = GetConnectedDevice(); - dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:queue]; - XCTAssertNotNil(cluster); - - id currentPositionLiftPercentageArgument; - currentPositionLiftPercentageArgument = [NSNumber numberWithUnsignedChar:200]; - [cluster writeAttributeCurrentPositionLiftPercentageWithValue:currentPositionLiftPercentageArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"5a: write a value into the RO optional attribute: " - @"CurrentPositionLiftPercentage Error: %@", - err); - - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], - EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; -} -- (void)testSendClusterTest_TC_WNCV_2_1_000051_ReadAttribute -{ - XCTestExpectation * expectation = - [self expectationWithDescription:@"5b: reads back the RO optional attribute: CurrentPositionLiftPercentage"]; - - CHIPDevice * device = GetConnectedDevice(); - dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:queue]; - XCTAssertNotNil(cluster); - - [cluster - readAttributeCurrentPositionLiftPercentageWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"5b: reads back the RO optional attribute: CurrentPositionLiftPercentage Error: %@", err); - - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); - - { - id actualValue = value; - if (actualValue != nil) { - XCTAssertNotEqual([actualValue unsignedCharValue], 200); - } - } - - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; -} -- (void)testSendClusterTest_TC_WNCV_2_1_000052_ReadAttribute +- (void)testSendClusterTest_TC_WNCV_2_1_000028_ReadAttribute { - XCTestExpectation * expectation = - [self expectationWithDescription:@"4: read the RO optional attribute default: CurrentPositionTiltPercentage"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"4: read the RO mandatory attribute default: SafetyStatus"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster - readAttributeCurrentPositionTiltPercentageWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"4: read the RO optional attribute default: CurrentPositionTiltPercentage Error: %@", err); + [cluster readAttributeSafetyStatusWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"4: read the RO mandatory attribute default: SafetyStatus Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); - { - id actualValue = value; - if (actualValue != nil) { - XCTAssertLessThanOrEqual([actualValue unsignedCharValue], 100); - } + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertLessThanOrEqual([actualValue unsignedShortValue], 2047); } + } - [expectation fulfill]; - }]; + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_WNCV_2_1_000053_WriteAttribute +- (void)testSendClusterTest_TC_WNCV_2_1_000029_WriteAttribute { XCTestExpectation * expectation = - [self expectationWithDescription:@"5a: write a value into the RO optional attribute: CurrentPositionTiltPercentage"]; + [self expectationWithDescription:@"5a: write a value into the RO mandatory attribute: SafetyStatus"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - id currentPositionTiltPercentageArgument; - currentPositionTiltPercentageArgument = [NSNumber numberWithUnsignedChar:200]; - [cluster writeAttributeCurrentPositionTiltPercentageWithValue:currentPositionTiltPercentageArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"5a: write a value into the RO optional attribute: " - @"CurrentPositionTiltPercentage Error: %@", - err); + id safetyStatusArgument; + safetyStatusArgument = [NSNumber numberWithUnsignedShort:4096U]; + [cluster writeAttributeSafetyStatusWithValue:safetyStatusArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"5a: write a value into the RO mandatory attribute: SafetyStatus Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], - EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); - [expectation fulfill]; - }]; + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_WNCV_2_1_000054_ReadAttribute +- (void)testSendClusterTest_TC_WNCV_2_1_000030_ReadAttribute { - XCTestExpectation * expectation = - [self expectationWithDescription:@"5b: reads back the RO optional attribute: CurrentPositionTiltPercentage"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"5b: reads back the RO mandatory attribute: SafetyStatus"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster - readAttributeCurrentPositionTiltPercentageWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"5b: reads back the RO optional attribute: CurrentPositionTiltPercentage Error: %@", err); + [cluster readAttributeSafetyStatusWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"5b: reads back the RO mandatory attribute: SafetyStatus Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); - { - id actualValue = value; - if (actualValue != nil) { - XCTAssertNotEqual([actualValue unsignedCharValue], 200); - } + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertNotEqual([actualValue unsignedShortValue], 4096); } + } - [expectation fulfill]; - }]; + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } 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 273a248180a573..0c370c6a6f0393 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 @@ -13426,24 +13426,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 d4bdc624334cc3..15a33e9228b439 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 @@ -19003,6 +19003,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 { @@ -19037,16 +19047,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. @@ -19349,9 +19349,9 @@ struct TypeInfo namespace CurrentPositionLift { struct TypeInfo { - using Type = DataModel::Nullable; - using DecodableType = DataModel::Nullable; - using DecodableArgType = const DataModel::Nullable &; + 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; } @@ -19361,9 +19361,9 @@ struct TypeInfo namespace CurrentPositionTilt { struct TypeInfo { - using Type = DataModel::Nullable; - using DecodableType = DataModel::Nullable; - using DecodableArgType = const DataModel::Nullable &; + 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; } @@ -19409,9 +19409,9 @@ struct TypeInfo namespace CurrentPositionLiftPercentage { struct TypeInfo { - using Type = DataModel::Nullable; - using DecodableType = DataModel::Nullable; - using DecodableArgType = const DataModel::Nullable &; + 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; } @@ -19421,9 +19421,9 @@ struct TypeInfo namespace CurrentPositionTiltPercentage { struct TypeInfo { - using Type = DataModel::Nullable; - using DecodableType = DataModel::Nullable; - using DecodableArgType = const DataModel::Nullable &; + 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; } @@ -19445,9 +19445,9 @@ struct TypeInfo namespace TargetPositionLiftPercent100ths { struct TypeInfo { - using Type = DataModel::Nullable; - using DecodableType = DataModel::Nullable; - using DecodableArgType = const DataModel::Nullable &; + 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; } @@ -19457,9 +19457,9 @@ struct TypeInfo namespace TargetPositionTiltPercent100ths { struct TypeInfo { - using Type = DataModel::Nullable; - using DecodableType = DataModel::Nullable; - using DecodableArgType = const DataModel::Nullable &; + 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; } @@ -19481,9 +19481,9 @@ struct TypeInfo namespace CurrentPositionLiftPercent100ths { struct TypeInfo { - using Type = DataModel::Nullable; - using DecodableType = DataModel::Nullable; - using DecodableArgType = const DataModel::Nullable &; + 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; } @@ -19493,9 +19493,9 @@ struct TypeInfo namespace CurrentPositionTiltPercent100ths { struct TypeInfo { - using Type = DataModel::Nullable; - using DecodableType = DataModel::Nullable; - using DecodableArgType = const DataModel::Nullable &; + 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; } @@ -19639,12 +19639,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/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index 0e489dfde8bbdd..6641b948040c39 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -29227,192 +29227,70 @@ class Test_TC_WNCV_2_1 : public TestCommand err = Test3bReadsBackTheRwMandatoryAttributeMode_15(); break; case 16: - ChipLogProgress(chipTool, - " ***** Test Step 16 : 2: read the RO optional attribute default: TargetPositionLiftPercent100ths\n"); - err = Test2ReadTheRoOptionalAttributeDefaultTargetPositionLiftPercent100ths_16(); + ChipLogProgress(chipTool, " ***** Test Step 16 : 2: read the RO optional attribute default: InstalledOpenLimitLift\n"); + err = Test2ReadTheRoOptionalAttributeDefaultInstalledOpenLimitLift_16(); break; case 17: - ChipLogProgress( - chipTool, - " ***** Test Step 17 : 3a: write a value into the RO optional attribute: TargetPositionLiftPercent100ths\n"); - err = Test3aWriteAValueIntoTheRoOptionalAttributeTargetPositionLiftPercent100ths_17(); + ChipLogProgress(chipTool, + " ***** Test Step 17 : 3a: write a value into the RO optional attribute: InstalledOpenLimitLift\n"); + err = Test3aWriteAValueIntoTheRoOptionalAttributeInstalledOpenLimitLift_17(); break; case 18: - ChipLogProgress(chipTool, - " ***** Test Step 18 : 3b: reads back the RO optional attribute: TargetPositionLiftPercent100ths\n"); - err = Test3bReadsBackTheRoOptionalAttributeTargetPositionLiftPercent100ths_18(); + ChipLogProgress(chipTool, " ***** Test Step 18 : 3b: reads back the RO optional attribute: InstalledOpenLimitLift\n"); + err = Test3bReadsBackTheRoOptionalAttributeInstalledOpenLimitLift_18(); break; case 19: ChipLogProgress(chipTool, - " ***** Test Step 19 : 2: read the RO optional attribute default: TargetPositionTiltPercent100ths\n"); - err = Test2ReadTheRoOptionalAttributeDefaultTargetPositionTiltPercent100ths_19(); + " ***** Test Step 19 : 2: read the RO optional attribute default: InstalledClosedLimitLift\n"); + err = Test2ReadTheRoOptionalAttributeDefaultInstalledClosedLimitLift_19(); break; case 20: - ChipLogProgress( - chipTool, - " ***** Test Step 20 : 3a: write a value into the RO optional attribute: TargetPositionTiltPercent100ths\n"); - err = Test3aWriteAValueIntoTheRoOptionalAttributeTargetPositionTiltPercent100ths_20(); + ChipLogProgress(chipTool, + " ***** Test Step 20 : 3a: write a value into the RO optional attribute: InstalledClosedLimitLift\n"); + err = Test3aWriteAValueIntoTheRoOptionalAttributeInstalledClosedLimitLift_20(); break; case 21: - ChipLogProgress(chipTool, - " ***** Test Step 21 : 3b: reads back the RO optional attribute: TargetPositionTiltPercent100ths\n"); - err = Test3bReadsBackTheRoOptionalAttributeTargetPositionTiltPercent100ths_21(); + ChipLogProgress(chipTool, " ***** Test Step 21 : 3b: reads back the RO optional attribute: InstalledClosedLimitLift\n"); + err = Test3bReadsBackTheRoOptionalAttributeInstalledClosedLimitLift_21(); break; case 22: - ChipLogProgress(chipTool, - " ***** Test Step 22 : 2: read the RO optional attribute default: CurrentPositionLiftPercent100ths\n"); - err = Test2ReadTheRoOptionalAttributeDefaultCurrentPositionLiftPercent100ths_22(); + ChipLogProgress(chipTool, " ***** Test Step 22 : 2: read the RO optional attribute default: InstalledOpenLimitTilt\n"); + err = Test2ReadTheRoOptionalAttributeDefaultInstalledOpenLimitTilt_22(); break; case 23: - ChipLogProgress( - chipTool, - " ***** Test Step 23 : 3a: write a value into the RO optional attribute: CurrentPositionLiftPercent100ths\n"); - err = Test3aWriteAValueIntoTheRoOptionalAttributeCurrentPositionLiftPercent100ths_23(); + ChipLogProgress(chipTool, + " ***** Test Step 23 : 3a: write a value into the RO optional attribute: InstalledOpenLimitTilt\n"); + err = Test3aWriteAValueIntoTheRoOptionalAttributeInstalledOpenLimitTilt_23(); break; case 24: - ChipLogProgress(chipTool, - " ***** Test Step 24 : 3b: reads back the RO optional attribute: CurrentPositionLiftPercent100ths\n"); - err = Test3bReadsBackTheRoOptionalAttributeCurrentPositionLiftPercent100ths_24(); + ChipLogProgress(chipTool, " ***** Test Step 24 : 3b: reads back the RO optional attribute: InstalledOpenLimitTilt\n"); + err = Test3bReadsBackTheRoOptionalAttributeInstalledOpenLimitTilt_24(); break; case 25: ChipLogProgress(chipTool, - " ***** Test Step 25 : 2: read the RO optional attribute default: CurrentPositionTiltPercent100ths\n"); - err = Test2ReadTheRoOptionalAttributeDefaultCurrentPositionTiltPercent100ths_25(); + " ***** Test Step 25 : 2: read the RO optional attribute default: InstalledClosedLimitTilt\n"); + err = Test2ReadTheRoOptionalAttributeDefaultInstalledClosedLimitTilt_25(); break; case 26: - ChipLogProgress( - chipTool, - " ***** Test Step 26 : 3a: write a value into the RO optional attribute: CurrentPositionTiltPercent100ths\n"); - err = Test3aWriteAValueIntoTheRoOptionalAttributeCurrentPositionTiltPercent100ths_26(); + ChipLogProgress(chipTool, + " ***** Test Step 26 : 3a: write a value into the RO optional attribute: InstalledClosedLimitTilt\n"); + err = Test3aWriteAValueIntoTheRoOptionalAttributeInstalledClosedLimitTilt_26(); break; case 27: - ChipLogProgress(chipTool, - " ***** Test Step 27 : 3b: reads back the RO optional attribute: CurrentPositionTiltPercent100ths\n"); - err = Test3bReadsBackTheRoOptionalAttributeCurrentPositionTiltPercent100ths_27(); + ChipLogProgress(chipTool, " ***** Test Step 27 : 3b: reads back the RO optional attribute: InstalledClosedLimitTilt\n"); + err = Test3bReadsBackTheRoOptionalAttributeInstalledClosedLimitTilt_27(); break; case 28: - ChipLogProgress(chipTool, " ***** Test Step 28 : 2: read the RO optional attribute default: InstalledOpenLimitLift\n"); - err = Test2ReadTheRoOptionalAttributeDefaultInstalledOpenLimitLift_28(); + ChipLogProgress(chipTool, " ***** Test Step 28 : 4: read the RO mandatory attribute default: SafetyStatus\n"); + err = Test4ReadTheRoMandatoryAttributeDefaultSafetyStatus_28(); break; case 29: - ChipLogProgress(chipTool, - " ***** Test Step 29 : 3a: write a value into the RO optional attribute: InstalledOpenLimitLift\n"); - err = Test3aWriteAValueIntoTheRoOptionalAttributeInstalledOpenLimitLift_29(); + ChipLogProgress(chipTool, " ***** Test Step 29 : 5a: write a value into the RO mandatory attribute: SafetyStatus\n"); + err = Test5aWriteAValueIntoTheRoMandatoryAttributeSafetyStatus_29(); break; case 30: - ChipLogProgress(chipTool, " ***** Test Step 30 : 3b: reads back the RO optional attribute: InstalledOpenLimitLift\n"); - err = Test3bReadsBackTheRoOptionalAttributeInstalledOpenLimitLift_30(); - break; - case 31: - ChipLogProgress(chipTool, - " ***** Test Step 31 : 2: read the RO optional attribute default: InstalledClosedLimitLift\n"); - err = Test2ReadTheRoOptionalAttributeDefaultInstalledClosedLimitLift_31(); - break; - case 32: - ChipLogProgress(chipTool, - " ***** Test Step 32 : 3a: write a value into the RO optional attribute: InstalledClosedLimitLift\n"); - err = Test3aWriteAValueIntoTheRoOptionalAttributeInstalledClosedLimitLift_32(); - break; - case 33: - ChipLogProgress(chipTool, " ***** Test Step 33 : 3b: reads back the RO optional attribute: InstalledClosedLimitLift\n"); - err = Test3bReadsBackTheRoOptionalAttributeInstalledClosedLimitLift_33(); - break; - case 34: - ChipLogProgress(chipTool, " ***** Test Step 34 : 2: read the RO optional attribute default: InstalledOpenLimitTilt\n"); - err = Test2ReadTheRoOptionalAttributeDefaultInstalledOpenLimitTilt_34(); - break; - case 35: - ChipLogProgress(chipTool, - " ***** Test Step 35 : 3a: write a value into the RO optional attribute: InstalledOpenLimitTilt\n"); - err = Test3aWriteAValueIntoTheRoOptionalAttributeInstalledOpenLimitTilt_35(); - break; - case 36: - ChipLogProgress(chipTool, " ***** Test Step 36 : 3b: reads back the RO optional attribute: InstalledOpenLimitTilt\n"); - err = Test3bReadsBackTheRoOptionalAttributeInstalledOpenLimitTilt_36(); - break; - case 37: - ChipLogProgress(chipTool, - " ***** Test Step 37 : 2: read the RO optional attribute default: InstalledClosedLimitTilt\n"); - err = Test2ReadTheRoOptionalAttributeDefaultInstalledClosedLimitTilt_37(); - break; - case 38: - ChipLogProgress(chipTool, - " ***** Test Step 38 : 3a: write a value into the RO optional attribute: InstalledClosedLimitTilt\n"); - err = Test3aWriteAValueIntoTheRoOptionalAttributeInstalledClosedLimitTilt_38(); - break; - case 39: - ChipLogProgress(chipTool, " ***** Test Step 39 : 3b: reads back the RO optional attribute: InstalledClosedLimitTilt\n"); - err = Test3bReadsBackTheRoOptionalAttributeInstalledClosedLimitTilt_39(); - break; - case 40: - ChipLogProgress(chipTool, " ***** Test Step 40 : 4: read the RO mandatory attribute default: SafetyStatus\n"); - err = Test4ReadTheRoMandatoryAttributeDefaultSafetyStatus_40(); - break; - case 41: - ChipLogProgress(chipTool, " ***** Test Step 41 : 5a: write a value into the RO mandatory attribute: SafetyStatus\n"); - err = Test5aWriteAValueIntoTheRoMandatoryAttributeSafetyStatus_41(); - break; - case 42: - ChipLogProgress(chipTool, " ***** Test Step 42 : 5b: reads back the RO mandatory attribute: SafetyStatus\n"); - err = Test5bReadsBackTheRoMandatoryAttributeSafetyStatus_42(); - break; - case 43: - ChipLogProgress(chipTool, " ***** Test Step 43 : 4: read the RO optional attribute default: CurrentPositionLift\n"); - err = Test4ReadTheRoOptionalAttributeDefaultCurrentPositionLift_43(); - break; - case 44: - ChipLogProgress(chipTool, - " ***** Test Step 44 : 5a: write a value into the RO optional attribute: CurrentPositionLift\n"); - err = Test5aWriteAValueIntoTheRoOptionalAttributeCurrentPositionLift_44(); - break; - case 45: - ChipLogProgress(chipTool, " ***** Test Step 45 : 5b: reads back the RO optional attribute: CurrentPositionLift\n"); - err = Test5bReadsBackTheRoOptionalAttributeCurrentPositionLift_45(); - break; - case 46: - ChipLogProgress(chipTool, " ***** Test Step 46 : 4: read the RO optional attribute default: CurrentPositionTilt\n"); - err = Test4ReadTheRoOptionalAttributeDefaultCurrentPositionTilt_46(); - break; - case 47: - ChipLogProgress(chipTool, - " ***** Test Step 47 : 5a: write a value into the RO optional attribute: CurrentPositionTilt\n"); - err = Test5aWriteAValueIntoTheRoOptionalAttributeCurrentPositionTilt_47(); - break; - case 48: - ChipLogProgress(chipTool, " ***** Test Step 48 : 5b: reads back the RO optional attribute: CurrentPositionTilt\n"); - err = Test5bReadsBackTheRoOptionalAttributeCurrentPositionTilt_48(); - break; - case 49: - ChipLogProgress(chipTool, - " ***** Test Step 49 : 4: read the RO optional attribute default: CurrentPositionLiftPercentage\n"); - err = Test4ReadTheRoOptionalAttributeDefaultCurrentPositionLiftPercentage_49(); - break; - case 50: - ChipLogProgress( - chipTool, - " ***** Test Step 50 : 5a: write a value into the RO optional attribute: CurrentPositionLiftPercentage\n"); - err = Test5aWriteAValueIntoTheRoOptionalAttributeCurrentPositionLiftPercentage_50(); - break; - case 51: - ChipLogProgress(chipTool, - " ***** Test Step 51 : 5b: reads back the RO optional attribute: CurrentPositionLiftPercentage\n"); - err = Test5bReadsBackTheRoOptionalAttributeCurrentPositionLiftPercentage_51(); - break; - case 52: - ChipLogProgress(chipTool, - " ***** Test Step 52 : 4: read the RO optional attribute default: CurrentPositionTiltPercentage\n"); - err = Test4ReadTheRoOptionalAttributeDefaultCurrentPositionTiltPercentage_52(); - break; - case 53: - ChipLogProgress( - chipTool, - " ***** Test Step 53 : 5a: write a value into the RO optional attribute: CurrentPositionTiltPercentage\n"); - err = Test5aWriteAValueIntoTheRoOptionalAttributeCurrentPositionTiltPercentage_53(); - break; - case 54: - ChipLogProgress(chipTool, - " ***** Test Step 54 : 5b: reads back the RO optional attribute: CurrentPositionTiltPercentage\n"); - err = Test5bReadsBackTheRoOptionalAttributeCurrentPositionTiltPercentage_54(); + ChipLogProgress(chipTool, " ***** Test Step 30 : 5b: reads back the RO mandatory attribute: SafetyStatus\n"); + err = Test5bReadsBackTheRoMandatoryAttributeSafetyStatus_30(); break; } @@ -29425,7 +29303,7 @@ class Test_TC_WNCV_2_1 : public TestCommand private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 55; + const uint16_t mTestCount = 31; static void OnFailureCallback_1(void * context, EmberAfStatus status) { @@ -29567,9 +29445,9 @@ 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, uint16_t installedOpenLimitLift) { - (static_cast(context))->OnSuccessResponse_16(targetPositionLiftPercent100ths); + (static_cast(context))->OnSuccessResponse_16(installedOpenLimitLift); } static void OnFailureCallback_17(void * context, EmberAfStatus status) @@ -29584,9 +29462,9 @@ 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, uint16_t installedOpenLimitLift) { - (static_cast(context))->OnSuccessResponse_18(targetPositionLiftPercent100ths); + (static_cast(context))->OnSuccessResponse_18(installedOpenLimitLift); } static void OnFailureCallback_19(void * context, EmberAfStatus status) @@ -29594,9 +29472,9 @@ 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, uint16_t installedClosedLimitLift) { - (static_cast(context))->OnSuccessResponse_19(targetPositionTiltPercent100ths); + (static_cast(context))->OnSuccessResponse_19(installedClosedLimitLift); } static void OnFailureCallback_20(void * context, EmberAfStatus status) @@ -29611,9 +29489,9 @@ 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, uint16_t installedClosedLimitLift) { - (static_cast(context))->OnSuccessResponse_21(targetPositionTiltPercent100ths); + (static_cast(context))->OnSuccessResponse_21(installedClosedLimitLift); } static void OnFailureCallback_22(void * context, EmberAfStatus status) @@ -29621,9 +29499,9 @@ 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, uint16_t installedOpenLimitTilt) { - (static_cast(context))->OnSuccessResponse_22(currentPositionLiftPercent100ths); + (static_cast(context))->OnSuccessResponse_22(installedOpenLimitTilt); } static void OnFailureCallback_23(void * context, EmberAfStatus status) @@ -29638,9 +29516,9 @@ 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, uint16_t installedOpenLimitTilt) { - (static_cast(context))->OnSuccessResponse_24(currentPositionLiftPercent100ths); + (static_cast(context))->OnSuccessResponse_24(installedOpenLimitTilt); } static void OnFailureCallback_25(void * context, EmberAfStatus status) @@ -29648,9 +29526,9 @@ 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, uint16_t installedClosedLimitTilt) { - (static_cast(context))->OnSuccessResponse_25(currentPositionTiltPercent100ths); + (static_cast(context))->OnSuccessResponse_25(installedClosedLimitTilt); } static void OnFailureCallback_26(void * context, EmberAfStatus status) @@ -29665,9 +29543,9 @@ 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, uint16_t installedClosedLimitTilt) { - (static_cast(context))->OnSuccessResponse_27(currentPositionTiltPercent100ths); + (static_cast(context))->OnSuccessResponse_27(installedClosedLimitTilt); } static void OnFailureCallback_28(void * context, EmberAfStatus status) @@ -29675,9 +29553,9 @@ class Test_TC_WNCV_2_1 : public TestCommand (static_cast(context))->OnFailureResponse_28(status); } - static void OnSuccessCallback_28(void * context, uint16_t installedOpenLimitLift) + static void OnSuccessCallback_28(void * context, uint16_t safetyStatus) { - (static_cast(context))->OnSuccessResponse_28(installedOpenLimitLift); + (static_cast(context))->OnSuccessResponse_28(safetyStatus); } static void OnFailureCallback_29(void * context, EmberAfStatus status) @@ -29692,225 +29570,9 @@ class Test_TC_WNCV_2_1 : public TestCommand (static_cast(context))->OnFailureResponse_30(status); } - static void OnSuccessCallback_30(void * context, uint16_t installedOpenLimitLift) - { - (static_cast(context))->OnSuccessResponse_30(installedOpenLimitLift); - } - - static void OnFailureCallback_31(void * context, EmberAfStatus status) - { - (static_cast(context))->OnFailureResponse_31(status); - } - - static void OnSuccessCallback_31(void * context, uint16_t installedClosedLimitLift) - { - (static_cast(context))->OnSuccessResponse_31(installedClosedLimitLift); - } - - static void OnFailureCallback_32(void * context, EmberAfStatus status) - { - (static_cast(context))->OnFailureResponse_32(status); - } - - static void OnSuccessCallback_32(void * context) { (static_cast(context))->OnSuccessResponse_32(); } - - static void OnFailureCallback_33(void * context, EmberAfStatus status) - { - (static_cast(context))->OnFailureResponse_33(status); - } - - static void OnSuccessCallback_33(void * context, uint16_t installedClosedLimitLift) - { - (static_cast(context))->OnSuccessResponse_33(installedClosedLimitLift); - } - - static void OnFailureCallback_34(void * context, EmberAfStatus status) - { - (static_cast(context))->OnFailureResponse_34(status); - } - - static void OnSuccessCallback_34(void * context, uint16_t installedOpenLimitTilt) - { - (static_cast(context))->OnSuccessResponse_34(installedOpenLimitTilt); - } - - static void OnFailureCallback_35(void * context, EmberAfStatus status) - { - (static_cast(context))->OnFailureResponse_35(status); - } - - static void OnSuccessCallback_35(void * context) { (static_cast(context))->OnSuccessResponse_35(); } - - static void OnFailureCallback_36(void * context, EmberAfStatus status) - { - (static_cast(context))->OnFailureResponse_36(status); - } - - static void OnSuccessCallback_36(void * context, uint16_t installedOpenLimitTilt) - { - (static_cast(context))->OnSuccessResponse_36(installedOpenLimitTilt); - } - - static void OnFailureCallback_37(void * context, EmberAfStatus status) - { - (static_cast(context))->OnFailureResponse_37(status); - } - - static void OnSuccessCallback_37(void * context, uint16_t installedClosedLimitTilt) - { - (static_cast(context))->OnSuccessResponse_37(installedClosedLimitTilt); - } - - static void OnFailureCallback_38(void * context, EmberAfStatus status) - { - (static_cast(context))->OnFailureResponse_38(status); - } - - static void OnSuccessCallback_38(void * context) { (static_cast(context))->OnSuccessResponse_38(); } - - static void OnFailureCallback_39(void * context, EmberAfStatus status) - { - (static_cast(context))->OnFailureResponse_39(status); - } - - static void OnSuccessCallback_39(void * context, uint16_t installedClosedLimitTilt) - { - (static_cast(context))->OnSuccessResponse_39(installedClosedLimitTilt); - } - - static void OnFailureCallback_40(void * context, EmberAfStatus status) - { - (static_cast(context))->OnFailureResponse_40(status); - } - - static void OnSuccessCallback_40(void * context, uint16_t safetyStatus) - { - (static_cast(context))->OnSuccessResponse_40(safetyStatus); - } - - static void OnFailureCallback_41(void * context, EmberAfStatus status) - { - (static_cast(context))->OnFailureResponse_41(status); - } - - static void OnSuccessCallback_41(void * context) { (static_cast(context))->OnSuccessResponse_41(); } - - static void OnFailureCallback_42(void * context, EmberAfStatus status) - { - (static_cast(context))->OnFailureResponse_42(status); - } - - static void OnSuccessCallback_42(void * context, uint16_t safetyStatus) - { - (static_cast(context))->OnSuccessResponse_42(safetyStatus); - } - - static void OnFailureCallback_43(void * context, EmberAfStatus status) - { - (static_cast(context))->OnFailureResponse_43(status); - } - - static void OnSuccessCallback_43(void * context, uint16_t currentPositionLift) - { - (static_cast(context))->OnSuccessResponse_43(currentPositionLift); - } - - static void OnFailureCallback_44(void * context, EmberAfStatus status) - { - (static_cast(context))->OnFailureResponse_44(status); - } - - static void OnSuccessCallback_44(void * context) { (static_cast(context))->OnSuccessResponse_44(); } - - static void OnFailureCallback_45(void * context, EmberAfStatus status) - { - (static_cast(context))->OnFailureResponse_45(status); - } - - static void OnSuccessCallback_45(void * context, uint16_t currentPositionLift) - { - (static_cast(context))->OnSuccessResponse_45(currentPositionLift); - } - - static void OnFailureCallback_46(void * context, EmberAfStatus status) - { - (static_cast(context))->OnFailureResponse_46(status); - } - - static void OnSuccessCallback_46(void * context, uint16_t currentPositionTilt) - { - (static_cast(context))->OnSuccessResponse_46(currentPositionTilt); - } - - static void OnFailureCallback_47(void * context, EmberAfStatus status) - { - (static_cast(context))->OnFailureResponse_47(status); - } - - static void OnSuccessCallback_47(void * context) { (static_cast(context))->OnSuccessResponse_47(); } - - static void OnFailureCallback_48(void * context, EmberAfStatus status) - { - (static_cast(context))->OnFailureResponse_48(status); - } - - static void OnSuccessCallback_48(void * context, uint16_t currentPositionTilt) - { - (static_cast(context))->OnSuccessResponse_48(currentPositionTilt); - } - - static void OnFailureCallback_49(void * context, EmberAfStatus status) - { - (static_cast(context))->OnFailureResponse_49(status); - } - - static void OnSuccessCallback_49(void * context, uint8_t currentPositionLiftPercentage) - { - (static_cast(context))->OnSuccessResponse_49(currentPositionLiftPercentage); - } - - static void OnFailureCallback_50(void * context, EmberAfStatus status) - { - (static_cast(context))->OnFailureResponse_50(status); - } - - static void OnSuccessCallback_50(void * context) { (static_cast(context))->OnSuccessResponse_50(); } - - static void OnFailureCallback_51(void * context, EmberAfStatus status) - { - (static_cast(context))->OnFailureResponse_51(status); - } - - static void OnSuccessCallback_51(void * context, uint8_t currentPositionLiftPercentage) - { - (static_cast(context))->OnSuccessResponse_51(currentPositionLiftPercentage); - } - - static void OnFailureCallback_52(void * context, EmberAfStatus status) - { - (static_cast(context))->OnFailureResponse_52(status); - } - - static void OnSuccessCallback_52(void * context, uint8_t currentPositionTiltPercentage) - { - (static_cast(context))->OnSuccessResponse_52(currentPositionTiltPercentage); - } - - static void OnFailureCallback_53(void * context, EmberAfStatus status) - { - (static_cast(context))->OnFailureResponse_53(status); - } - - static void OnSuccessCallback_53(void * context) { (static_cast(context))->OnSuccessResponse_53(); } - - static void OnFailureCallback_54(void * context, EmberAfStatus status) - { - (static_cast(context))->OnFailureResponse_54(status); - } - - static void OnSuccessCallback_54(void * context, uint8_t currentPositionTiltPercentage) + static void OnSuccessCallback_30(void * context, uint16_t safetyStatus) { - (static_cast(context))->OnSuccessResponse_54(currentPositionTiltPercentage); + (static_cast(context))->OnSuccessResponse_30(safetyStatus); } // @@ -30238,41 +29900,40 @@ class Test_TC_WNCV_2_1 : public TestCommand NextTest(); } - CHIP_ERROR Test2ReadTheRoOptionalAttributeDefaultTargetPositionLiftPercent100ths_16() + CHIP_ERROR Test2ReadTheRoOptionalAttributeDefaultInstalledOpenLimitLift_16() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure( - cluster.ReadAttribute( + cluster.ReadAttribute( this, OnSuccessCallback_16, OnFailureCallback_16)); return CHIP_NO_ERROR; } void OnFailureResponse_16(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_16(uint16_t targetPositionLiftPercent100ths) + void OnSuccessResponse_16(uint16_t installedOpenLimitLift) { - VerifyOrReturn(CheckConstraintType("targetPositionLiftPercent100ths", "", "uint16")); - VerifyOrReturn( - CheckConstraintMaxValue("targetPositionLiftPercent100ths", targetPositionLiftPercent100ths, 10000U)); + VerifyOrReturn(CheckConstraintType("installedOpenLimitLift", "", "uint16")); + VerifyOrReturn(CheckConstraintMaxValue("installedOpenLimitLift", installedOpenLimitLift, 65535U)); NextTest(); } - CHIP_ERROR Test3aWriteAValueIntoTheRoOptionalAttributeTargetPositionLiftPercent100ths_17() + CHIP_ERROR Test3aWriteAValueIntoTheRoOptionalAttributeInstalledOpenLimitLift_17() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - uint16_t targetPositionLiftPercent100thsArgument; - targetPositionLiftPercent100thsArgument = 20000U; + uint16_t installedOpenLimitLiftArgument; + installedOpenLimitLiftArgument = 255U; ReturnErrorOnFailure( - cluster.WriteAttribute( - targetPositionLiftPercent100thsArgument, this, OnSuccessCallback_17, OnFailureCallback_17)); + cluster.WriteAttribute( + installedOpenLimitLiftArgument, this, OnSuccessCallback_17, OnFailureCallback_17)); return CHIP_NO_ERROR; } @@ -30284,63 +29945,62 @@ class Test_TC_WNCV_2_1 : public TestCommand void OnSuccessResponse_17() { ThrowSuccessResponse(); } - CHIP_ERROR Test3bReadsBackTheRoOptionalAttributeTargetPositionLiftPercent100ths_18() + CHIP_ERROR Test3bReadsBackTheRoOptionalAttributeInstalledOpenLimitLift_18() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure( - cluster.ReadAttribute( + cluster.ReadAttribute( this, OnSuccessCallback_18, OnFailureCallback_18)); return CHIP_NO_ERROR; } void OnFailureResponse_18(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_18(uint16_t targetPositionLiftPercent100ths) + void OnSuccessResponse_18(uint16_t installedOpenLimitLift) { - VerifyOrReturn(CheckConstraintType("targetPositionLiftPercent100ths", "", "uint16")); - VerifyOrReturn(CheckConstraintNotValue("targetPositionLiftPercent100ths", targetPositionLiftPercent100ths, 20000U)); + VerifyOrReturn(CheckConstraintType("installedOpenLimitLift", "", "uint16")); + VerifyOrReturn(CheckConstraintMaxValue("installedOpenLimitLift", installedOpenLimitLift, 65535U)); NextTest(); } - CHIP_ERROR Test2ReadTheRoOptionalAttributeDefaultTargetPositionTiltPercent100ths_19() + CHIP_ERROR Test2ReadTheRoOptionalAttributeDefaultInstalledClosedLimitLift_19() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure( - cluster.ReadAttribute( + cluster.ReadAttribute( this, OnSuccessCallback_19, OnFailureCallback_19)); return CHIP_NO_ERROR; } void OnFailureResponse_19(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_19(uint16_t targetPositionTiltPercent100ths) + void OnSuccessResponse_19(uint16_t installedClosedLimitLift) { - VerifyOrReturn(CheckConstraintType("targetPositionTiltPercent100ths", "", "uint16")); - VerifyOrReturn( - CheckConstraintMaxValue("targetPositionTiltPercent100ths", targetPositionTiltPercent100ths, 10000U)); + VerifyOrReturn(CheckConstraintType("installedClosedLimitLift", "", "uint16")); + VerifyOrReturn(CheckConstraintMaxValue("installedClosedLimitLift", installedClosedLimitLift, 65535U)); NextTest(); } - CHIP_ERROR Test3aWriteAValueIntoTheRoOptionalAttributeTargetPositionTiltPercent100ths_20() + CHIP_ERROR Test3aWriteAValueIntoTheRoOptionalAttributeInstalledClosedLimitLift_20() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - uint16_t targetPositionTiltPercent100thsArgument; - targetPositionTiltPercent100thsArgument = 20000U; + uint16_t installedClosedLimitLiftArgument; + installedClosedLimitLiftArgument = 255U; ReturnErrorOnFailure( - cluster.WriteAttribute( - targetPositionTiltPercent100thsArgument, this, OnSuccessCallback_20, OnFailureCallback_20)); + cluster.WriteAttribute( + installedClosedLimitLiftArgument, this, OnSuccessCallback_20, OnFailureCallback_20)); return CHIP_NO_ERROR; } @@ -30352,313 +30012,43 @@ class Test_TC_WNCV_2_1 : public TestCommand void OnSuccessResponse_20() { ThrowSuccessResponse(); } - CHIP_ERROR Test3bReadsBackTheRoOptionalAttributeTargetPositionTiltPercent100ths_21() + CHIP_ERROR Test3bReadsBackTheRoOptionalAttributeInstalledClosedLimitLift_21() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure( - cluster.ReadAttribute( + cluster.ReadAttribute( this, OnSuccessCallback_21, OnFailureCallback_21)); return CHIP_NO_ERROR; } void OnFailureResponse_21(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_21(uint16_t targetPositionTiltPercent100ths) + void OnSuccessResponse_21(uint16_t installedClosedLimitLift) { - VerifyOrReturn(CheckConstraintType("targetPositionTiltPercent100ths", "", "uint16")); - VerifyOrReturn(CheckConstraintNotValue("targetPositionTiltPercent100ths", targetPositionTiltPercent100ths, 20000U)); + VerifyOrReturn(CheckConstraintType("installedClosedLimitLift", "", "uint16")); + VerifyOrReturn(CheckConstraintMaxValue("installedClosedLimitLift", installedClosedLimitLift, 65535U)); NextTest(); } - CHIP_ERROR Test2ReadTheRoOptionalAttributeDefaultCurrentPositionLiftPercent100ths_22() + CHIP_ERROR Test2ReadTheRoOptionalAttributeDefaultInstalledOpenLimitTilt_22() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure( - cluster.ReadAttribute( + cluster.ReadAttribute( this, OnSuccessCallback_22, OnFailureCallback_22)); return CHIP_NO_ERROR; } void OnFailureResponse_22(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_22(uint16_t currentPositionLiftPercent100ths) - { - VerifyOrReturn(CheckConstraintType("currentPositionLiftPercent100ths", "", "uint16")); - VerifyOrReturn( - CheckConstraintMaxValue("currentPositionLiftPercent100ths", currentPositionLiftPercent100ths, 10000U)); - - NextTest(); - } - - CHIP_ERROR Test3aWriteAValueIntoTheRoOptionalAttributeCurrentPositionLiftPercent100ths_23() - { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; - chip::Controller::WindowCoveringClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - uint16_t currentPositionLiftPercent100thsArgument; - currentPositionLiftPercent100thsArgument = 20000U; - - ReturnErrorOnFailure( - cluster.WriteAttribute( - currentPositionLiftPercent100thsArgument, this, OnSuccessCallback_23, OnFailureCallback_23)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_23(EmberAfStatus status) - { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - } - - void OnSuccessResponse_23() { ThrowSuccessResponse(); } - - CHIP_ERROR Test3bReadsBackTheRoOptionalAttributeCurrentPositionLiftPercent100ths_24() - { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; - chip::Controller::WindowCoveringClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure( - cluster.ReadAttribute( - this, OnSuccessCallback_24, OnFailureCallback_24)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_24(EmberAfStatus status) { ThrowFailureResponse(); } - - void OnSuccessResponse_24(uint16_t currentPositionLiftPercent100ths) - { - VerifyOrReturn(CheckConstraintType("currentPositionLiftPercent100ths", "", "uint16")); - VerifyOrReturn(CheckConstraintNotValue("currentPositionLiftPercent100ths", currentPositionLiftPercent100ths, 20000U)); - - NextTest(); - } - - CHIP_ERROR Test2ReadTheRoOptionalAttributeDefaultCurrentPositionTiltPercent100ths_25() - { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; - chip::Controller::WindowCoveringClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure( - cluster.ReadAttribute( - this, OnSuccessCallback_25, OnFailureCallback_25)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_25(EmberAfStatus status) { ThrowFailureResponse(); } - - void OnSuccessResponse_25(uint16_t currentPositionTiltPercent100ths) - { - VerifyOrReturn(CheckConstraintType("currentPositionTiltPercent100ths", "", "uint16")); - VerifyOrReturn( - CheckConstraintMaxValue("currentPositionTiltPercent100ths", currentPositionTiltPercent100ths, 10000U)); - - NextTest(); - } - - CHIP_ERROR Test3aWriteAValueIntoTheRoOptionalAttributeCurrentPositionTiltPercent100ths_26() - { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; - chip::Controller::WindowCoveringClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - uint16_t currentPositionTiltPercent100thsArgument; - currentPositionTiltPercent100thsArgument = 20000U; - - ReturnErrorOnFailure( - cluster.WriteAttribute( - currentPositionTiltPercent100thsArgument, this, OnSuccessCallback_26, OnFailureCallback_26)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_26(EmberAfStatus status) - { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - } - - void OnSuccessResponse_26() { ThrowSuccessResponse(); } - - CHIP_ERROR Test3bReadsBackTheRoOptionalAttributeCurrentPositionTiltPercent100ths_27() - { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; - chip::Controller::WindowCoveringClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure( - cluster.ReadAttribute( - this, OnSuccessCallback_27, OnFailureCallback_27)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_27(EmberAfStatus status) { ThrowFailureResponse(); } - - void OnSuccessResponse_27(uint16_t currentPositionTiltPercent100ths) - { - VerifyOrReturn(CheckConstraintType("currentPositionTiltPercent100ths", "", "uint16")); - VerifyOrReturn(CheckConstraintNotValue("currentPositionTiltPercent100ths", currentPositionTiltPercent100ths, 20000U)); - - NextTest(); - } - - CHIP_ERROR Test2ReadTheRoOptionalAttributeDefaultInstalledOpenLimitLift_28() - { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; - chip::Controller::WindowCoveringClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure( - cluster.ReadAttribute( - this, OnSuccessCallback_28, OnFailureCallback_28)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_28(EmberAfStatus status) { ThrowFailureResponse(); } - - void OnSuccessResponse_28(uint16_t installedOpenLimitLift) - { - VerifyOrReturn(CheckConstraintType("installedOpenLimitLift", "", "uint16")); - VerifyOrReturn(CheckConstraintMaxValue("installedOpenLimitLift", installedOpenLimitLift, 65535U)); - - NextTest(); - } - - CHIP_ERROR Test3aWriteAValueIntoTheRoOptionalAttributeInstalledOpenLimitLift_29() - { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; - chip::Controller::WindowCoveringClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - uint16_t installedOpenLimitLiftArgument; - installedOpenLimitLiftArgument = 255U; - - ReturnErrorOnFailure( - cluster.WriteAttribute( - installedOpenLimitLiftArgument, this, OnSuccessCallback_29, OnFailureCallback_29)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_29(EmberAfStatus status) - { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - } - - void OnSuccessResponse_29() { ThrowSuccessResponse(); } - - CHIP_ERROR Test3bReadsBackTheRoOptionalAttributeInstalledOpenLimitLift_30() - { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; - chip::Controller::WindowCoveringClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure( - cluster.ReadAttribute( - this, OnSuccessCallback_30, OnFailureCallback_30)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_30(EmberAfStatus status) { ThrowFailureResponse(); } - - void OnSuccessResponse_30(uint16_t installedOpenLimitLift) - { - VerifyOrReturn(CheckConstraintType("installedOpenLimitLift", "", "uint16")); - VerifyOrReturn(CheckConstraintMaxValue("installedOpenLimitLift", installedOpenLimitLift, 65535U)); - - NextTest(); - } - - CHIP_ERROR Test2ReadTheRoOptionalAttributeDefaultInstalledClosedLimitLift_31() - { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; - chip::Controller::WindowCoveringClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure( - cluster.ReadAttribute( - this, OnSuccessCallback_31, OnFailureCallback_31)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_31(EmberAfStatus status) { ThrowFailureResponse(); } - - void OnSuccessResponse_31(uint16_t installedClosedLimitLift) - { - VerifyOrReturn(CheckConstraintType("installedClosedLimitLift", "", "uint16")); - VerifyOrReturn(CheckConstraintMaxValue("installedClosedLimitLift", installedClosedLimitLift, 65535U)); - - NextTest(); - } - - CHIP_ERROR Test3aWriteAValueIntoTheRoOptionalAttributeInstalledClosedLimitLift_32() - { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; - chip::Controller::WindowCoveringClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - uint16_t installedClosedLimitLiftArgument; - installedClosedLimitLiftArgument = 255U; - - ReturnErrorOnFailure( - cluster.WriteAttribute( - installedClosedLimitLiftArgument, this, OnSuccessCallback_32, OnFailureCallback_32)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_32(EmberAfStatus status) - { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - } - - void OnSuccessResponse_32() { ThrowSuccessResponse(); } - - CHIP_ERROR Test3bReadsBackTheRoOptionalAttributeInstalledClosedLimitLift_33() - { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; - chip::Controller::WindowCoveringClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure( - cluster.ReadAttribute( - this, OnSuccessCallback_33, OnFailureCallback_33)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_33(EmberAfStatus status) { ThrowFailureResponse(); } - - void OnSuccessResponse_33(uint16_t installedClosedLimitLift) - { - VerifyOrReturn(CheckConstraintType("installedClosedLimitLift", "", "uint16")); - VerifyOrReturn(CheckConstraintMaxValue("installedClosedLimitLift", installedClosedLimitLift, 65535U)); - - NextTest(); - } - - CHIP_ERROR Test2ReadTheRoOptionalAttributeDefaultInstalledOpenLimitTilt_34() - { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; - chip::Controller::WindowCoveringClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure( - cluster.ReadAttribute( - this, OnSuccessCallback_34, OnFailureCallback_34)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_34(EmberAfStatus status) { ThrowFailureResponse(); } - - void OnSuccessResponse_34(uint16_t installedOpenLimitTilt) + void OnSuccessResponse_22(uint16_t installedOpenLimitTilt) { VerifyOrReturn(CheckConstraintType("installedOpenLimitTilt", "", "uint16")); VerifyOrReturn(CheckConstraintMaxValue("installedOpenLimitTilt", installedOpenLimitTilt, 65535U)); @@ -30666,7 +30056,7 @@ class Test_TC_WNCV_2_1 : public TestCommand NextTest(); } - CHIP_ERROR Test3aWriteAValueIntoTheRoOptionalAttributeInstalledOpenLimitTilt_35() + CHIP_ERROR Test3aWriteAValueIntoTheRoOptionalAttributeInstalledOpenLimitTilt_23() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::WindowCoveringClusterTest cluster; @@ -30677,19 +30067,19 @@ class Test_TC_WNCV_2_1 : public TestCommand ReturnErrorOnFailure( cluster.WriteAttribute( - installedOpenLimitTiltArgument, this, OnSuccessCallback_35, OnFailureCallback_35)); + installedOpenLimitTiltArgument, this, OnSuccessCallback_23, OnFailureCallback_23)); return CHIP_NO_ERROR; } - void OnFailureResponse_35(EmberAfStatus status) + void OnFailureResponse_23(EmberAfStatus status) { VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); NextTest(); } - void OnSuccessResponse_35() { ThrowSuccessResponse(); } + void OnSuccessResponse_23() { ThrowSuccessResponse(); } - CHIP_ERROR Test3bReadsBackTheRoOptionalAttributeInstalledOpenLimitTilt_36() + CHIP_ERROR Test3bReadsBackTheRoOptionalAttributeInstalledOpenLimitTilt_24() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::WindowCoveringClusterTest cluster; @@ -30697,13 +30087,13 @@ class Test_TC_WNCV_2_1 : public TestCommand ReturnErrorOnFailure( cluster.ReadAttribute( - this, OnSuccessCallback_36, OnFailureCallback_36)); + this, OnSuccessCallback_24, OnFailureCallback_24)); return CHIP_NO_ERROR; } - void OnFailureResponse_36(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_24(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_36(uint16_t installedOpenLimitTilt) + void OnSuccessResponse_24(uint16_t installedOpenLimitTilt) { VerifyOrReturn(CheckConstraintType("installedOpenLimitTilt", "", "uint16")); VerifyOrReturn(CheckConstraintMaxValue("installedOpenLimitTilt", installedOpenLimitTilt, 65535U)); @@ -30711,7 +30101,7 @@ class Test_TC_WNCV_2_1 : public TestCommand NextTest(); } - CHIP_ERROR Test2ReadTheRoOptionalAttributeDefaultInstalledClosedLimitTilt_37() + CHIP_ERROR Test2ReadTheRoOptionalAttributeDefaultInstalledClosedLimitTilt_25() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::WindowCoveringClusterTest cluster; @@ -30719,13 +30109,13 @@ class Test_TC_WNCV_2_1 : public TestCommand ReturnErrorOnFailure( cluster.ReadAttribute( - this, OnSuccessCallback_37, OnFailureCallback_37)); + this, OnSuccessCallback_25, OnFailureCallback_25)); return CHIP_NO_ERROR; } - void OnFailureResponse_37(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_25(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_37(uint16_t installedClosedLimitTilt) + void OnSuccessResponse_25(uint16_t installedClosedLimitTilt) { VerifyOrReturn(CheckConstraintType("installedClosedLimitTilt", "", "uint16")); VerifyOrReturn(CheckConstraintMaxValue("installedClosedLimitTilt", installedClosedLimitTilt, 65535U)); @@ -30733,7 +30123,7 @@ class Test_TC_WNCV_2_1 : public TestCommand NextTest(); } - CHIP_ERROR Test3aWriteAValueIntoTheRoOptionalAttributeInstalledClosedLimitTilt_38() + CHIP_ERROR Test3aWriteAValueIntoTheRoOptionalAttributeInstalledClosedLimitTilt_26() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::WindowCoveringClusterTest cluster; @@ -30744,19 +30134,19 @@ class Test_TC_WNCV_2_1 : public TestCommand ReturnErrorOnFailure( cluster.WriteAttribute( - installedClosedLimitTiltArgument, this, OnSuccessCallback_38, OnFailureCallback_38)); + installedClosedLimitTiltArgument, this, OnSuccessCallback_26, OnFailureCallback_26)); return CHIP_NO_ERROR; } - void OnFailureResponse_38(EmberAfStatus status) + void OnFailureResponse_26(EmberAfStatus status) { VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); NextTest(); } - void OnSuccessResponse_38() { ThrowSuccessResponse(); } + void OnSuccessResponse_26() { ThrowSuccessResponse(); } - CHIP_ERROR Test3bReadsBackTheRoOptionalAttributeInstalledClosedLimitTilt_39() + CHIP_ERROR Test3bReadsBackTheRoOptionalAttributeInstalledClosedLimitTilt_27() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::WindowCoveringClusterTest cluster; @@ -30764,13 +30154,13 @@ class Test_TC_WNCV_2_1 : public TestCommand ReturnErrorOnFailure( cluster.ReadAttribute( - this, OnSuccessCallback_39, OnFailureCallback_39)); + this, OnSuccessCallback_27, OnFailureCallback_27)); return CHIP_NO_ERROR; } - void OnFailureResponse_39(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_27(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_39(uint16_t installedClosedLimitTilt) + void OnSuccessResponse_27(uint16_t installedClosedLimitTilt) { VerifyOrReturn(CheckConstraintType("installedClosedLimitTilt", "", "uint16")); VerifyOrReturn(CheckConstraintMaxValue("installedClosedLimitTilt", installedClosedLimitTilt, 65535U)); @@ -30778,20 +30168,20 @@ class Test_TC_WNCV_2_1 : public TestCommand NextTest(); } - CHIP_ERROR Test4ReadTheRoMandatoryAttributeDefaultSafetyStatus_40() + CHIP_ERROR Test4ReadTheRoMandatoryAttributeDefaultSafetyStatus_28() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_40, OnFailureCallback_40)); + this, OnSuccessCallback_28, OnFailureCallback_28)); return CHIP_NO_ERROR; } - void OnFailureResponse_40(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_28(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_40(uint16_t safetyStatus) + void OnSuccessResponse_28(uint16_t safetyStatus) { VerifyOrReturn(CheckConstraintType("safetyStatus", "", "map16")); VerifyOrReturn(CheckConstraintMaxValue("safetyStatus", safetyStatus, 2047U)); @@ -30799,7 +30189,7 @@ class Test_TC_WNCV_2_1 : public TestCommand NextTest(); } - CHIP_ERROR Test5aWriteAValueIntoTheRoMandatoryAttributeSafetyStatus_41() + CHIP_ERROR Test5aWriteAValueIntoTheRoMandatoryAttributeSafetyStatus_29() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::WindowCoveringClusterTest cluster; @@ -30809,300 +30199,38 @@ class Test_TC_WNCV_2_1 : public TestCommand safetyStatusArgument = 4096U; ReturnErrorOnFailure(cluster.WriteAttribute( - safetyStatusArgument, this, OnSuccessCallback_41, OnFailureCallback_41)); + safetyStatusArgument, this, OnSuccessCallback_29, OnFailureCallback_29)); return CHIP_NO_ERROR; } - void OnFailureResponse_41(EmberAfStatus status) + void OnFailureResponse_29(EmberAfStatus status) { VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); NextTest(); } - void OnSuccessResponse_41() { ThrowSuccessResponse(); } + void OnSuccessResponse_29() { ThrowSuccessResponse(); } - CHIP_ERROR Test5bReadsBackTheRoMandatoryAttributeSafetyStatus_42() + CHIP_ERROR Test5bReadsBackTheRoMandatoryAttributeSafetyStatus_30() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_42, OnFailureCallback_42)); + this, OnSuccessCallback_30, OnFailureCallback_30)); return CHIP_NO_ERROR; } - void OnFailureResponse_42(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_30(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_42(uint16_t safetyStatus) + void OnSuccessResponse_30(uint16_t safetyStatus) { VerifyOrReturn(CheckConstraintType("safetyStatus", "", "map16")); VerifyOrReturn(CheckConstraintNotValue("safetyStatus", safetyStatus, 4096U)); NextTest(); } - - CHIP_ERROR Test4ReadTheRoOptionalAttributeDefaultCurrentPositionLift_43() - { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; - chip::Controller::WindowCoveringClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_43, OnFailureCallback_43)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_43(EmberAfStatus status) { ThrowFailureResponse(); } - - void OnSuccessResponse_43(uint16_t currentPositionLift) - { - VerifyOrReturn(CheckConstraintType("currentPositionLift", "", "uint16")); - VerifyOrReturn(CheckConstraintMaxValue("currentPositionLift", currentPositionLift, 65535U)); - - NextTest(); - } - - CHIP_ERROR Test5aWriteAValueIntoTheRoOptionalAttributeCurrentPositionLift_44() - { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; - chip::Controller::WindowCoveringClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - uint16_t currentPositionLiftArgument; - currentPositionLiftArgument = 255U; - - ReturnErrorOnFailure(cluster.WriteAttribute( - currentPositionLiftArgument, this, OnSuccessCallback_44, OnFailureCallback_44)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_44(EmberAfStatus status) - { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - } - - void OnSuccessResponse_44() { ThrowSuccessResponse(); } - - CHIP_ERROR Test5bReadsBackTheRoOptionalAttributeCurrentPositionLift_45() - { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; - chip::Controller::WindowCoveringClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_45, OnFailureCallback_45)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_45(EmberAfStatus status) { ThrowFailureResponse(); } - - void OnSuccessResponse_45(uint16_t currentPositionLift) - { - VerifyOrReturn(CheckConstraintType("currentPositionLift", "", "uint16")); - VerifyOrReturn(CheckConstraintMaxValue("currentPositionLift", currentPositionLift, 65535U)); - - NextTest(); - } - - CHIP_ERROR Test4ReadTheRoOptionalAttributeDefaultCurrentPositionTilt_46() - { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; - chip::Controller::WindowCoveringClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_46, OnFailureCallback_46)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_46(EmberAfStatus status) { ThrowFailureResponse(); } - - void OnSuccessResponse_46(uint16_t currentPositionTilt) - { - VerifyOrReturn(CheckConstraintType("currentPositionTilt", "", "uint16")); - VerifyOrReturn(CheckConstraintMaxValue("currentPositionTilt", currentPositionTilt, 65535U)); - - NextTest(); - } - - CHIP_ERROR Test5aWriteAValueIntoTheRoOptionalAttributeCurrentPositionTilt_47() - { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; - chip::Controller::WindowCoveringClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - uint16_t currentPositionTiltArgument; - currentPositionTiltArgument = 255U; - - ReturnErrorOnFailure(cluster.WriteAttribute( - currentPositionTiltArgument, this, OnSuccessCallback_47, OnFailureCallback_47)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_47(EmberAfStatus status) - { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - } - - void OnSuccessResponse_47() { ThrowSuccessResponse(); } - - CHIP_ERROR Test5bReadsBackTheRoOptionalAttributeCurrentPositionTilt_48() - { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; - chip::Controller::WindowCoveringClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_48, OnFailureCallback_48)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_48(EmberAfStatus status) { ThrowFailureResponse(); } - - void OnSuccessResponse_48(uint16_t currentPositionTilt) - { - VerifyOrReturn(CheckConstraintType("currentPositionTilt", "", "uint16")); - VerifyOrReturn(CheckConstraintMaxValue("currentPositionTilt", currentPositionTilt, 65535U)); - - NextTest(); - } - - CHIP_ERROR Test4ReadTheRoOptionalAttributeDefaultCurrentPositionLiftPercentage_49() - { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; - chip::Controller::WindowCoveringClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure( - cluster.ReadAttribute( - this, OnSuccessCallback_49, OnFailureCallback_49)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_49(EmberAfStatus status) { ThrowFailureResponse(); } - - void OnSuccessResponse_49(uint8_t currentPositionLiftPercentage) - { - VerifyOrReturn(CheckConstraintType("currentPositionLiftPercentage", "", "uint8")); - VerifyOrReturn(CheckConstraintMaxValue("currentPositionLiftPercentage", currentPositionLiftPercentage, 100)); - - NextTest(); - } - - CHIP_ERROR Test5aWriteAValueIntoTheRoOptionalAttributeCurrentPositionLiftPercentage_50() - { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; - chip::Controller::WindowCoveringClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - uint8_t currentPositionLiftPercentageArgument; - currentPositionLiftPercentageArgument = 200; - - ReturnErrorOnFailure( - cluster.WriteAttribute( - currentPositionLiftPercentageArgument, this, OnSuccessCallback_50, OnFailureCallback_50)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_50(EmberAfStatus status) - { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - } - - void OnSuccessResponse_50() { ThrowSuccessResponse(); } - - CHIP_ERROR Test5bReadsBackTheRoOptionalAttributeCurrentPositionLiftPercentage_51() - { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; - chip::Controller::WindowCoveringClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure( - cluster.ReadAttribute( - this, OnSuccessCallback_51, OnFailureCallback_51)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_51(EmberAfStatus status) { ThrowFailureResponse(); } - - void OnSuccessResponse_51(uint8_t currentPositionLiftPercentage) - { - VerifyOrReturn(CheckConstraintType("currentPositionLiftPercentage", "", "uint8")); - VerifyOrReturn(CheckConstraintNotValue("currentPositionLiftPercentage", currentPositionLiftPercentage, 200)); - - NextTest(); - } - - CHIP_ERROR Test4ReadTheRoOptionalAttributeDefaultCurrentPositionTiltPercentage_52() - { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; - chip::Controller::WindowCoveringClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure( - cluster.ReadAttribute( - this, OnSuccessCallback_52, OnFailureCallback_52)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_52(EmberAfStatus status) { ThrowFailureResponse(); } - - void OnSuccessResponse_52(uint8_t currentPositionTiltPercentage) - { - VerifyOrReturn(CheckConstraintType("currentPositionTiltPercentage", "", "uint8")); - VerifyOrReturn(CheckConstraintMaxValue("currentPositionTiltPercentage", currentPositionTiltPercentage, 100)); - - NextTest(); - } - - CHIP_ERROR Test5aWriteAValueIntoTheRoOptionalAttributeCurrentPositionTiltPercentage_53() - { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; - chip::Controller::WindowCoveringClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - uint8_t currentPositionTiltPercentageArgument; - currentPositionTiltPercentageArgument = 200; - - ReturnErrorOnFailure( - cluster.WriteAttribute( - currentPositionTiltPercentageArgument, this, OnSuccessCallback_53, OnFailureCallback_53)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_53(EmberAfStatus status) - { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - } - - void OnSuccessResponse_53() { ThrowSuccessResponse(); } - - CHIP_ERROR Test5bReadsBackTheRoOptionalAttributeCurrentPositionTiltPercentage_54() - { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; - chip::Controller::WindowCoveringClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure( - cluster.ReadAttribute( - this, OnSuccessCallback_54, OnFailureCallback_54)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_54(EmberAfStatus status) { ThrowFailureResponse(); } - - void OnSuccessResponse_54(uint8_t currentPositionTiltPercentage) - { - VerifyOrReturn(CheckConstraintType("currentPositionTiltPercentage", "", "uint8")); - VerifyOrReturn(CheckConstraintNotValue("currentPositionTiltPercentage", currentPositionTiltPercentage, 200)); - - NextTest(); - } }; class Test_TC_WNCV_2_2 : public TestCommand