diff --git a/examples/bridge-app/esp32/main/main.cpp b/examples/bridge-app/esp32/main/main.cpp index 81f195230085cd..cf5b5fe88ba5f8 100644 --- a/examples/bridge-app/esp32/main/main.cpp +++ b/examples/bridge-app/esp32/main/main.cpp @@ -334,7 +334,7 @@ void HandleDeviceStatusChanged(Device * dev, Device::Changed_t itemChangedMask) uint8_t buffer[kFixedLabelAttributeArraySize]; EmberAfAttributeMetadata am = { .attributeId = ZCL_LABEL_LIST_ATTRIBUTE_ID, .size = kFixedLabelAttributeArraySize, - .defaultValue = nullptr }; + .defaultValue = static_cast(0) }; EncodeFixedLabel("room", dev->GetLocation(), buffer, sizeof(buffer), &am); diff --git a/examples/bridge-app/linux/main.cpp b/examples/bridge-app/linux/main.cpp index 3f8ca3fceb3398..16b2a54da783d7 100644 --- a/examples/bridge-app/linux/main.cpp +++ b/examples/bridge-app/linux/main.cpp @@ -280,7 +280,7 @@ void HandleDeviceStatusChanged(Device * dev, Device::Changed_t itemChangedMask) uint8_t buffer[kFixedLabelAttributeArraySize]; EmberAfAttributeMetadata am = { .attributeId = ZCL_LABEL_LIST_ATTRIBUTE_ID, .size = kFixedLabelAttributeArraySize, - .defaultValue = nullptr }; + .defaultValue = static_cast(0) }; EncodeFixedLabel("room", dev->GetLocation(), buffer, sizeof(buffer), &am); diff --git a/src/app/clusters/level-control/level-control.cpp b/src/app/clusters/level-control/level-control.cpp index e7c5bf07c9035b..7e0b574bc994f7 100644 --- a/src/app/clusters/level-control/level-control.cpp +++ b/src/app/clusters/level-control/level-control.cpp @@ -700,9 +700,9 @@ static void moveHandler(CommandId commandId, uint8_t moveMode, uint8_t rate, uin // Otherwise, move as fast as possible if (rate == 0xFF) { - uint8_t defaultMoveRate; - status = Attributes::DefaultMoveRate::Get(endpoint, &defaultMoveRate); - if (status != EMBER_ZCL_STATUS_SUCCESS) + app::DataModel::Nullable defaultMoveRate; + status = Attributes::DefaultMoveRate::Get(endpoint, defaultMoveRate); + if (status != EMBER_ZCL_STATUS_SUCCESS || defaultMoveRate.IsNull()) { emberAfLevelControlClusterPrintln("ERR: reading default move rate %x", status); state->eventDurationMs = FASTEST_TRANSITION_TIME_MS; @@ -710,12 +710,12 @@ static void moveHandler(CommandId commandId, uint8_t moveMode, uint8_t rate, uin else { // nonsensical case, means "don't move", so we're done - if (defaultMoveRate == 0) + if (defaultMoveRate.Value() == 0) { status = EMBER_ZCL_STATUS_SUCCESS; goto send_default_response; } - state->eventDurationMs = MILLISECOND_TICKS_PER_SECOND / defaultMoveRate; + state->eventDurationMs = MILLISECOND_TICKS_PER_SECOND / defaultMoveRate.Value(); } } else diff --git a/src/app/util/af-types.h b/src/app/util/af-types.h index 3f521173e79eef..73d9f646c12577 100644 --- a/src/app/util/af-types.h +++ b/src/app/util/af-types.h @@ -101,7 +101,7 @@ typedef void (*EmberAfGenericClusterFunction)(void); */ union EmberAfDefaultAttributeValue { - constexpr EmberAfDefaultAttributeValue(uint8_t * ptr) : ptrToDefaultValue(ptr) {} + constexpr EmberAfDefaultAttributeValue(const uint8_t * ptr) : ptrToDefaultValue(ptr) {} constexpr EmberAfDefaultAttributeValue(uint16_t val) : defaultValue(val) {} /** @@ -109,7 +109,7 @@ union EmberAfDefaultAttributeValue * If size is more than 2 bytes, and this value is NULL, * then the default value is all zeroes. */ - uint8_t * ptrToDefaultValue; + const uint8_t * ptrToDefaultValue; /** * Actual default value if the attribute size is 2 bytes or less. @@ -144,15 +144,16 @@ typedef struct */ union EmberAfDefaultOrMinMaxAttributeValue { - constexpr EmberAfDefaultOrMinMaxAttributeValue(uint8_t * ptr) : ptrToDefaultValue(ptr) {} + constexpr EmberAfDefaultOrMinMaxAttributeValue(const uint8_t * ptr) : ptrToDefaultValue(ptr) {} constexpr EmberAfDefaultOrMinMaxAttributeValue(uint16_t val) : defaultValue(val) {} + constexpr EmberAfDefaultOrMinMaxAttributeValue(const EmberAfAttributeMinMaxValue * ptr) : ptrToMinMaxValue(ptr) {} /** * Points to data if size is more than 2 bytes. * If size is more than 2 bytes, and this value is NULL, * then the default value is all zeroes. */ - uint8_t * ptrToDefaultValue; + const uint8_t * ptrToDefaultValue; /** * Actual default value if the attribute size is 2 bytes or less. */ @@ -161,7 +162,7 @@ union EmberAfDefaultOrMinMaxAttributeValue * Points to the min max attribute value structure, if min/max is * supported for this attribute. */ - EmberAfAttributeMinMaxValue * ptrToMinMaxValue; + const EmberAfAttributeMinMaxValue * ptrToMinMaxValue; }; // Attribute masks modify how attributes are used by the framework diff --git a/src/app/util/af.h b/src/app/util/af.h index 2a9824fffb7a4d..a0a743c9c0cee2 100644 --- a/src/app/util/af.h +++ b/src/app/util/af.h @@ -732,7 +732,7 @@ uint8_t emberAfGetLastSequenceNumber(void); * greater than 4 is being compared * 1, if val2 is smaller. */ -int8_t emberAfCompareValues(uint8_t * val1, uint8_t * val2, uint16_t len, bool signedNumber); +int8_t emberAfCompareValues(const uint8_t * val1, const uint8_t * val2, uint16_t len, bool signedNumber); /** * @brief populates the passed EUI64 with the local EUI64 MAC address. diff --git a/src/app/util/attribute-storage.cpp b/src/app/util/attribute-storage.cpp index b542a224d31771..7cdd712a33ec12 100644 --- a/src/app/util/attribute-storage.cpp +++ b/src/app/util/attribute-storage.cpp @@ -68,6 +68,8 @@ EmberAfDefinedEndpoint emAfEndpoints[MAX_ENDPOINT_COUNT]; uint8_t attributeData[ACTUAL_ATTRIBUTE_SIZE]; +namespace { + #if (!defined(ATTRIBUTE_SINGLETONS_SIZE)) || (ATTRIBUTE_SINGLETONS_SIZE == 0) #define ACTUAL_SINGLETONS_SIZE 1 #else @@ -80,25 +82,25 @@ uint16_t emberEndpointCount = 0; // If we have attributes that are more than 2 bytes, then // we need this data block for the defaults #if (defined(GENERATED_DEFAULTS) && GENERATED_DEFAULTS_COUNT) -const uint8_t generatedDefaults[] = GENERATED_DEFAULTS; +constexpr const uint8_t generatedDefaults[] = GENERATED_DEFAULTS; #endif // GENERATED_DEFAULTS #if (defined(GENERATED_MIN_MAX_DEFAULTS) && GENERATED_MIN_MAX_DEFAULT_COUNT) -const EmberAfAttributeMinMaxValue minMaxDefaults[] = GENERATED_MIN_MAX_DEFAULTS; +constexpr const EmberAfAttributeMinMaxValue minMaxDefaults[] = GENERATED_MIN_MAX_DEFAULTS; #endif // GENERATED_MIN_MAX_DEFAULTS #ifdef GENERATED_FUNCTION_ARRAYS GENERATED_FUNCTION_ARRAYS #endif -const EmberAfAttributeMetadata generatedAttributes[] = GENERATED_ATTRIBUTES; -const EmberAfCluster generatedClusters[] = GENERATED_CLUSTERS; -const EmberAfEndpointType generatedEmberAfEndpointTypes[] = GENERATED_ENDPOINT_TYPES; +constexpr const EmberAfAttributeMetadata generatedAttributes[] = GENERATED_ATTRIBUTES; +constexpr const EmberAfCluster generatedClusters[] = GENERATED_CLUSTERS; +constexpr const EmberAfEndpointType generatedEmberAfEndpointTypes[] = GENERATED_ENDPOINT_TYPES; -const EmberAfManufacturerCodeEntry clusterManufacturerCodes[] = GENERATED_CLUSTER_MANUFACTURER_CODES; -const uint16_t clusterManufacturerCodeCount = GENERATED_CLUSTER_MANUFACTURER_CODE_COUNT; -const EmberAfManufacturerCodeEntry attributeManufacturerCodes[] = GENERATED_ATTRIBUTE_MANUFACTURER_CODES; -const uint16_t attributeManufacturerCodeCount = GENERATED_ATTRIBUTE_MANUFACTURER_CODE_COUNT; +constexpr const EmberAfManufacturerCodeEntry clusterManufacturerCodes[] = GENERATED_CLUSTER_MANUFACTURER_CODES; +constexpr const uint16_t clusterManufacturerCodeCount = GENERATED_CLUSTER_MANUFACTURER_CODE_COUNT; +constexpr const EmberAfManufacturerCodeEntry attributeManufacturerCodes[] = GENERATED_ATTRIBUTE_MANUFACTURER_CODES; +constexpr const uint16_t attributeManufacturerCodeCount = GENERATED_ATTRIBUTE_MANUFACTURER_CODE_COUNT; #if !defined(EMBER_SCRIPTED_TEST) #define endpointNumber(x) fixedEndpoints[x] @@ -109,7 +111,6 @@ const uint16_t attributeManufacturerCodeCount = GENERATED_ATTR #define endpointNetworkIndex(x) fixedNetworks[x] #endif -namespace { app::AttributeAccessInterface * gAttributeAccessOverrides = nullptr; } // anonymous namespace diff --git a/src/app/util/util.cpp b/src/app/util/util.cpp index b7b3eba24c6370..06dd3f17f1d3d1 100644 --- a/src/app/util/util.cpp +++ b/src/app/util/util.cpp @@ -899,7 +899,7 @@ void emberAfCopyLongString(uint8_t * dest, const uint8_t * src, size_t size) // You can pass in val1 as NULL, which will assume that it is // pointing to an array of all zeroes. This is used so that // default value of NULL is treated as all zeroes. -int8_t emberAfCompareValues(uint8_t * val1, uint8_t * val2, uint16_t len, bool signedNumber) +int8_t emberAfCompareValues(const uint8_t * val1, const uint8_t * val2, uint16_t len, bool signedNumber) { uint8_t i, j, k; if (signedNumber) diff --git a/src/app/zap-templates/templates/app/endpoint_config.zapt b/src/app/zap-templates/templates/app/endpoint_config.zapt index aecf3b6beb3760..ed461482774e51 100644 --- a/src/app/zap-templates/templates/app/endpoint_config.zapt +++ b/src/app/zap-templates/templates/app/endpoint_config.zapt @@ -19,8 +19,8 @@ #define GENERATED_DEFAULTS_COUNT ({{endpoint_attribute_long_defaults_count}}) #define ZAP_TYPE(type) ZCL_ ## type ## _ATTRIBUTE_TYPE -#define ZAP_LONG_DEFAULTS_INDEX(index) {(uint8_t*)(&generatedDefaults[index])} -#define ZAP_MIN_MAX_DEFAULTS_INDEX(index) {(uint8_t*)(&minMaxDefault[index])} +#define ZAP_LONG_DEFAULTS_INDEX(index) { &generatedDefaults[index] } +#define ZAP_MIN_MAX_DEFAULTS_INDEX(index) { &minMaxDefaults[index] } #define ZAP_EMPTY_DEFAULT() {(uint16_t) 0} #define ZAP_SIMPLE_DEFAULT(x) {(uint16_t) x} diff --git a/src/app/zap-templates/zcl/data-model/chip/general-commissioning-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/general-commissioning-cluster.xml index 0957d69b704b3a..b57c7b0e2dccac 100644 --- a/src/app/zap-templates/zcl/data-model/chip/general-commissioning-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/general-commissioning-cluster.xml @@ -39,7 +39,7 @@ limitations under the License. 0x0030 GENERAL_COMMISSIONING_CLUSTER This cluster is used to set, remove and update fabric information on a commissionee. - Breadcrumb + Breadcrumb BasicCommissioningInfoList RegulatoryConfig LocationCapability diff --git a/src/app/zap-templates/zcl/data-model/chip/pump-configuration-and-control-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/pump-configuration-and-control-cluster.xml index 49b8eba20042ac..7adb0526d4da62 100644 --- a/src/app/zap-templates/zcl/data-model/chip/pump-configuration-and-control-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/pump-configuration-and-control-cluster.xml @@ -42,9 +42,9 @@ limitations under the License. EffectiveControlMode Capacity Speed - LifetimeRunningHours - Power - LifetimeEnergyConsumed + LifetimeRunningHours + Power + LifetimeEnergyConsumed OperationMode ControlMode AlarmMask diff --git a/src/app/zap-templates/zcl/data-model/silabs/general.xml b/src/app/zap-templates/zcl/data-model/silabs/general.xml index a450ab952afc09..c645bb2ac60628 100644 --- a/src/app/zap-templates/zcl/data-model/silabs/general.xml +++ b/src/app/zap-templates/zcl/data-model/silabs/general.xml @@ -400,13 +400,13 @@ limitations under the License. min frequency max frequency - on off transition time - on level - on transition time - off transition time - default move rate + on off transition time + on level + on transition time + off transition time + default move rate options - start up current level + start up current level Command description for MoveToLevel diff --git a/src/app/zap-templates/zcl/data-model/silabs/ha.xml b/src/app/zap-templates/zcl/data-model/silabs/ha.xml index 7c62eab8335073..96f836b1534510 100644 --- a/src/app/zap-templates/zcl/data-model/silabs/ha.xml +++ b/src/app/zap-templates/zcl/data-model/silabs/ha.xml @@ -222,7 +222,7 @@ limitations under the License. color mode - color control options + color control options number of primaries @@ -270,22 +270,22 @@ limitations under the License. color point r y - color point r intensity + color point r intensity color point g x color point g y - color point g intensity + color point g intensity color point b x color point b y - color point b intensity + color point b intensity couple color temp to level min-mireds - start up color temperature mireds + start up color temperature mireds Move to specified hue. diff --git a/src/controller/java/zap-generated/CHIPClusters-JNI.cpp b/src/controller/java/zap-generated/CHIPClusters-JNI.cpp index fd633a08d910ba..bfa2721834f9bc 100644 --- a/src/controller/java/zap-generated/CHIPClusters-JNI.cpp +++ b/src/controller/java/zap-generated/CHIPClusters-JNI.cpp @@ -14857,7 +14857,12 @@ JNI_METHOD(void, LevelControlCluster, writeOnLevelAttribute) using TypeInfo = chip::app::Clusters::LevelControl::Attributes::OnLevel::TypeInfo; TypeInfo::Type cppValue; - cppValue = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); + uint8_t valueValue; + if (value != nullptr) + { + valueValue = chip::JniReferences::GetInstance().IntegerToPrimitive(value); + } + cppValue = value == nullptr ? chip::app::DataModel::Nullable() : chip::app::DataModel::Nullable(valueValue); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -14949,7 +14954,12 @@ JNI_METHOD(void, LevelControlCluster, writeOnTransitionTimeAttribute) using TypeInfo = chip::app::Clusters::LevelControl::Attributes::OnTransitionTime::TypeInfo; TypeInfo::Type cppValue; - cppValue = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); + uint16_t valueValue; + if (value != nullptr) + { + valueValue = chip::JniReferences::GetInstance().IntegerToPrimitive(value); + } + cppValue = value == nullptr ? chip::app::DataModel::Nullable() : chip::app::DataModel::Nullable(valueValue); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -15042,7 +15052,12 @@ JNI_METHOD(void, LevelControlCluster, writeOffTransitionTimeAttribute) using TypeInfo = chip::app::Clusters::LevelControl::Attributes::OffTransitionTime::TypeInfo; TypeInfo::Type cppValue; - cppValue = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); + uint16_t valueValue; + if (value != nullptr) + { + valueValue = chip::JniReferences::GetInstance().IntegerToPrimitive(value); + } + cppValue = value == nullptr ? chip::app::DataModel::Nullable() : chip::app::DataModel::Nullable(valueValue); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -15135,7 +15150,12 @@ JNI_METHOD(void, LevelControlCluster, writeDefaultMoveRateAttribute) using TypeInfo = chip::app::Clusters::LevelControl::Attributes::DefaultMoveRate::TypeInfo; TypeInfo::Type cppValue; - cppValue = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); + uint8_t valueValue; + if (value != nullptr) + { + valueValue = chip::JniReferences::GetInstance().IntegerToPrimitive(value); + } + cppValue = value == nullptr ? chip::app::DataModel::Nullable() : chip::app::DataModel::Nullable(valueValue); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -21498,7 +21518,12 @@ JNI_METHOD(void, PumpConfigurationAndControlCluster, writeLifetimeRunningHoursAt using TypeInfo = chip::app::Clusters::PumpConfigurationAndControl::Attributes::LifetimeRunningHours::TypeInfo; TypeInfo::Type cppValue; - cppValue = static_cast(chip::JniReferences::GetInstance().LongToPrimitive(value)); + uint32_t valueValue; + if (value != nullptr) + { + valueValue = chip::JniReferences::GetInstance().LongToPrimitive(value); + } + cppValue = value == nullptr ? chip::app::DataModel::Nullable() : chip::app::DataModel::Nullable(valueValue); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -21583,44 +21608,6 @@ JNI_METHOD(void, PumpConfigurationAndControlCluster, reportLifetimeRunningHoursA onReport.release(); } - -JNI_METHOD(void, PumpConfigurationAndControlCluster, writePowerAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) -{ - chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::PumpConfigurationAndControl::Attributes::Power::TypeInfo; - TypeInfo::Type cppValue; - - cppValue = static_cast(chip::JniReferences::GetInstance().LongToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - PumpConfigurationAndControlCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} JNI_METHOD(void, PumpConfigurationAndControlCluster, subscribePowerAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { @@ -21676,6 +21663,49 @@ JNI_METHOD(void, PumpConfigurationAndControlCluster, reportPowerAttribute) onReport.release(); } + +JNI_METHOD(void, PumpConfigurationAndControlCluster, writeLifetimeEnergyConsumedAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::PumpConfigurationAndControl::Attributes::LifetimeEnergyConsumed::TypeInfo; + TypeInfo::Type cppValue; + + uint32_t valueValue; + if (value != nullptr) + { + valueValue = chip::JniReferences::GetInstance().LongToPrimitive(value); + } + cppValue = value == nullptr ? chip::app::DataModel::Nullable() : chip::app::DataModel::Nullable(valueValue); + + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + PumpConfigurationAndControlCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + + onSuccess.release(); + onFailure.release(); +} JNI_METHOD(void, PumpConfigurationAndControlCluster, subscribeLifetimeEnergyConsumedAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { diff --git a/src/controller/java/zap-generated/CHIPClustersRead-JNI.cpp b/src/controller/java/zap-generated/CHIPClustersRead-JNI.cpp index bdfc5352879140..dbe1f03f36ecc1 100644 --- a/src/controller/java/zap-generated/CHIPClustersRead-JNI.cpp +++ b/src/controller/java/zap-generated/CHIPClustersRead-JNI.cpp @@ -7059,8 +7059,9 @@ JNI_METHOD(void, LevelControlCluster, readOnLevelAttribute)(JNIEnv * env, jobjec { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::LevelControl::Attributes::OnLevel::TypeInfo; - std::unique_ptr onSuccess( - chip::Platform::New(callback, false), chip::Platform::Delete); + std::unique_ptr onSuccess( + chip::Platform::New(callback, false), + chip::Platform::Delete); VerifyOrReturn(onSuccess.get() != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); @@ -7093,8 +7094,10 @@ JNI_METHOD(void, LevelControlCluster, readOnTransitionTimeAttribute)(JNIEnv * en { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::LevelControl::Attributes::OnTransitionTime::TypeInfo; - std::unique_ptr onSuccess( - chip::Platform::New(callback, false), chip::Platform::Delete); + std::unique_ptr + onSuccess(chip::Platform::New(callback, false), + chip::Platform::Delete); VerifyOrReturn(onSuccess.get() != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); @@ -7128,8 +7131,10 @@ JNI_METHOD(void, LevelControlCluster, readOffTransitionTimeAttribute) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::LevelControl::Attributes::OffTransitionTime::TypeInfo; - std::unique_ptr onSuccess( - chip::Platform::New(callback, false), chip::Platform::Delete); + std::unique_ptr + onSuccess(chip::Platform::New(callback, false), + chip::Platform::Delete); VerifyOrReturn(onSuccess.get() != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); @@ -7162,8 +7167,9 @@ JNI_METHOD(void, LevelControlCluster, readDefaultMoveRateAttribute)(JNIEnv * env { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::LevelControl::Attributes::DefaultMoveRate::TypeInfo; - std::unique_ptr onSuccess( - chip::Platform::New(callback, false), chip::Platform::Delete); + std::unique_ptr + onSuccess(chip::Platform::New(callback, false), + chip::Platform::Delete); VerifyOrReturn(onSuccess.get() != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); @@ -10041,8 +10047,10 @@ JNI_METHOD(void, PumpConfigurationAndControlCluster, readLifetimeRunningHoursAtt { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::PumpConfigurationAndControl::Attributes::LifetimeRunningHours::TypeInfo; - std::unique_ptr onSuccess( - chip::Platform::New(callback, false), chip::Platform::Delete); + std::unique_ptr + onSuccess(chip::Platform::New(callback, false), + chip::Platform::Delete); VerifyOrReturn(onSuccess.get() != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); @@ -10114,8 +10122,10 @@ JNI_METHOD(void, PumpConfigurationAndControlCluster, readLifetimeEnergyConsumedA { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::PumpConfigurationAndControl::Attributes::LifetimeEnergyConsumed::TypeInfo; - std::unique_ptr onSuccess( - chip::Platform::New(callback, false), chip::Platform::Delete); + std::unique_ptr + onSuccess(chip::Platform::New(callback, false), + chip::Platform::Delete); VerifyOrReturn(onSuccess.get() != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); diff --git a/src/controller/java/zap-generated/CHIPReadCallbacks.cpp b/src/controller/java/zap-generated/CHIPReadCallbacks.cpp index 91224b9f9a213f..1757b07ab7d603 100644 --- a/src/controller/java/zap-generated/CHIPReadCallbacks.cpp +++ b/src/controller/java/zap-generated/CHIPReadCallbacks.cpp @@ -2901,6 +2901,247 @@ void CHIPIlluminanceMeasurementLightSensorTypeAttributeCallback::CallbackFn(void env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } +CHIPLevelControlOnLevelAttributeCallback::CHIPLevelControlOnLevelAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPLevelControlOnLevelAttributeCallback::~CHIPLevelControlOnLevelAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPLevelControlOnLevelAttributeCallback::CallbackFn(void * context, const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPLevelControlOnTransitionTimeAttributeCallback::CHIPLevelControlOnTransitionTimeAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPLevelControlOnTransitionTimeAttributeCallback::~CHIPLevelControlOnTransitionTimeAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPLevelControlOnTransitionTimeAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPLevelControlOffTransitionTimeAttributeCallback::CHIPLevelControlOffTransitionTimeAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPLevelControlOffTransitionTimeAttributeCallback::~CHIPLevelControlOffTransitionTimeAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPLevelControlOffTransitionTimeAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPLevelControlDefaultMoveRateAttributeCallback::CHIPLevelControlDefaultMoveRateAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPLevelControlDefaultMoveRateAttributeCallback::~CHIPLevelControlDefaultMoveRateAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPLevelControlDefaultMoveRateAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + CHIPMediaInputMediaInputListAttributeCallback::CHIPMediaInputMediaInputListAttributeCallback(jobject javaCallback, bool keepAlive) : chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { @@ -3597,6 +3838,130 @@ void CHIPPowerSourceActiveBatteryFaultsAttributeCallback::CallbackFn(void * cont env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } +CHIPPumpConfigurationAndControlLifetimeRunningHoursAttributeCallback:: + CHIPPumpConfigurationAndControlLifetimeRunningHoursAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPPumpConfigurationAndControlLifetimeRunningHoursAttributeCallback:: + ~CHIPPumpConfigurationAndControlLifetimeRunningHoursAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPPumpConfigurationAndControlLifetimeRunningHoursAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + + std::string javaValueClassName = "java/lang/Long"; + std::string javaValueCtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPPumpConfigurationAndControlLifetimeEnergyConsumedAttributeCallback:: + CHIPPumpConfigurationAndControlLifetimeEnergyConsumedAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPPumpConfigurationAndControlLifetimeEnergyConsumedAttributeCallback:: + ~CHIPPumpConfigurationAndControlLifetimeEnergyConsumedAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPPumpConfigurationAndControlLifetimeEnergyConsumedAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + + std::string javaValueClassName = "java/lang/Long"; + std::string javaValueCtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + CHIPSoftwareDiagnosticsThreadMetricsAttributeCallback::CHIPSoftwareDiagnosticsThreadMetricsAttributeCallback(jobject javaCallback, bool keepAlive) : chip::Callback::Callback(CallbackFn, this), diff --git a/src/controller/java/zap-generated/CHIPReadCallbacks.h b/src/controller/java/zap-generated/CHIPReadCallbacks.h index 32cf00fb2cda1f..42c1b6fd3fb3f2 100644 --- a/src/controller/java/zap-generated/CHIPReadCallbacks.h +++ b/src/controller/java/zap-generated/CHIPReadCallbacks.h @@ -818,6 +818,102 @@ class CHIPIlluminanceMeasurementLightSensorTypeAttributeCallback bool keepAlive; }; +class CHIPLevelControlOnLevelAttributeCallback + : public chip::Callback::Callback +{ +public: + CHIPLevelControlOnLevelAttributeCallback(jobject javaCallback, bool keepAlive = false); + + ~CHIPLevelControlOnLevelAttributeCallback(); + + static void maybeDestroy(CHIPLevelControlOnLevelAttributeCallback * callback) + { + if (!callback->keepAlive) + { + callback->Cancel(); + chip::Platform::Delete(callback); + } + } + + static void CallbackFn(void * context, const chip::app::DataModel::Nullable & value); + +private: + jobject javaCallbackRef; + bool keepAlive; +}; + +class CHIPLevelControlOnTransitionTimeAttributeCallback + : public chip::Callback::Callback +{ +public: + CHIPLevelControlOnTransitionTimeAttributeCallback(jobject javaCallback, bool keepAlive = false); + + ~CHIPLevelControlOnTransitionTimeAttributeCallback(); + + static void maybeDestroy(CHIPLevelControlOnTransitionTimeAttributeCallback * callback) + { + if (!callback->keepAlive) + { + callback->Cancel(); + chip::Platform::Delete(callback); + } + } + + static void CallbackFn(void * context, const chip::app::DataModel::Nullable & value); + +private: + jobject javaCallbackRef; + bool keepAlive; +}; + +class CHIPLevelControlOffTransitionTimeAttributeCallback + : public chip::Callback::Callback +{ +public: + CHIPLevelControlOffTransitionTimeAttributeCallback(jobject javaCallback, bool keepAlive = false); + + ~CHIPLevelControlOffTransitionTimeAttributeCallback(); + + static void maybeDestroy(CHIPLevelControlOffTransitionTimeAttributeCallback * callback) + { + if (!callback->keepAlive) + { + callback->Cancel(); + chip::Platform::Delete(callback); + } + } + + static void CallbackFn(void * context, const chip::app::DataModel::Nullable & value); + +private: + jobject javaCallbackRef; + bool keepAlive; +}; + +class CHIPLevelControlDefaultMoveRateAttributeCallback + : public chip::Callback::Callback +{ +public: + CHIPLevelControlDefaultMoveRateAttributeCallback(jobject javaCallback, bool keepAlive = false); + + ~CHIPLevelControlDefaultMoveRateAttributeCallback(); + + static void maybeDestroy(CHIPLevelControlDefaultMoveRateAttributeCallback * callback) + { + if (!callback->keepAlive) + { + callback->Cancel(); + chip::Platform::Delete(callback); + } + } + + static void CallbackFn(void * context, const chip::app::DataModel::Nullable & value); + +private: + jobject javaCallbackRef; + bool keepAlive; +}; + class CHIPMediaInputMediaInputListAttributeCallback : public chip::Callback::Callback { @@ -969,6 +1065,54 @@ class CHIPPowerSourceActiveBatteryFaultsAttributeCallback bool keepAlive; }; +class CHIPPumpConfigurationAndControlLifetimeRunningHoursAttributeCallback + : public chip::Callback::Callback +{ +public: + CHIPPumpConfigurationAndControlLifetimeRunningHoursAttributeCallback(jobject javaCallback, bool keepAlive = false); + + ~CHIPPumpConfigurationAndControlLifetimeRunningHoursAttributeCallback(); + + static void maybeDestroy(CHIPPumpConfigurationAndControlLifetimeRunningHoursAttributeCallback * callback) + { + if (!callback->keepAlive) + { + callback->Cancel(); + chip::Platform::Delete(callback); + } + } + + static void CallbackFn(void * context, const chip::app::DataModel::Nullable & value); + +private: + jobject javaCallbackRef; + bool keepAlive; +}; + +class CHIPPumpConfigurationAndControlLifetimeEnergyConsumedAttributeCallback + : public chip::Callback::Callback +{ +public: + CHIPPumpConfigurationAndControlLifetimeEnergyConsumedAttributeCallback(jobject javaCallback, bool keepAlive = false); + + ~CHIPPumpConfigurationAndControlLifetimeEnergyConsumedAttributeCallback(); + + static void maybeDestroy(CHIPPumpConfigurationAndControlLifetimeEnergyConsumedAttributeCallback * callback) + { + if (!callback->keepAlive) + { + callback->Cancel(); + chip::Platform::Delete(callback); + } + } + + static void CallbackFn(void * context, const chip::app::DataModel::Nullable & value); + +private: + jobject javaCallbackRef; + bool keepAlive; +}; + class CHIPSoftwareDiagnosticsThreadMetricsAttributeCallback : public chip::Callback::Callback { diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java b/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java index 8071305635fa7a..d7d62617896d00 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java @@ -6408,6 +6408,30 @@ private native void stop( private native void stopWithOnOff(long chipClusterPtr, DefaultClusterCallback Callback); + public interface OnLevelAttributeCallback { + void onSuccess(@Nullable Integer value); + + void onError(Exception ex); + } + + public interface OnTransitionTimeAttributeCallback { + void onSuccess(@Nullable Integer value); + + void onError(Exception ex); + } + + public interface OffTransitionTimeAttributeCallback { + void onSuccess(@Nullable Integer value); + + void onError(Exception ex); + } + + public interface DefaultMoveRateAttributeCallback { + void onSuccess(@Nullable Integer value); + + void onError(Exception ex); + } + public void readCurrentLevelAttribute(IntegerAttributeCallback callback) { readCurrentLevelAttribute(chipClusterPtr, callback); } @@ -6533,11 +6557,11 @@ public void reportOnOffTransitionTimeAttribute(IntegerAttributeCallback callback reportOnOffTransitionTimeAttribute(chipClusterPtr, callback); } - public void readOnLevelAttribute(IntegerAttributeCallback callback) { + public void readOnLevelAttribute(OnLevelAttributeCallback callback) { readOnLevelAttribute(chipClusterPtr, callback); } - public void writeOnLevelAttribute(DefaultClusterCallback callback, Integer value) { + public void writeOnLevelAttribute(DefaultClusterCallback callback, @Nullable Integer value) { writeOnLevelAttribute(chipClusterPtr, callback, value); } @@ -6550,11 +6574,12 @@ public void reportOnLevelAttribute(IntegerAttributeCallback callback) { reportOnLevelAttribute(chipClusterPtr, callback); } - public void readOnTransitionTimeAttribute(IntegerAttributeCallback callback) { + public void readOnTransitionTimeAttribute(OnTransitionTimeAttributeCallback callback) { readOnTransitionTimeAttribute(chipClusterPtr, callback); } - public void writeOnTransitionTimeAttribute(DefaultClusterCallback callback, Integer value) { + public void writeOnTransitionTimeAttribute( + DefaultClusterCallback callback, @Nullable Integer value) { writeOnTransitionTimeAttribute(chipClusterPtr, callback, value); } @@ -6567,11 +6592,12 @@ public void reportOnTransitionTimeAttribute(IntegerAttributeCallback callback) { reportOnTransitionTimeAttribute(chipClusterPtr, callback); } - public void readOffTransitionTimeAttribute(IntegerAttributeCallback callback) { + public void readOffTransitionTimeAttribute(OffTransitionTimeAttributeCallback callback) { readOffTransitionTimeAttribute(chipClusterPtr, callback); } - public void writeOffTransitionTimeAttribute(DefaultClusterCallback callback, Integer value) { + public void writeOffTransitionTimeAttribute( + DefaultClusterCallback callback, @Nullable Integer value) { writeOffTransitionTimeAttribute(chipClusterPtr, callback, value); } @@ -6584,11 +6610,12 @@ public void reportOffTransitionTimeAttribute(IntegerAttributeCallback callback) reportOffTransitionTimeAttribute(chipClusterPtr, callback); } - public void readDefaultMoveRateAttribute(IntegerAttributeCallback callback) { + public void readDefaultMoveRateAttribute(DefaultMoveRateAttributeCallback callback) { readDefaultMoveRateAttribute(chipClusterPtr, callback); } - public void writeDefaultMoveRateAttribute(DefaultClusterCallback callback, Integer value) { + public void writeDefaultMoveRateAttribute( + DefaultClusterCallback callback, @Nullable Integer value) { writeDefaultMoveRateAttribute(chipClusterPtr, callback, value); } @@ -6719,10 +6746,10 @@ private native void reportOnOffTransitionTimeAttribute( long chipClusterPtr, IntegerAttributeCallback callback); private native void readOnLevelAttribute( - long chipClusterPtr, IntegerAttributeCallback callback); + long chipClusterPtr, OnLevelAttributeCallback callback); private native void writeOnLevelAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Integer value); + long chipClusterPtr, DefaultClusterCallback callback, @Nullable Integer value); private native void subscribeOnLevelAttribute( long chipClusterPtr, DefaultClusterCallback callback, int minInterval, int maxInterval); @@ -6731,10 +6758,10 @@ private native void reportOnLevelAttribute( long chipClusterPtr, IntegerAttributeCallback callback); private native void readOnTransitionTimeAttribute( - long chipClusterPtr, IntegerAttributeCallback callback); + long chipClusterPtr, OnTransitionTimeAttributeCallback callback); private native void writeOnTransitionTimeAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Integer value); + long chipClusterPtr, DefaultClusterCallback callback, @Nullable Integer value); private native void subscribeOnTransitionTimeAttribute( long chipClusterPtr, DefaultClusterCallback callback, int minInterval, int maxInterval); @@ -6743,10 +6770,10 @@ private native void reportOnTransitionTimeAttribute( long chipClusterPtr, IntegerAttributeCallback callback); private native void readOffTransitionTimeAttribute( - long chipClusterPtr, IntegerAttributeCallback callback); + long chipClusterPtr, OffTransitionTimeAttributeCallback callback); private native void writeOffTransitionTimeAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Integer value); + long chipClusterPtr, DefaultClusterCallback callback, @Nullable Integer value); private native void subscribeOffTransitionTimeAttribute( long chipClusterPtr, DefaultClusterCallback callback, int minInterval, int maxInterval); @@ -6755,10 +6782,10 @@ private native void reportOffTransitionTimeAttribute( long chipClusterPtr, IntegerAttributeCallback callback); private native void readDefaultMoveRateAttribute( - long chipClusterPtr, IntegerAttributeCallback callback); + long chipClusterPtr, DefaultMoveRateAttributeCallback callback); private native void writeDefaultMoveRateAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Integer value); + long chipClusterPtr, DefaultClusterCallback callback, @Nullable Integer value); private native void subscribeDefaultMoveRateAttribute( long chipClusterPtr, DefaultClusterCallback callback, int minInterval, int maxInterval); @@ -9013,6 +9040,18 @@ public static long clusterId() { @Override public native long initWithDevice(long devicePtr, int endpointId); + public interface LifetimeRunningHoursAttributeCallback { + void onSuccess(@Nullable Long value); + + void onError(Exception ex); + } + + public interface LifetimeEnergyConsumedAttributeCallback { + void onSuccess(@Nullable Long value); + + void onError(Exception ex); + } + public void readMaxPressureAttribute(IntegerAttributeCallback callback) { readMaxPressureAttribute(chipClusterPtr, callback); } @@ -9247,11 +9286,12 @@ public void reportSpeedAttribute(IntegerAttributeCallback callback) { reportSpeedAttribute(chipClusterPtr, callback); } - public void readLifetimeRunningHoursAttribute(LongAttributeCallback callback) { + public void readLifetimeRunningHoursAttribute(LifetimeRunningHoursAttributeCallback callback) { readLifetimeRunningHoursAttribute(chipClusterPtr, callback); } - public void writeLifetimeRunningHoursAttribute(DefaultClusterCallback callback, Long value) { + public void writeLifetimeRunningHoursAttribute( + DefaultClusterCallback callback, @Nullable Long value) { writeLifetimeRunningHoursAttribute(chipClusterPtr, callback, value); } @@ -9268,10 +9308,6 @@ public void readPowerAttribute(LongAttributeCallback callback) { readPowerAttribute(chipClusterPtr, callback); } - public void writePowerAttribute(DefaultClusterCallback callback, Long value) { - writePowerAttribute(chipClusterPtr, callback, value); - } - public void subscribePowerAttribute( DefaultClusterCallback callback, int minInterval, int maxInterval) { subscribePowerAttribute(chipClusterPtr, callback, minInterval, maxInterval); @@ -9281,10 +9317,16 @@ public void reportPowerAttribute(LongAttributeCallback callback) { reportPowerAttribute(chipClusterPtr, callback); } - public void readLifetimeEnergyConsumedAttribute(LongAttributeCallback callback) { + public void readLifetimeEnergyConsumedAttribute( + LifetimeEnergyConsumedAttributeCallback callback) { readLifetimeEnergyConsumedAttribute(chipClusterPtr, callback); } + public void writeLifetimeEnergyConsumedAttribute( + DefaultClusterCallback callback, @Nullable Long value) { + writeLifetimeEnergyConsumedAttribute(chipClusterPtr, callback, value); + } + public void subscribeLifetimeEnergyConsumedAttribute( DefaultClusterCallback callback, int minInterval, int maxInterval) { subscribeLifetimeEnergyConsumedAttribute(chipClusterPtr, callback, minInterval, maxInterval); @@ -9529,10 +9571,10 @@ private native void reportSpeedAttribute( long chipClusterPtr, IntegerAttributeCallback callback); private native void readLifetimeRunningHoursAttribute( - long chipClusterPtr, LongAttributeCallback callback); + long chipClusterPtr, LifetimeRunningHoursAttributeCallback callback); private native void writeLifetimeRunningHoursAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Long value); + long chipClusterPtr, DefaultClusterCallback callback, @Nullable Long value); private native void subscribeLifetimeRunningHoursAttribute( long chipClusterPtr, DefaultClusterCallback callback, int minInterval, int maxInterval); @@ -9542,16 +9584,16 @@ private native void reportLifetimeRunningHoursAttribute( private native void readPowerAttribute(long chipClusterPtr, LongAttributeCallback callback); - private native void writePowerAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Long value); - private native void subscribePowerAttribute( long chipClusterPtr, DefaultClusterCallback callback, int minInterval, int maxInterval); private native void reportPowerAttribute(long chipClusterPtr, LongAttributeCallback callback); private native void readLifetimeEnergyConsumedAttribute( - long chipClusterPtr, LongAttributeCallback callback); + long chipClusterPtr, LifetimeEnergyConsumedAttributeCallback callback); + + private native void writeLifetimeEnergyConsumedAttribute( + long chipClusterPtr, DefaultClusterCallback callback, @Nullable Long value); private native void subscribeLifetimeEnergyConsumedAttribute( long chipClusterPtr, DefaultClusterCallback callback, int minInterval, int maxInterval); diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ClusterReadMapping.java b/src/controller/java/zap-generated/chip/devicecontroller/ClusterReadMapping.java index 29253fdf7f55a6..6fd0677571103f 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ClusterReadMapping.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ClusterReadMapping.java @@ -2632,7 +2632,8 @@ public Map> getReadAttributeMap() { new InteractionInfo( (cluster, callback, commandArguments) -> { ((ChipClusters.LevelControlCluster) cluster) - .readOnLevelAttribute((ChipClusters.IntegerAttributeCallback) callback); + .readOnLevelAttribute( + (ChipClusters.LevelControlCluster.OnLevelAttributeCallback) callback); }, () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), readLevelControlOnLevelCommandParams); @@ -2644,7 +2645,9 @@ public Map> getReadAttributeMap() { new InteractionInfo( (cluster, callback, commandArguments) -> { ((ChipClusters.LevelControlCluster) cluster) - .readOnTransitionTimeAttribute((ChipClusters.IntegerAttributeCallback) callback); + .readOnTransitionTimeAttribute( + (ChipClusters.LevelControlCluster.OnTransitionTimeAttributeCallback) + callback); }, () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), readLevelControlOnTransitionTimeCommandParams); @@ -2656,7 +2659,9 @@ public Map> getReadAttributeMap() { new InteractionInfo( (cluster, callback, commandArguments) -> { ((ChipClusters.LevelControlCluster) cluster) - .readOffTransitionTimeAttribute((ChipClusters.IntegerAttributeCallback) callback); + .readOffTransitionTimeAttribute( + (ChipClusters.LevelControlCluster.OffTransitionTimeAttributeCallback) + callback); }, () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), readLevelControlOffTransitionTimeCommandParams); @@ -2669,7 +2674,8 @@ public Map> getReadAttributeMap() { new InteractionInfo( (cluster, callback, commandArguments) -> { ((ChipClusters.LevelControlCluster) cluster) - .readDefaultMoveRateAttribute((ChipClusters.IntegerAttributeCallback) callback); + .readDefaultMoveRateAttribute( + (ChipClusters.LevelControlCluster.DefaultMoveRateAttributeCallback) callback); }, () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), readLevelControlDefaultMoveRateCommandParams); @@ -3739,7 +3745,10 @@ public Map> getReadAttributeMap() { new InteractionInfo( (cluster, callback, commandArguments) -> { ((ChipClusters.PumpConfigurationAndControlCluster) cluster) - .readLifetimeRunningHoursAttribute((ChipClusters.LongAttributeCallback) callback); + .readLifetimeRunningHoursAttribute( + (ChipClusters.PumpConfigurationAndControlCluster + .LifetimeRunningHoursAttributeCallback) + callback); }, () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(), readPumpConfigurationAndControlLifetimeRunningHoursCommandParams); @@ -3766,7 +3775,9 @@ public Map> getReadAttributeMap() { (cluster, callback, commandArguments) -> { ((ChipClusters.PumpConfigurationAndControlCluster) cluster) .readLifetimeEnergyConsumedAttribute( - (ChipClusters.LongAttributeCallback) callback); + (ChipClusters.PumpConfigurationAndControlCluster + .LifetimeEnergyConsumedAttributeCallback) + callback); }, () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(), readPumpConfigurationAndControlLifetimeEnergyConsumedCommandParams); diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ClusterWriteMapping.java b/src/controller/java/zap-generated/chip/devicecontroller/ClusterWriteMapping.java index 6bdafa664badf4..4955c3f1e16f10 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ClusterWriteMapping.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ClusterWriteMapping.java @@ -723,23 +723,25 @@ public Map> getWriteAttributeMap() { writePumpConfigurationAndControlInteractionInfo.put( "writeLifetimeRunningHoursAttribute", writePumpConfigurationAndControlLifetimeRunningHoursAttributeInteractionInfo); - Map writePumpConfigurationAndControlPowerCommandParams = - new LinkedHashMap(); - CommandParameterInfo pumpConfigurationAndControlpowerCommandParameterInfo = + Map + writePumpConfigurationAndControlLifetimeEnergyConsumedCommandParams = + new LinkedHashMap(); + CommandParameterInfo pumpConfigurationAndControllifetimeEnergyConsumedCommandParameterInfo = new CommandParameterInfo("value", long.class); - writePumpConfigurationAndControlPowerCommandParams.put( - "value", pumpConfigurationAndControlpowerCommandParameterInfo); - InteractionInfo writePumpConfigurationAndControlPowerAttributeInteractionInfo = + writePumpConfigurationAndControlLifetimeEnergyConsumedCommandParams.put( + "value", pumpConfigurationAndControllifetimeEnergyConsumedCommandParameterInfo); + InteractionInfo writePumpConfigurationAndControlLifetimeEnergyConsumedAttributeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { ((ChipClusters.PumpConfigurationAndControlCluster) cluster) - .writePowerAttribute( + .writeLifetimeEnergyConsumedAttribute( (DefaultClusterCallback) callback, (Long) commandArguments.get("value")); }, () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(), - writePumpConfigurationAndControlPowerCommandParams); + writePumpConfigurationAndControlLifetimeEnergyConsumedCommandParams); writePumpConfigurationAndControlInteractionInfo.put( - "writePowerAttribute", writePumpConfigurationAndControlPowerAttributeInteractionInfo); + "writeLifetimeEnergyConsumedAttribute", + writePumpConfigurationAndControlLifetimeEnergyConsumedAttributeInteractionInfo); Map writePumpConfigurationAndControlOperationModeCommandParams = new LinkedHashMap(); CommandParameterInfo pumpConfigurationAndControloperationModeCommandParameterInfo = diff --git a/src/controller/python/chip/clusters/CHIPClusters.py b/src/controller/python/chip/clusters/CHIPClusters.py index 7061df2e9d6e38..f23de9067db3fd 100644 --- a/src/controller/python/chip/clusters/CHIPClusters.py +++ b/src/controller/python/chip/clusters/CHIPClusters.py @@ -3242,13 +3242,13 @@ class ChipClusters: "attributeId": 0x00000016, "type": "int", "reportable": True, - "writable": True, }, 0x00000017: { "attributeName": "LifetimeEnergyConsumed", "attributeId": 0x00000017, "type": "int", "reportable": True, + "writable": True, }, 0x00000020: { "attributeName": "OperationMode", diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py index be946a135b6d61..027fbb3ef8b594 100644 --- a/src/controller/python/chip/clusters/Objects.py +++ b/src/controller/python/chip/clusters/Objects.py @@ -2769,9 +2769,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Optional[uint]' = None + value: 'typing.Union[None, Nullable, uint]' = None @dataclass class OnTransitionTime(ClusterAttributeDescriptor): @@ -2785,9 +2785,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Optional[uint]' = None + value: 'typing.Union[None, Nullable, uint]' = None @dataclass class OffTransitionTime(ClusterAttributeDescriptor): @@ -2801,9 +2801,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Optional[uint]' = None + value: 'typing.Union[None, Nullable, uint]' = None @dataclass class DefaultMoveRate(ClusterAttributeDescriptor): @@ -2817,9 +2817,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Optional[uint]' = None + value: 'typing.Union[None, Nullable, uint]' = None @dataclass class StartUpCurrentLevel(ClusterAttributeDescriptor): @@ -14030,9 +14030,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Optional[uint]' = None + value: 'typing.Union[None, Nullable, uint]' = None @dataclass class Power(ClusterAttributeDescriptor): @@ -14062,9 +14062,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Optional[uint]' = None + value: 'typing.Union[None, Nullable, uint]' = None @dataclass class OperationMode(ClusterAttributeDescriptor): diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.h b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.h index 8575601940f36f..6417bfa862a6c0 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.h @@ -1987,7 +1987,7 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeOnLevelWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeOnLevelWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeOnLevelWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; - (void)subscribeAttributeOnLevelWithMinInterval:(uint16_t)minInterval maxInterval:(uint16_t)maxInterval responseHandler:(ResponseHandler)responseHandler; @@ -1995,7 +1995,7 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeOnTransitionTimeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeOnTransitionTimeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeOnTransitionTimeWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; - (void)subscribeAttributeOnTransitionTimeWithMinInterval:(uint16_t)minInterval maxInterval:(uint16_t)maxInterval responseHandler:(ResponseHandler)responseHandler; @@ -2004,7 +2004,7 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeOffTransitionTimeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeOffTransitionTimeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeOffTransitionTimeWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; - (void)subscribeAttributeOffTransitionTimeWithMinInterval:(uint16_t)minInterval maxInterval:(uint16_t)maxInterval responseHandler:(ResponseHandler)responseHandler; @@ -2013,7 +2013,7 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeDefaultMoveRateWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeDefaultMoveRateWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeDefaultMoveRateWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; - (void)subscribeAttributeDefaultMoveRateWithMinInterval:(uint16_t)minInterval maxInterval:(uint16_t)maxInterval responseHandler:(ResponseHandler)responseHandler; @@ -2849,7 +2849,7 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeLifetimeRunningHoursWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeLifetimeRunningHoursWithValue:(NSNumber * _Nonnull)value +- (void)writeAttributeLifetimeRunningHoursWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; - (void)subscribeAttributeLifetimeRunningHoursWithMinInterval:(uint16_t)minInterval maxInterval:(uint16_t)maxInterval @@ -2858,7 +2858,6 @@ NS_ASSUME_NONNULL_BEGIN NSError * _Nullable error))responseHandler; - (void)readAttributePowerWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributePowerWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)subscribeAttributePowerWithMinInterval:(uint16_t)minInterval maxInterval:(uint16_t)maxInterval responseHandler:(ResponseHandler)responseHandler; @@ -2866,6 +2865,8 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeLifetimeEnergyConsumedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeLifetimeEnergyConsumedWithValue:(NSNumber * _Nullable)value + completionHandler:(StatusCompletion)completionHandler; - (void)subscribeAttributeLifetimeEnergyConsumedWithMinInterval:(uint16_t)minInterval maxInterval:(uint16_t)maxInterval responseHandler:(ResponseHandler)responseHandler; diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm index 76fd6d24667d38..94410333b0ac6d 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm @@ -9966,20 +9966,20 @@ new CHIPInt16uAttributeCallbackBridge( - (void)readAttributeOnLevelWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge( + new CHIPNullableInt8uAttributeCallbackBridge( self.callbackQueue, ^(NSError * _Nullable error, id _Nullable value) { completionHandler(value, error); }, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = LevelControl::Attributes::OnLevel::TypeInfo; - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeOnLevelWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeOnLevelWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( self.callbackQueue, @@ -9990,7 +9990,12 @@ new CHIPDefaultSuccessCallbackBridge( ListFreer listFreer; using TypeInfo = LevelControl::Attributes::OnLevel::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedCharValue; + } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); @@ -10001,14 +10006,15 @@ - (void)subscribeAttributeOnLevelWithMinInterval:(uint16_t)minInterval maxInterval:(uint16_t)maxInterval responseHandler:(ResponseHandler)responseHandler { - new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { - return self.cppCluster.SubscribeAttributeOnLevel(success, failure, minInterval, maxInterval); - }); + new CHIPNullableInt8uAttributeCallbackBridge( + self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.SubscribeAttributeOnLevel(success, failure, minInterval, maxInterval); + }); } - (void)reportAttributeOnLevelWithResponseHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))responseHandler { - new CHIPInt8uAttributeCallbackBridge( + new CHIPNullableInt8uAttributeCallbackBridge( self.callbackQueue, ^(NSError * _Nullable error, id _Nullable value) { responseHandler(value, error); @@ -10022,20 +10028,20 @@ new CHIPInt8uAttributeCallbackBridge( - (void)readAttributeOnTransitionTimeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge( + new CHIPNullableInt16uAttributeCallbackBridge( self.callbackQueue, ^(NSError * _Nullable error, id _Nullable value) { completionHandler(value, error); }, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = LevelControl::Attributes::OnTransitionTime::TypeInfo; - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeOnTransitionTimeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeOnTransitionTimeWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( self.callbackQueue, @@ -10046,7 +10052,12 @@ new CHIPDefaultSuccessCallbackBridge( ListFreer listFreer; using TypeInfo = LevelControl::Attributes::OnTransitionTime::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedShortValue; + } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); @@ -10057,15 +10068,16 @@ - (void)subscribeAttributeOnTransitionTimeWithMinInterval:(uint16_t)minInterval maxInterval:(uint16_t)maxInterval responseHandler:(ResponseHandler)responseHandler { - new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { - return self.cppCluster.SubscribeAttributeOnTransitionTime(success, failure, minInterval, maxInterval); - }); + new CHIPNullableInt16uAttributeCallbackBridge( + self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.SubscribeAttributeOnTransitionTime(success, failure, minInterval, maxInterval); + }); } - (void)reportAttributeOnTransitionTimeWithResponseHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))responseHandler { - new CHIPInt16uAttributeCallbackBridge( + new CHIPNullableInt16uAttributeCallbackBridge( self.callbackQueue, ^(NSError * _Nullable error, id _Nullable value) { responseHandler(value, error); @@ -10079,20 +10091,20 @@ new CHIPInt16uAttributeCallbackBridge( - (void)readAttributeOffTransitionTimeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge( + new CHIPNullableInt16uAttributeCallbackBridge( self.callbackQueue, ^(NSError * _Nullable error, id _Nullable value) { completionHandler(value, error); }, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = LevelControl::Attributes::OffTransitionTime::TypeInfo; - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeOffTransitionTimeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeOffTransitionTimeWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( self.callbackQueue, @@ -10103,7 +10115,12 @@ new CHIPDefaultSuccessCallbackBridge( ListFreer listFreer; using TypeInfo = LevelControl::Attributes::OffTransitionTime::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedShortValue; + } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); @@ -10114,15 +10131,16 @@ - (void)subscribeAttributeOffTransitionTimeWithMinInterval:(uint16_t)minInterval maxInterval:(uint16_t)maxInterval responseHandler:(ResponseHandler)responseHandler { - new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { - return self.cppCluster.SubscribeAttributeOffTransitionTime(success, failure, minInterval, maxInterval); - }); + new CHIPNullableInt16uAttributeCallbackBridge( + self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.SubscribeAttributeOffTransitionTime(success, failure, minInterval, maxInterval); + }); } - (void)reportAttributeOffTransitionTimeWithResponseHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))responseHandler { - new CHIPInt16uAttributeCallbackBridge( + new CHIPNullableInt16uAttributeCallbackBridge( self.callbackQueue, ^(NSError * _Nullable error, id _Nullable value) { responseHandler(value, error); @@ -10136,20 +10154,20 @@ new CHIPInt16uAttributeCallbackBridge( - (void)readAttributeDefaultMoveRateWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge( + new CHIPNullableInt8uAttributeCallbackBridge( self.callbackQueue, ^(NSError * _Nullable error, id _Nullable value) { completionHandler(value, error); }, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = LevelControl::Attributes::DefaultMoveRate::TypeInfo; - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeDefaultMoveRateWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeDefaultMoveRateWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( self.callbackQueue, @@ -10160,7 +10178,12 @@ new CHIPDefaultSuccessCallbackBridge( ListFreer listFreer; using TypeInfo = LevelControl::Attributes::DefaultMoveRate::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedCharValue; + } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); @@ -10171,15 +10194,16 @@ - (void)subscribeAttributeDefaultMoveRateWithMinInterval:(uint16_t)minInterval maxInterval:(uint16_t)maxInterval responseHandler:(ResponseHandler)responseHandler { - new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { - return self.cppCluster.SubscribeAttributeDefaultMoveRate(success, failure, minInterval, maxInterval); - }); + new CHIPNullableInt8uAttributeCallbackBridge( + self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.SubscribeAttributeDefaultMoveRate(success, failure, minInterval, maxInterval); + }); } - (void)reportAttributeDefaultMoveRateWithResponseHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))responseHandler { - new CHIPInt8uAttributeCallbackBridge( + new CHIPNullableInt8uAttributeCallbackBridge( self.callbackQueue, ^(NSError * _Nullable error, id _Nullable value) { responseHandler(value, error); @@ -14350,20 +14374,21 @@ new CHIPInt16uAttributeCallbackBridge( - (void)readAttributeLifetimeRunningHoursWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt32uAttributeCallbackBridge( + new CHIPNullableInt32uAttributeCallbackBridge( self.callbackQueue, ^(NSError * _Nullable error, id _Nullable value) { completionHandler(value, error); }, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = PumpConfigurationAndControl::Attributes::LifetimeRunningHours::TypeInfo; - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeLifetimeRunningHoursWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeLifetimeRunningHoursWithValue:(NSNumber * _Nullable)value + completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( self.callbackQueue, @@ -14374,7 +14399,12 @@ new CHIPDefaultSuccessCallbackBridge( ListFreer listFreer; using TypeInfo = PumpConfigurationAndControl::Attributes::LifetimeRunningHours::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedIntValue; + } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); @@ -14385,15 +14415,16 @@ - (void)subscribeAttributeLifetimeRunningHoursWithMinInterval:(uint16_t)minInter maxInterval:(uint16_t)maxInterval responseHandler:(ResponseHandler)responseHandler { - new CHIPInt32uAttributeCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { - return self.cppCluster.SubscribeAttributeLifetimeRunningHours(success, failure, minInterval, maxInterval); - }); + new CHIPNullableInt32uAttributeCallbackBridge( + self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.SubscribeAttributeLifetimeRunningHours(success, failure, minInterval, maxInterval); + }); } - (void)reportAttributeLifetimeRunningHoursWithResponseHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))responseHandler { - new CHIPInt32uAttributeCallbackBridge( + new CHIPNullableInt32uAttributeCallbackBridge( self.callbackQueue, ^(NSError * _Nullable error, id _Nullable value) { responseHandler(value, error); @@ -14419,24 +14450,6 @@ new CHIPInt32uAttributeCallbackBridge( }); } -- (void)writeAttributePowerWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler -{ - new CHIPDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(NSError * _Nullable error, id _Nullable ignored) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = PumpConfigurationAndControl::Attributes::Power::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - - (void)subscribeAttributePowerWithMinInterval:(uint16_t)minInterval maxInterval:(uint16_t)maxInterval responseHandler:(ResponseHandler)responseHandler @@ -14462,32 +14475,57 @@ new CHIPInt32uAttributeCallbackBridge( - (void)readAttributeLifetimeEnergyConsumedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt32uAttributeCallbackBridge( + new CHIPNullableInt32uAttributeCallbackBridge( self.callbackQueue, ^(NSError * _Nullable error, id _Nullable value) { completionHandler(value, error); }, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = PumpConfigurationAndControl::Attributes::LifetimeEnergyConsumed::TypeInfo; - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } +- (void)writeAttributeLifetimeEnergyConsumedWithValue:(NSNumber * _Nullable)value + completionHandler:(StatusCompletion)completionHandler +{ + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(NSError * _Nullable error, id _Nullable ignored) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = PumpConfigurationAndControl::Attributes::LifetimeEnergyConsumed::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedIntValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + - (void)subscribeAttributeLifetimeEnergyConsumedWithMinInterval:(uint16_t)minInterval maxInterval:(uint16_t)maxInterval responseHandler:(ResponseHandler)responseHandler { - new CHIPInt32uAttributeCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { - return self.cppCluster.SubscribeAttributeLifetimeEnergyConsumed(success, failure, minInterval, maxInterval); - }); + new CHIPNullableInt32uAttributeCallbackBridge( + self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.SubscribeAttributeLifetimeEnergyConsumed(success, failure, minInterval, maxInterval); + }); } - (void)reportAttributeLifetimeEnergyConsumedWithResponseHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))responseHandler { - new CHIPInt32uAttributeCallbackBridge( + new CHIPNullableInt32uAttributeCallbackBridge( self.callbackQueue, ^(NSError * _Nullable error, id _Nullable value) { responseHandler(value, error); diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.h b/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.h index f29c0c17149317..ebe087b2c9d817 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.h @@ -675,8 +675,7 @@ NS_ASSUME_NONNULL_BEGIN completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeCapacityWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeSpeedWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeLifetimeEnergyConsumedWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributePowerWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeAlarmMaskWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeFeatureMapWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.mm b/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.mm index 195c6bc4f5e12c..2c80bed99ef98b 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.mm @@ -5662,8 +5662,7 @@ new CHIPDefaultSuccessCallbackBridge( }); } -- (void)writeAttributeLifetimeEnergyConsumedWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributePowerWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( self.callbackQueue, @@ -5672,7 +5671,7 @@ new CHIPDefaultSuccessCallbackBridge( }, ^(Cancelable * success, Cancelable * failure) { ListFreer listFreer; - using TypeInfo = PumpConfigurationAndControl::Attributes::LifetimeEnergyConsumed::TypeInfo; + using TypeInfo = PumpConfigurationAndControl::Attributes::Power::TypeInfo; TypeInfo::Type cppValue; cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); diff --git a/src/darwin/Framework/CHIPTests/CHIPClustersTests.m b/src/darwin/Framework/CHIPTests/CHIPClustersTests.m index 398b677475125b..2fe0c92aca9fd1 100644 --- a/src/darwin/Framework/CHIPTests/CHIPClustersTests.m +++ b/src/darwin/Framework/CHIPTests/CHIPClustersTests.m @@ -9950,6 +9950,7 @@ - (void)testSendClusterTest_TC_LVL_3_1_000010_ReadAttribute { id actualValue = value; + XCTAssertFalse(actualValue == nil); XCTAssertEqual([actualValue unsignedCharValue], 20); } @@ -30058,7 +30059,7 @@ - (void)testSendClusterColorControlWriteAttributeColorControlOptionsWithValue CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - NSNumber * _Nonnull value = @(0x00); + NSNumber * _Nonnull value = @(0); [cluster writeAttributeColorControlOptionsWithValue:value completionHandler:^(NSError * _Nullable err) { NSLog(@"ColorControl ColorControlOptions Error: %@", err); @@ -30597,7 +30598,7 @@ - (void)testSendClusterColorControlWriteAttributeColorPointRIntensityWithValue CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - NSNumber * _Nonnull value = @(0x00); + NSNumber * _Nonnull value = @(0); [cluster writeAttributeColorPointRIntensityWithValue:value completionHandler:^(NSError * _Nullable err) { NSLog(@"ColorControl ColorPointRIntensity Error: %@", err); @@ -30711,7 +30712,7 @@ - (void)testSendClusterColorControlWriteAttributeColorPointGIntensityWithValue CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - NSNumber * _Nonnull value = @(0x00); + NSNumber * _Nonnull value = @(0); [cluster writeAttributeColorPointGIntensityWithValue:value completionHandler:^(NSError * _Nullable err) { NSLog(@"ColorControl ColorPointGIntensity Error: %@", err); @@ -30825,7 +30826,7 @@ - (void)testSendClusterColorControlWriteAttributeColorPointBIntensityWithValue CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - NSNumber * _Nonnull value = @(0x00); + NSNumber * _Nonnull value = @(0); [cluster writeAttributeColorPointBIntensityWithValue:value completionHandler:^(NSError * _Nullable err) { NSLog(@"ColorControl ColorPointBIntensity Error: %@", err); @@ -31945,7 +31946,7 @@ - (void)testSendClusterGeneralCommissioningWriteAttributeBreadcrumbWithValue CHIPGeneralCommissioning * cluster = [[CHIPGeneralCommissioning alloc] initWithDevice:device endpoint:0 queue:queue]; XCTAssertNotNil(cluster); - NSNumber * _Nonnull value = @(0x0000000000000000); + NSNumber * _Nonnull value = @(0); [cluster writeAttributeBreadcrumbWithValue:value completionHandler:^(NSError * _Nullable err) { NSLog(@"GeneralCommissioning Breadcrumb Error: %@", err); @@ -32660,7 +32661,7 @@ - (void)testSendClusterLevelControlWriteAttributeOnOffTransitionTimeWithValue CHIPLevelControl * cluster = [[CHIPLevelControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - NSNumber * _Nonnull value = @(0x0000); + NSNumber * _Nonnull value = @(0); [cluster writeAttributeOnOffTransitionTimeWithValue:value completionHandler:^(NSError * _Nullable err) { NSLog(@"LevelControl OnOffTransitionTime Error: %@", err); @@ -32697,7 +32698,7 @@ - (void)testSendClusterLevelControlWriteAttributeOnLevelWithValue CHIPLevelControl * cluster = [[CHIPLevelControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - NSNumber * _Nonnull value = @(0x00); + NSNumber * _Nullable value = @(0); [cluster writeAttributeOnLevelWithValue:value completionHandler:^(NSError * _Nullable err) { NSLog(@"LevelControl OnLevel Error: %@", err); @@ -32735,7 +32736,7 @@ - (void)testSendClusterLevelControlWriteAttributeOnTransitionTimeWithValue CHIPLevelControl * cluster = [[CHIPLevelControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - NSNumber * _Nonnull value = @(0x0000); + NSNumber * _Nullable value = @(0); [cluster writeAttributeOnTransitionTimeWithValue:value completionHandler:^(NSError * _Nullable err) { NSLog(@"LevelControl OnTransitionTime Error: %@", err); @@ -32773,7 +32774,7 @@ - (void)testSendClusterLevelControlWriteAttributeOffTransitionTimeWithValue CHIPLevelControl * cluster = [[CHIPLevelControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - NSNumber * _Nonnull value = @(0x0000); + NSNumber * _Nullable value = @(0); [cluster writeAttributeOffTransitionTimeWithValue:value completionHandler:^(NSError * _Nullable err) { NSLog(@"LevelControl OffTransitionTime Error: %@", err); @@ -32811,7 +32812,7 @@ - (void)testSendClusterLevelControlWriteAttributeDefaultMoveRateWithValue CHIPLevelControl * cluster = [[CHIPLevelControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - NSNumber * _Nonnull value = @(0x00); + NSNumber * _Nullable value = @(0); [cluster writeAttributeDefaultMoveRateWithValue:value completionHandler:^(NSError * _Nullable err) { NSLog(@"LevelControl DefaultMoveRate Error: %@", err); @@ -32849,7 +32850,7 @@ - (void)testSendClusterLevelControlWriteAttributeStartUpCurrentLevelWithValue CHIPLevelControl * cluster = [[CHIPLevelControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - NSNumber * _Nonnull value = @(0x01); + NSNumber * _Nonnull value = @(0); [cluster writeAttributeStartUpCurrentLevelWithValue:value completionHandler:^(NSError * _Nullable err) { NSLog(@"LevelControl StartUpCurrentLevel Error: %@", err); @@ -34536,7 +34537,7 @@ - (void)testSendClusterPumpConfigurationAndControlWriteAttributeLifetimeRunningH queue:queue]; XCTAssertNotNil(cluster); - NSNumber * _Nonnull value = @(0x000000); + NSNumber * _Nullable value = @(0); [cluster writeAttributeLifetimeRunningHoursWithValue:value completionHandler:^(NSError * _Nullable err) { NSLog(@"PumpConfigurationAndControl LifetimeRunningHours Error: %@", err); @@ -34567,9 +34568,10 @@ - (void)testSendClusterPumpConfigurationAndControlReadAttributePowerWithCompleti [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterPumpConfigurationAndControlWriteAttributePowerWithValue +- (void)testSendClusterPumpConfigurationAndControlReadAttributeLifetimeEnergyConsumedWithCompletionHandler { - XCTestExpectation * expectation = [self expectationWithDescription:@"PumpConfigurationAndControlWriteAttributePowerWithValue"]; + XCTestExpectation * expectation = + [self expectationWithDescription:@"PumpConfigurationAndControlReadAttributeLifetimeEnergyConsumedWithCompletionHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); @@ -34578,20 +34580,19 @@ - (void)testSendClusterPumpConfigurationAndControlWriteAttributePowerWithValue queue:queue]; XCTAssertNotNil(cluster); - NSNumber * _Nonnull value = @(0x000000); - [cluster writeAttributePowerWithValue:value - completionHandler:^(NSError * _Nullable err) { - NSLog(@"PumpConfigurationAndControl Power Error: %@", err); - XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + [cluster readAttributeLifetimeEnergyConsumedWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"PumpConfigurationAndControl LifetimeEnergyConsumed Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterPumpConfigurationAndControlReadAttributeLifetimeEnergyConsumedWithCompletionHandler + +- (void)testSendClusterPumpConfigurationAndControlWriteAttributeLifetimeEnergyConsumedWithValue { XCTestExpectation * expectation = - [self expectationWithDescription:@"PumpConfigurationAndControlReadAttributeLifetimeEnergyConsumedWithCompletionHandler"]; + [self expectationWithDescription:@"PumpConfigurationAndControlWriteAttributeLifetimeEnergyConsumedWithValue"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); @@ -34600,15 +34601,16 @@ - (void)testSendClusterPumpConfigurationAndControlReadAttributeLifetimeEnergyCon queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeLifetimeEnergyConsumedWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"PumpConfigurationAndControl LifetimeEnergyConsumed Error: %@", err); - XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + NSNumber * _Nullable value = @(0); + [cluster writeAttributeLifetimeEnergyConsumedWithValue:value + completionHandler:^(NSError * _Nullable err) { + NSLog(@"PumpConfigurationAndControl LifetimeEnergyConsumed Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } - - (void)testSendClusterPumpConfigurationAndControlReadAttributeOperationModeWithCompletionHandler { XCTestExpectation * expectation = diff --git a/third_party/zap/repo b/third_party/zap/repo index 8f0369046dbd06..adc0cd644a3f4c 160000 --- a/third_party/zap/repo +++ b/third_party/zap/repo @@ -1 +1 @@ -Subproject commit 8f0369046dbd06d2eff09a12e244373ca01119d8 +Subproject commit adc0cd644a3f4c71fd9edd7cdd271485d4af95fb diff --git a/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h b/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h index 646c53780b80dc..e5159ecc6e8a47 100644 --- a/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h +++ b/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h @@ -1226,11 +1226,11 @@ #define ZAP_TYPE(type) ZCL_##type##_ATTRIBUTE_TYPE #define ZAP_LONG_DEFAULTS_INDEX(index) \ { \ - (uint8_t *) (&generatedDefaults[index]) \ + &generatedDefaults[index] \ } #define ZAP_MIN_MAX_DEFAULTS_INDEX(index) \ { \ - (uint8_t *) (&minMaxDefault[index]) \ + &minMaxDefaults[index] \ } #define ZAP_EMPTY_DEFAULT() \ { \ @@ -1242,9 +1242,58 @@ } // This is an array of EmberAfAttributeMinMaxValue structures. -#define GENERATED_MIN_MAX_DEFAULT_COUNT 0 +#define GENERATED_MIN_MAX_DEFAULT_COUNT 27 #define GENERATED_MIN_MAX_DEFAULTS \ { \ + \ + /* Endpoint: 0, Cluster: Identify (server) */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFE }, /* identify time */ \ + \ + /* Endpoint: 1, Cluster: Identify (server) */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFE }, /* identify time */ \ + \ + /* Endpoint: 1, Cluster: On/off Switch Configuration (server) */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x2 }, /* switch actions */ \ + \ + /* Endpoint: 1, Cluster: Level Control (server) */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x3 }, /* options */ \ + \ + /* Endpoint: 1, Cluster: Binary Input (Basic) (server) */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x1 }, /* out of service */ \ + \ + /* Endpoint: 1, Cluster: Window Covering (server) */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xF }, /* Mode */ \ + \ + /* Endpoint: 1, Cluster: Pump Configuration and Control (server) */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFE }, /* OperationMode */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFE }, /* ControlMode */ \ + \ + /* Endpoint: 1, Cluster: Thermostat (server) */ \ + { (uint16_t) 0x2BC, (uint16_t) 0x954D, (uint16_t) 0x7FFF }, /* min heat setpoint limit */ \ + { (uint16_t) 0xBB8, (uint16_t) 0x954D, (uint16_t) 0x7FFF }, /* max heat setpoint limit */ \ + { (uint16_t) 0x640, (uint16_t) 0x954D, (uint16_t) 0x7FFF }, /* min cool setpoint limit */ \ + { (uint16_t) 0xC80, (uint16_t) 0x954D, (uint16_t) 0x7FFF }, /* max cool setpoint limit */ \ + { (uint16_t) 0x19, (uint16_t) 0xA, (uint16_t) 0x19 }, /* min setpoint dead band */ \ + { (uint16_t) 0x4, (uint16_t) 0x0, (uint16_t) 0x5 }, /* control sequence of operation */ \ + { (uint16_t) 0x1, (uint16_t) 0x0, (uint16_t) 0x7 }, /* system mode */ \ + \ + /* Endpoint: 1, Cluster: Thermostat User Interface Configuration (server) */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x1 }, /* temperature display mode */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x5 }, /* keypad lockout */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x1 }, /* schedule programming visibility */ \ + \ + /* Endpoint: 1, Cluster: Color Control (server) */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFEFF }, /* white point x */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFEFF }, /* white point y */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFEFF }, /* color point r x */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFEFF }, /* color point r y */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFEFF }, /* color point g x */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFEFF }, /* color point g y */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFEFF }, /* color point b x */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFEFF }, /* color point b y */ \ + { \ + (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFEFF \ + } /* start up color temperature mireds */ \ } #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask @@ -1254,9 +1303,10 @@ { \ \ /* Endpoint: 0, Cluster: Identify (server) */ \ - { 0x0000, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x0000) }, /* identify time */ \ - { 0x0001, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x0) }, /* identify type */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ + { 0x0000, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(0) }, /* identify time */ \ + { 0x0001, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x0) }, /* identify type */ \ + { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Descriptor (server) */ \ { 0x0000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* device list */ \ @@ -1455,9 +1505,10 @@ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Identify (server) */ \ - { 0x0000, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x0000) }, /* identify time */ \ - { 0x0001, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x0) }, /* identify type */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ + { 0x0000, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(1) }, /* identify time */ \ + { 0x0001, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x0) }, /* identify type */ \ + { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Groups (server) */ \ { 0x0000, ZAP_TYPE(BITMAP8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* name support */ \ @@ -1481,33 +1532,40 @@ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(4) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: On/off Switch Configuration (server) */ \ - { 0x0000, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* switch type */ \ - { 0x0010, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x00) }, /* switch actions */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ + { 0x0000, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* switch type */ \ + { 0x0010, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(2) }, /* switch actions */ \ + { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Level Control (server) */ \ - { 0x0000, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* current level */ \ - { 0x0001, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* remaining time */ \ - { 0x0002, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* min level */ \ - { 0x0003, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0xFF) }, /* max level */ \ - { 0x0004, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* current frequency */ \ - { 0x0005, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* min frequency */ \ - { 0x0006, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* max frequency */ \ - { 0x000F, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x00) }, /* options */ \ + { 0x0000, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* current level */ \ + { 0x0001, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* remaining time */ \ + { 0x0002, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* min level */ \ + { 0x0003, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0xFF) }, /* max level */ \ + { 0x0004, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* current frequency */ \ + { 0x0005, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* min frequency */ \ + { 0x0006, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* max frequency */ \ + { 0x000F, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(3) }, /* options */ \ { 0x0010, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_SIMPLE_DEFAULT(0x0000) }, /* on off transition time */ \ - { 0x0011, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0xFE) }, /* on level */ \ - { 0x0012, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* on transition time */ \ - { 0x0013, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* off transition time */ \ - { 0x0014, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* default move rate */ \ - { 0x4000, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* start up current level */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ + ZAP_SIMPLE_DEFAULT(0x0000) }, /* on off transition time */ \ + { 0x0011, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_SIMPLE_DEFAULT(0xFE) }, /* on level */ \ + { 0x0012, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_EMPTY_DEFAULT() }, /* on transition time */ \ + { 0x0013, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_EMPTY_DEFAULT() }, /* off transition time */ \ + { 0x0014, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_EMPTY_DEFAULT() }, /* default move rate */ \ + { 0x4000, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* start up current level */ \ + { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Binary Input (Basic) (server) */ \ - { 0x0051, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x00) }, /* out of service */ \ - { 0x0055, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* present value */ \ - { 0x006F, ZAP_TYPE(BITMAP8), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* status flags */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x0051, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(4) }, /* out of service */ \ + { 0x0055, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* present value */ \ + { 0x006F, ZAP_TYPE(BITMAP8), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* status flags */ \ + { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Descriptor (server) */ \ { 0x0000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* device list */ \ @@ -1600,10 +1658,11 @@ { 0x0011, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0xFFFF) }, /* InstalledClosedLimitLift */ \ { 0x0012, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* InstalledOpenLimitTilt */ \ { 0x0013, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0xFFFF) }, /* InstalledClosedLimitTilt */ \ - { 0x0017, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x00) }, /* Mode */ \ - { 0x001A, ZAP_TYPE(BITMAP16), 2, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* SafetyStatus */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(1413) }, /* FeatureMap */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(5) }, /* ClusterRevision */ \ + { 0x0017, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(5) }, /* Mode */ \ + { 0x001A, ZAP_TYPE(BITMAP16), 2, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* SafetyStatus */ \ + { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(1413) }, /* FeatureMap */ \ + { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(5) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Barrier Control (server) */ \ { 0x0001, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* barrier moving state */ \ @@ -1631,15 +1690,18 @@ { 0x0012, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* EffectiveControlMode */ \ { 0x0013, ZAP_TYPE(INT16S), 2, 0, ZAP_EMPTY_DEFAULT() }, /* Capacity */ \ { 0x0014, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* Speed */ \ - { 0x0015, ZAP_TYPE(INT24U), 3, ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_LONG_DEFAULTS_INDEX(1417) }, /* LifetimeRunningHours */ \ - { 0x0016, ZAP_TYPE(INT24U), 3, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(1420) }, /* Power */ \ - { 0x0017, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(1423) }, /* LifetimeEnergyConsumed */ \ - { 0x0020, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x00) }, /* OperationMode */ \ - { 0x0021, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x00) }, /* ControlMode */ \ - { 0x0022, ZAP_TYPE(BITMAP16), 2, 0, ZAP_EMPTY_DEFAULT() }, /* AlarmMask */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(1427) }, /* FeatureMap */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x0015, ZAP_TYPE(INT24U), 3, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_LONG_DEFAULTS_INDEX(1417) }, /* LifetimeRunningHours */ \ + { 0x0016, ZAP_TYPE(INT24U), 3, 0, ZAP_LONG_DEFAULTS_INDEX(1420) }, /* Power */ \ + { 0x0017, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_LONG_DEFAULTS_INDEX(1423) }, /* LifetimeEnergyConsumed */ \ + { 0x0020, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(6) }, /* OperationMode */ \ + { 0x0021, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(7) }, /* ControlMode */ \ + { 0x0022, ZAP_TYPE(BITMAP16), 2, 0, ZAP_EMPTY_DEFAULT() }, /* AlarmMask */ \ + { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(1427) }, /* FeatureMap */ \ + { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Thermostat (server) */ \ { 0x0000, ZAP_TYPE(INT16S), 2, 0, ZAP_EMPTY_DEFAULT() }, /* local temperature */ \ @@ -1651,29 +1713,33 @@ ZAP_SIMPLE_DEFAULT(0x0A28) }, /* occupied cooling setpoint */ \ { 0x0012, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_SIMPLE_DEFAULT(0x07D0) }, /* occupied heating setpoint */ \ - { 0x0015, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_SIMPLE_DEFAULT(0x02BC) }, /* min heat setpoint limit */ \ - { 0x0016, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_SIMPLE_DEFAULT(0x0BB8) }, /* max heat setpoint limit */ \ - { 0x0017, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_SIMPLE_DEFAULT(0x0640) }, /* min cool setpoint limit */ \ - { 0x0018, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_SIMPLE_DEFAULT(0x0C80) }, /* max cool setpoint limit */ \ - { 0x0019, ZAP_TYPE(INT8S), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x19) }, /* min setpoint dead band */ \ - { 0x001B, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_SIMPLE_DEFAULT(0x04) }, /* control sequence of operation */ \ - { 0x001C, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x01) }, /* system mode */ \ - { 0x0020, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* start of week */ \ + { 0x0015, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(8) }, /* min heat setpoint limit */ \ + { 0x0016, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(9) }, /* max heat setpoint limit */ \ + { 0x0017, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(10) }, /* min cool setpoint limit */ \ + { 0x0018, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(11) }, /* max cool setpoint limit */ \ + { 0x0019, ZAP_TYPE(INT8S), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(12) }, /* min setpoint dead band */ \ + { 0x001B, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(13) }, /* control sequence of operation */ \ + { 0x001C, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(14) }, /* system mode */ \ + { 0x0020, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* start of week */ \ { 0x0021, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(7) }, /* number of weekly transitions */ \ { 0x0022, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(4) }, /* number of daily transitions */ \ { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(1431) }, /* FeatureMap */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Thermostat User Interface Configuration (server) */ \ - { 0x0000, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x00) }, /* temperature display mode */ \ - { 0x0001, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x00) }, /* keypad lockout */ \ - { 0x0002, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_EMPTY_DEFAULT() }, /* schedule programming visibility */ \ + { 0x0000, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(15) }, /* temperature display mode */ \ + { 0x0001, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(16) }, /* keypad lockout */ \ + { 0x0002, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(17) }, /* schedule programming visibility */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Color Control (server) */ \ @@ -1706,30 +1772,38 @@ { 0x0028, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* primary 6 x */ \ { 0x0029, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* primary 6 y */ \ { 0x002A, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* primary 6 intensity */ \ - { 0x0030, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* white point x */ \ - { 0x0031, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* white point y */ \ - { 0x0032, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* color point r x */ \ - { 0x0033, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* color point r y */ \ - { 0x0034, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* color point r intensity */ \ - { 0x0036, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* color point g x */ \ - { 0x0037, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* color point g y */ \ - { 0x0038, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* color point g intensity */ \ - { 0x003A, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* color point b x */ \ - { 0x003B, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* color point b y */ \ - { 0x003C, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* color point b intensity */ \ - { 0x4000, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* enhanced current hue */ \ - { 0x4001, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x01) }, /* enhanced color mode */ \ - { 0x4002, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* color loop active */ \ - { 0x4003, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* color loop direction */ \ - { 0x4004, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0019) }, /* color loop time */ \ - { 0x4005, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x2300) }, /* color loop start enhanced hue */ \ + { 0x0030, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(18) }, /* white point x */ \ + { 0x0031, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(19) }, /* white point y */ \ + { 0x0032, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(20) }, /* color point r x */ \ + { 0x0033, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(21) }, /* color point r y */ \ + { 0x0034, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* color point r intensity */ \ + { 0x0036, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(22) }, /* color point g x */ \ + { 0x0037, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(23) }, /* color point g y */ \ + { 0x0038, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* color point g intensity */ \ + { 0x003A, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(24) }, /* color point b x */ \ + { 0x003B, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(25) }, /* color point b y */ \ + { 0x003C, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* color point b intensity */ \ + { 0x4000, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* enhanced current hue */ \ + { 0x4001, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x01) }, /* enhanced color mode */ \ + { 0x4002, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* color loop active */ \ + { 0x4003, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* color loop direction */ \ + { 0x4004, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0019) }, /* color loop time */ \ + { 0x4005, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x2300) }, /* color loop start enhanced hue */ \ { 0x4006, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* color loop stored enhanced hue */ \ { 0x400A, ZAP_TYPE(BITMAP16), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* color capabilities */ \ { 0x400B, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* color temp physical min */ \ { 0x400C, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0xFEFF) }, /* color temp physical max */ \ { 0x400D, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* couple color temp to level min-mireds */ \ - { 0x4010, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_EMPTY_DEFAULT() }, /* start up color temperature mireds */ \ + { 0x4010, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(26) }, /* start up color temperature mireds */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Illuminance Measurement (server) */ \ diff --git a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp index 04e6867ce8887d..9772199aaed0e8 100644 --- a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp +++ b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp @@ -2742,22 +2742,25 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) namespace OnLevel { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) { NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::LevelControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (NumericAttributeTraits::IsNullValue(temp)) { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + value.SetNull(); + } + else + { + value.SetNonNull() = NumericAttributeTraits::StorageToWorking(temp); } - *value = NumericAttributeTraits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ true, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } @@ -2767,26 +2770,47 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) return emberAfWriteServerAttribute(endpoint, Clusters::LevelControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } +EmberAfStatus SetNull(chip::EndpointId endpoint) +{ + NumericAttributeTraits::StorageType value; + NumericAttributeTraits::SetNull(value); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(value); + return emberAfWriteServerAttribute(endpoint, Clusters::LevelControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); +} + +EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value) +{ + if (value.IsNull()) + { + return SetNull(endpoint); + } + + return Set(endpoint, value.Value()); +} + } // namespace OnLevel namespace OnTransitionTime { -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) { NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::LevelControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (NumericAttributeTraits::IsNullValue(temp)) { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + value.SetNull(); + } + else + { + value.SetNonNull() = NumericAttributeTraits::StorageToWorking(temp); } - *value = NumericAttributeTraits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ true, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } @@ -2796,26 +2820,47 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) return emberAfWriteServerAttribute(endpoint, Clusters::LevelControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } +EmberAfStatus SetNull(chip::EndpointId endpoint) +{ + NumericAttributeTraits::StorageType value; + NumericAttributeTraits::SetNull(value); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(value); + return emberAfWriteServerAttribute(endpoint, Clusters::LevelControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); +} + +EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value) +{ + if (value.IsNull()) + { + return SetNull(endpoint); + } + + return Set(endpoint, value.Value()); +} + } // namespace OnTransitionTime namespace OffTransitionTime { -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) { NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::LevelControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (NumericAttributeTraits::IsNullValue(temp)) { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + value.SetNull(); + } + else + { + value.SetNonNull() = NumericAttributeTraits::StorageToWorking(temp); } - *value = NumericAttributeTraits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ true, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } @@ -2825,26 +2870,47 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) return emberAfWriteServerAttribute(endpoint, Clusters::LevelControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } +EmberAfStatus SetNull(chip::EndpointId endpoint) +{ + NumericAttributeTraits::StorageType value; + NumericAttributeTraits::SetNull(value); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(value); + return emberAfWriteServerAttribute(endpoint, Clusters::LevelControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); +} + +EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value) +{ + if (value.IsNull()) + { + return SetNull(endpoint); + } + + return Set(endpoint, value.Value()); +} + } // namespace OffTransitionTime namespace DefaultMoveRate { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) { NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::LevelControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (NumericAttributeTraits::IsNullValue(temp)) { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + value.SetNull(); + } + else + { + value.SetNonNull() = NumericAttributeTraits::StorageToWorking(temp); } - *value = NumericAttributeTraits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ true, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } @@ -2854,6 +2920,24 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) return emberAfWriteServerAttribute(endpoint, Clusters::LevelControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } +EmberAfStatus SetNull(chip::EndpointId endpoint) +{ + NumericAttributeTraits::StorageType value; + NumericAttributeTraits::SetNull(value); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(value); + return emberAfWriteServerAttribute(endpoint, Clusters::LevelControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); +} + +EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value) +{ + if (value.IsNull()) + { + return SetNull(endpoint); + } + + return Set(endpoint, value.Value()); +} + } // namespace DefaultMoveRate namespace StartUpCurrentLevel { @@ -11969,23 +12053,26 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) namespace LifetimeRunningHours { -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) { NumericAttributeTraits>::StorageType temp; uint8_t * readable = NumericAttributeTraits>::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits>::CanRepresentValue(/* isNullable = */ false, temp)) + if (NumericAttributeTraits>::IsNullValue(temp)) { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + value.SetNull(); + } + else + { + value.SetNonNull() = NumericAttributeTraits>::StorageToWorking(temp); } - *value = NumericAttributeTraits>::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits>::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits>::CanRepresentValue(/* isNullable = */ true, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } @@ -11996,6 +12083,25 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) ZCL_INT24U_ATTRIBUTE_TYPE); } +EmberAfStatus SetNull(chip::EndpointId endpoint) +{ + NumericAttributeTraits>::StorageType value; + NumericAttributeTraits>::SetNull(value); + uint8_t * writable = NumericAttributeTraits>::ToAttributeStoreRepresentation(value); + return emberAfWriteServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, + ZCL_INT24U_ATTRIBUTE_TYPE); +} + +EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value) +{ + if (value.IsNull()) + { + return SetNull(endpoint); + } + + return Set(endpoint, value.Value()); +} + } // namespace LifetimeRunningHours namespace Power { @@ -12031,23 +12137,26 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) namespace LifetimeEnergyConsumed { -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) { NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (NumericAttributeTraits::IsNullValue(temp)) { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + value.SetNull(); + } + else + { + value.SetNonNull() = NumericAttributeTraits::StorageToWorking(temp); } - *value = NumericAttributeTraits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ true, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } @@ -12058,6 +12167,25 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) ZCL_INT32U_ATTRIBUTE_TYPE); } +EmberAfStatus SetNull(chip::EndpointId endpoint) +{ + NumericAttributeTraits::StorageType value; + NumericAttributeTraits::SetNull(value); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(value); + return emberAfWriteServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, + ZCL_INT32U_ATTRIBUTE_TYPE); +} + +EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value) +{ + if (value.IsNull()) + { + return SetNull(endpoint); + } + + return Set(endpoint, value.Value()); +} + } // namespace LifetimeEnergyConsumed namespace OperationMode { diff --git a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h index 60ab0babe3e6c2..9b8091df3095b4 100644 --- a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h +++ b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h @@ -533,23 +533,31 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); } // namespace OnOffTransitionTime namespace OnLevel { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // int8u +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int8u EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); +EmberAfStatus SetNull(chip::EndpointId endpoint); +EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value); } // namespace OnLevel namespace OnTransitionTime { -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value); // int16u +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int16u EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); +EmberAfStatus SetNull(chip::EndpointId endpoint); +EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value); } // namespace OnTransitionTime namespace OffTransitionTime { -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value); // int16u +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int16u EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); +EmberAfStatus SetNull(chip::EndpointId endpoint); +EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value); } // namespace OffTransitionTime namespace DefaultMoveRate { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // int8u +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int8u EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); +EmberAfStatus SetNull(chip::EndpointId endpoint); +EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value); } // namespace DefaultMoveRate namespace StartUpCurrentLevel { @@ -2246,8 +2254,10 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); } // namespace Speed namespace LifetimeRunningHours { -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value); // int24u +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int24u EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); +EmberAfStatus SetNull(chip::EndpointId endpoint); +EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value); } // namespace LifetimeRunningHours namespace Power { @@ -2256,8 +2266,10 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); } // namespace Power namespace LifetimeEnergyConsumed { -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value); // int32u +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int32u EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); +EmberAfStatus SetNull(chip::EndpointId endpoint); +EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value); } // namespace LifetimeEnergyConsumed namespace OperationMode { 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 903b348781c138..7855833487e92e 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 @@ -3237,9 +3237,9 @@ struct TypeInfo namespace OnLevel { struct TypeInfo { - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; + using Type = DataModel::Nullable; + using DecodableType = DataModel::Nullable; + using DecodableArgType = const DataModel::Nullable &; static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::OnLevel::Id; } @@ -3248,9 +3248,9 @@ struct TypeInfo namespace OnTransitionTime { struct TypeInfo { - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; + using Type = DataModel::Nullable; + using DecodableType = DataModel::Nullable; + using DecodableArgType = const DataModel::Nullable &; static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::OnTransitionTime::Id; } @@ -3259,9 +3259,9 @@ struct TypeInfo namespace OffTransitionTime { struct TypeInfo { - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; + using Type = DataModel::Nullable; + using DecodableType = DataModel::Nullable; + using DecodableArgType = const DataModel::Nullable &; static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::OffTransitionTime::Id; } @@ -3270,9 +3270,9 @@ struct TypeInfo namespace DefaultMoveRate { struct TypeInfo { - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; + using Type = DataModel::Nullable; + using DecodableType = DataModel::Nullable; + using DecodableArgType = const DataModel::Nullable &; static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::DefaultMoveRate::Id; } @@ -16703,9 +16703,9 @@ struct TypeInfo namespace LifetimeRunningHours { struct TypeInfo { - using Type = uint32_t; - using DecodableType = uint32_t; - using DecodableArgType = uint32_t; + using Type = DataModel::Nullable; + using DecodableType = DataModel::Nullable; + using DecodableArgType = const DataModel::Nullable &; static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::LifetimeRunningHours::Id; } @@ -16725,9 +16725,9 @@ struct TypeInfo namespace LifetimeEnergyConsumed { struct TypeInfo { - using Type = uint32_t; - using DecodableType = uint32_t; - using DecodableArgType = uint32_t; + using Type = DataModel::Nullable; + using DecodableType = DataModel::Nullable; + using DecodableArgType = const DataModel::Nullable &; static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::LifetimeEnergyConsumed::Id; } diff --git a/zzz_generated/bridge-app/zap-generated/endpoint_config.h b/zzz_generated/bridge-app/zap-generated/endpoint_config.h index e508a81491d907..a2cb01c6bcfe46 100644 --- a/zzz_generated/bridge-app/zap-generated/endpoint_config.h +++ b/zzz_generated/bridge-app/zap-generated/endpoint_config.h @@ -558,11 +558,11 @@ #define ZAP_TYPE(type) ZCL_##type##_ATTRIBUTE_TYPE #define ZAP_LONG_DEFAULTS_INDEX(index) \ { \ - (uint8_t *) (&generatedDefaults[index]) \ + &generatedDefaults[index] \ } #define ZAP_MIN_MAX_DEFAULTS_INDEX(index) \ { \ - (uint8_t *) (&minMaxDefault[index]) \ + &minMaxDefaults[index] \ } #define ZAP_EMPTY_DEFAULT() \ { \ @@ -574,9 +574,14 @@ } // This is an array of EmberAfAttributeMinMaxValue structures. -#define GENERATED_MIN_MAX_DEFAULT_COUNT 0 +#define GENERATED_MIN_MAX_DEFAULT_COUNT 1 #define GENERATED_MIN_MAX_DEFAULTS \ { \ + \ + /* Endpoint: 1, Cluster: Level Control (server) */ \ + { \ + (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x3 \ + } /* options */ \ } #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask @@ -754,22 +759,27 @@ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(4) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Level Control (server) */ \ - { 0x0000, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* current level */ \ - { 0x0001, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* remaining time */ \ - { 0x0002, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* min level */ \ - { 0x0003, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0xFF) }, /* max level */ \ - { 0x0004, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* current frequency */ \ - { 0x0005, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* min frequency */ \ - { 0x0006, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* max frequency */ \ - { 0x000F, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x00) }, /* options */ \ + { 0x0000, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* current level */ \ + { 0x0001, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* remaining time */ \ + { 0x0002, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* min level */ \ + { 0x0003, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0xFF) }, /* max level */ \ + { 0x0004, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* current frequency */ \ + { 0x0005, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* min frequency */ \ + { 0x0006, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* max frequency */ \ + { 0x000F, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(0) }, /* options */ \ { 0x0010, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_SIMPLE_DEFAULT(0x0000) }, /* on off transition time */ \ - { 0x0011, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0xFE) }, /* on level */ \ - { 0x0012, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* on transition time */ \ - { 0x0013, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* off transition time */ \ - { 0x0014, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* default move rate */ \ - { 0x4000, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* start up current level */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ + ZAP_SIMPLE_DEFAULT(0x0000) }, /* on off transition time */ \ + { 0x0011, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_SIMPLE_DEFAULT(0xFE) }, /* on level */ \ + { 0x0012, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_EMPTY_DEFAULT() }, /* on transition time */ \ + { 0x0013, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_EMPTY_DEFAULT() }, /* off transition time */ \ + { 0x0014, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_EMPTY_DEFAULT() }, /* default move rate */ \ + { 0x4000, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* start up current level */ \ + { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Descriptor (server) */ \ { 0x0000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* device list */ \ diff --git a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h index a59989c300a72a..56e9902f9c99f5 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h @@ -32597,39 +32597,6 @@ class ReadPumpConfigurationAndControlPower : public ModelCommand new chip::Callback::Callback(OnDefaultFailureResponse, this); }; -class WritePumpConfigurationAndControlPower : public ModelCommand -{ -public: - WritePumpConfigurationAndControlPower() : ModelCommand("write") - { - AddArgument("attr-name", "power"); - AddArgument("attr-value", 0, UINT32_MAX, &mValue); - ModelCommand::AddArguments(); - } - - ~WritePumpConfigurationAndControlPower() - { - delete onSuccessCallback; - delete onFailureCallback; - } - - CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0200) command (0x01) on endpoint %" PRIu8, endpointId); - - chip::Controller::PumpConfigurationAndControlCluster cluster; - cluster.Associate(device, endpointId); - return cluster.WriteAttributePower(onSuccessCallback->Cancel(), onFailureCallback->Cancel(), mValue); - } - -private: - chip::Callback::Callback * onSuccessCallback = - new chip::Callback::Callback(OnDefaultSuccessResponse, this); - chip::Callback::Callback * onFailureCallback = - new chip::Callback::Callback(OnDefaultFailureResponse, this); - uint32_t mValue; -}; - class ReportPumpConfigurationAndControlPower : public ModelCommand { public: @@ -32716,6 +32683,39 @@ class ReadPumpConfigurationAndControlLifetimeEnergyConsumed : public ModelComman new chip::Callback::Callback(OnDefaultFailureResponse, this); }; +class WritePumpConfigurationAndControlLifetimeEnergyConsumed : public ModelCommand +{ +public: + WritePumpConfigurationAndControlLifetimeEnergyConsumed() : ModelCommand("write") + { + AddArgument("attr-name", "lifetime-energy-consumed"); + AddArgument("attr-value", 0, UINT32_MAX, &mValue); + ModelCommand::AddArguments(); + } + + ~WritePumpConfigurationAndControlLifetimeEnergyConsumed() + { + delete onSuccessCallback; + delete onFailureCallback; + } + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0200) command (0x01) on endpoint %" PRIu8, endpointId); + + chip::Controller::PumpConfigurationAndControlCluster cluster; + cluster.Associate(device, endpointId); + return cluster.WriteAttributeLifetimeEnergyConsumed(onSuccessCallback->Cancel(), onFailureCallback->Cancel(), mValue); + } + +private: + chip::Callback::Callback * onSuccessCallback = + new chip::Callback::Callback(OnDefaultSuccessResponse, this); + chip::Callback::Callback * onFailureCallback = + new chip::Callback::Callback(OnDefaultFailureResponse, this); + uint32_t mValue; +}; + class ReportPumpConfigurationAndControlLifetimeEnergyConsumed : public ModelCommand { public: @@ -54126,9 +54126,9 @@ void registerClusterPumpConfigurationAndControl(Commands & commands) make_unique(), // make_unique(), // make_unique(), // - make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index c862884a3ef01f..c729eea617ae69 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -15324,7 +15324,7 @@ class Test_TC_LVL_3_1 : public TestCommand (static_cast(context))->OnFailureResponse_10(chip::to_underlying(status)); } - static void OnSuccessCallback_10(void * context, uint8_t defaultMoveRate) + static void OnSuccessCallback_10(void * context, const chip::app::DataModel::Nullable & defaultMoveRate) { (static_cast(context))->OnSuccessResponse_10(defaultMoveRate); } @@ -15502,8 +15502,8 @@ class Test_TC_LVL_3_1 : public TestCommand chip::Controller::LevelControlClusterTest cluster; cluster.Associate(mDevice, endpoint); - uint8_t defaultMoveRateArgument; - defaultMoveRateArgument = 20; + chip::app::DataModel::Nullable defaultMoveRateArgument; + defaultMoveRateArgument.SetNonNull() = 20; return cluster.WriteAttribute( defaultMoveRateArgument, this, OnSuccessCallback_9, OnFailureCallback_9); @@ -15525,9 +15525,10 @@ class Test_TC_LVL_3_1 : public TestCommand void OnFailureResponse_10(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_10(uint8_t defaultMoveRate) + void OnSuccessResponse_10(const chip::app::DataModel::Nullable & defaultMoveRate) { - VerifyOrReturn(CheckValue("defaultMoveRate", defaultMoveRate, 20)); + VerifyOrReturn(CheckValueNonNull("defaultMoveRate", defaultMoveRate)); + VerifyOrReturn(CheckValue("defaultMoveRate.Value()", defaultMoveRate.Value(), 20)); NextTest(); } diff --git a/zzz_generated/controller-clusters/zap-generated/CHIPClusters.cpp b/zzz_generated/controller-clusters/zap-generated/CHIPClusters.cpp index 2267654cf7012e..a63531d430b837 100644 --- a/zzz_generated/controller-clusters/zap-generated/CHIPClusters.cpp +++ b/zzz_generated/controller-clusters/zap-generated/CHIPClusters.cpp @@ -14057,17 +14057,6 @@ CHIP_ERROR PumpConfigurationAndControlCluster::ReadAttributePower(Callback::Canc BasicAttributeFilter); } -CHIP_ERROR PumpConfigurationAndControlCluster::WriteAttributePower(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint32_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, PumpConfigurationAndControl::Attributes::Power::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} - CHIP_ERROR PumpConfigurationAndControlCluster::SubscribeAttributePower(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint16_t minInterval, uint16_t maxInterval) @@ -14096,6 +14085,19 @@ CHIP_ERROR PumpConfigurationAndControlCluster::ReadAttributeLifetimeEnergyConsum BasicAttributeFilter); } +CHIP_ERROR PumpConfigurationAndControlCluster::WriteAttributeLifetimeEnergyConsumed(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint32_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, PumpConfigurationAndControl::Attributes::LifetimeEnergyConsumed::Id), + value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + CHIP_ERROR PumpConfigurationAndControlCluster::SubscribeAttributeLifetimeEnergyConsumed(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint16_t minInterval, uint16_t maxInterval) diff --git a/zzz_generated/controller-clusters/zap-generated/CHIPClusters.h b/zzz_generated/controller-clusters/zap-generated/CHIPClusters.h index 3f0f292d4c6295..2c23c3386ab8dd 100644 --- a/zzz_generated/controller-clusters/zap-generated/CHIPClusters.h +++ b/zzz_generated/controller-clusters/zap-generated/CHIPClusters.h @@ -1944,8 +1944,8 @@ class DLL_EXPORT PumpConfigurationAndControlCluster : public ClusterBase CHIP_ERROR ReadAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback); CHIP_ERROR WriteAttributeLifetimeRunningHours(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint32_t value); - CHIP_ERROR WriteAttributePower(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint32_t value); + CHIP_ERROR WriteAttributeLifetimeEnergyConsumed(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint32_t value); CHIP_ERROR WriteAttributeOperationMode(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint8_t value); CHIP_ERROR WriteAttributeControlMode(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, diff --git a/zzz_generated/controller-clusters/zap-generated/endpoint_config.h b/zzz_generated/controller-clusters/zap-generated/endpoint_config.h index 50cb612f860727..f64db749d28538 100644 --- a/zzz_generated/controller-clusters/zap-generated/endpoint_config.h +++ b/zzz_generated/controller-clusters/zap-generated/endpoint_config.h @@ -90,11 +90,11 @@ #define ZAP_TYPE(type) ZCL_##type##_ATTRIBUTE_TYPE #define ZAP_LONG_DEFAULTS_INDEX(index) \ { \ - (uint8_t *) (&generatedDefaults[index]) \ + &generatedDefaults[index] \ } #define ZAP_MIN_MAX_DEFAULTS_INDEX(index) \ { \ - (uint8_t *) (&minMaxDefault[index]) \ + &minMaxDefaults[index] \ } #define ZAP_EMPTY_DEFAULT() \ { \ diff --git a/zzz_generated/controller-clusters/zap-generated/tests/CHIPClustersTest.cpp b/zzz_generated/controller-clusters/zap-generated/tests/CHIPClustersTest.cpp index 727069746b1a15..e62284967bc6d7 100644 --- a/zzz_generated/controller-clusters/zap-generated/tests/CHIPClustersTest.cpp +++ b/zzz_generated/controller-clusters/zap-generated/tests/CHIPClustersTest.cpp @@ -2381,16 +2381,14 @@ CHIP_ERROR PumpConfigurationAndControlClusterTest::WriteAttributeSpeed(Callback: chip::app::AttributePathParams(mEndpoint, mClusterId, PumpConfigurationAndControl::Attributes::Speed::Id), value)); return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); } -CHIP_ERROR PumpConfigurationAndControlClusterTest::WriteAttributeLifetimeEnergyConsumed(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint32_t value) +CHIP_ERROR PumpConfigurationAndControlClusterTest::WriteAttributePower(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint32_t value) { app::WriteClientHandle handle; ReturnErrorOnFailure( app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, PumpConfigurationAndControl::Attributes::LifetimeEnergyConsumed::Id), - value)); + chip::app::AttributePathParams(mEndpoint, mClusterId, PumpConfigurationAndControl::Attributes::Power::Id), value)); return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); } CHIP_ERROR PumpConfigurationAndControlClusterTest::WriteAttributeAlarmMask(Callback::Cancelable * onSuccessCallback, diff --git a/zzz_generated/controller-clusters/zap-generated/tests/CHIPClustersTest.h b/zzz_generated/controller-clusters/zap-generated/tests/CHIPClustersTest.h index bb6096ca8f7124..250ac262652dc4 100644 --- a/zzz_generated/controller-clusters/zap-generated/tests/CHIPClustersTest.h +++ b/zzz_generated/controller-clusters/zap-generated/tests/CHIPClustersTest.h @@ -816,8 +816,8 @@ class DLL_EXPORT PumpConfigurationAndControlClusterTest : public PumpConfigurati int16_t value); CHIP_ERROR WriteAttributeSpeed(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint16_t value); - CHIP_ERROR WriteAttributeLifetimeEnergyConsumed(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint32_t value); + CHIP_ERROR WriteAttributePower(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint32_t value); CHIP_ERROR WriteAttributeAlarmMask(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint16_t value); CHIP_ERROR WriteAttributeFeatureMap(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, diff --git a/zzz_generated/lighting-app/zap-generated/endpoint_config.h b/zzz_generated/lighting-app/zap-generated/endpoint_config.h index dbb525890ac48f..eac66699b844ef 100644 --- a/zzz_generated/lighting-app/zap-generated/endpoint_config.h +++ b/zzz_generated/lighting-app/zap-generated/endpoint_config.h @@ -522,11 +522,11 @@ #define ZAP_TYPE(type) ZCL_##type##_ATTRIBUTE_TYPE #define ZAP_LONG_DEFAULTS_INDEX(index) \ { \ - (uint8_t *) (&generatedDefaults[index]) \ + &generatedDefaults[index] \ } #define ZAP_MIN_MAX_DEFAULTS_INDEX(index) \ { \ - (uint8_t *) (&minMaxDefault[index]) \ + &minMaxDefaults[index] \ } #define ZAP_EMPTY_DEFAULT() \ { \ @@ -538,9 +538,23 @@ } // This is an array of EmberAfAttributeMinMaxValue structures. -#define GENERATED_MIN_MAX_DEFAULT_COUNT 0 +#define GENERATED_MIN_MAX_DEFAULT_COUNT 4 #define GENERATED_MIN_MAX_DEFAULTS \ { \ + \ + /* Endpoint: 1, Cluster: Identify (server) */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFE }, /* identify time */ \ + \ + /* Endpoint: 1, Cluster: Level Control (server) */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x3 }, /* options */ \ + \ + /* Endpoint: 1, Cluster: Color Control (server) */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFEFF }, /* start up color temperature mireds */ \ + \ + /* Endpoint: 2, Cluster: On/off Switch Configuration (server) */ \ + { \ + (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x2 \ + } /* switch actions */ \ } #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask @@ -722,9 +736,10 @@ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Identify (server) */ \ - { 0x0000, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x0000) }, /* identify time */ \ - { 0x0001, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x0) }, /* identify type */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ + { 0x0000, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(0) }, /* identify time */ \ + { 0x0001, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x0) }, /* identify type */ \ + { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: On/Off (server) */ \ { 0x0000, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* OnOff */ \ @@ -736,22 +751,27 @@ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(4) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Level Control (server) */ \ - { 0x0000, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* current level */ \ - { 0x0001, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* remaining time */ \ - { 0x0002, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* min level */ \ - { 0x0003, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0xFF) }, /* max level */ \ - { 0x0004, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* current frequency */ \ - { 0x0005, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* min frequency */ \ - { 0x0006, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* max frequency */ \ - { 0x000F, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x00) }, /* options */ \ + { 0x0000, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* current level */ \ + { 0x0001, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* remaining time */ \ + { 0x0002, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* min level */ \ + { 0x0003, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0xFF) }, /* max level */ \ + { 0x0004, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* current frequency */ \ + { 0x0005, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* min frequency */ \ + { 0x0006, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* max frequency */ \ + { 0x000F, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(1) }, /* options */ \ { 0x0010, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_SIMPLE_DEFAULT(0x0000) }, /* on off transition time */ \ - { 0x0011, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0xFE) }, /* on level */ \ - { 0x0012, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* on transition time */ \ - { 0x0013, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* off transition time */ \ - { 0x0014, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* default move rate */ \ - { 0x4000, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* start up current level */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ + ZAP_SIMPLE_DEFAULT(0x0000) }, /* on off transition time */ \ + { 0x0011, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_SIMPLE_DEFAULT(0xFE) }, /* on level */ \ + { 0x0012, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_EMPTY_DEFAULT() }, /* on transition time */ \ + { 0x0013, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_EMPTY_DEFAULT() }, /* off transition time */ \ + { 0x0014, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_EMPTY_DEFAULT() }, /* default move rate */ \ + { 0x4000, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* start up current level */ \ + { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Descriptor (server) */ \ { 0x0000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* device list */ \ @@ -781,8 +801,8 @@ { 0x400B, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* color temp physical min */ \ { 0x400C, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0xFEFF) }, /* color temp physical max */ \ { 0x400D, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* couple color temp to level min-mireds */ \ - { 0x4010, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_EMPTY_DEFAULT() }, /* start up color temperature mireds */ \ + { 0x4010, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(2) }, /* start up color temperature mireds */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Occupancy Sensing (server) */ \ @@ -795,9 +815,10 @@ { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ \ /* Endpoint: 2, Cluster: On/off Switch Configuration (server) */ \ - { 0x0000, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* switch type */ \ - { 0x0010, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x00) }, /* switch actions */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ + { 0x0000, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* switch type */ \ + { 0x0010, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(3) }, /* switch actions */ \ + { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ } // This is an array of EmberAfCluster structures. diff --git a/zzz_generated/lock-app/zap-generated/endpoint_config.h b/zzz_generated/lock-app/zap-generated/endpoint_config.h index 87a9f0a262ad2c..352e54a5242791 100644 --- a/zzz_generated/lock-app/zap-generated/endpoint_config.h +++ b/zzz_generated/lock-app/zap-generated/endpoint_config.h @@ -522,11 +522,11 @@ #define ZAP_TYPE(type) ZCL_##type##_ATTRIBUTE_TYPE #define ZAP_LONG_DEFAULTS_INDEX(index) \ { \ - (uint8_t *) (&generatedDefaults[index]) \ + &generatedDefaults[index] \ } #define ZAP_MIN_MAX_DEFAULTS_INDEX(index) \ { \ - (uint8_t *) (&minMaxDefault[index]) \ + &minMaxDefaults[index] \ } #define ZAP_EMPTY_DEFAULT() \ { \ diff --git a/zzz_generated/ota-provider-app/zap-generated/endpoint_config.h b/zzz_generated/ota-provider-app/zap-generated/endpoint_config.h index 184edefd92d5d6..71dabda397a4e2 100644 --- a/zzz_generated/ota-provider-app/zap-generated/endpoint_config.h +++ b/zzz_generated/ota-provider-app/zap-generated/endpoint_config.h @@ -98,11 +98,11 @@ #define ZAP_TYPE(type) ZCL_##type##_ATTRIBUTE_TYPE #define ZAP_LONG_DEFAULTS_INDEX(index) \ { \ - (uint8_t *) (&generatedDefaults[index]) \ + &generatedDefaults[index] \ } #define ZAP_MIN_MAX_DEFAULTS_INDEX(index) \ { \ - (uint8_t *) (&minMaxDefault[index]) \ + &minMaxDefaults[index] \ } #define ZAP_EMPTY_DEFAULT() \ { \ diff --git a/zzz_generated/ota-requestor-app/zap-generated/endpoint_config.h b/zzz_generated/ota-requestor-app/zap-generated/endpoint_config.h index 49644a8adc5d98..c5aff2e4eb6783 100644 --- a/zzz_generated/ota-requestor-app/zap-generated/endpoint_config.h +++ b/zzz_generated/ota-requestor-app/zap-generated/endpoint_config.h @@ -98,11 +98,11 @@ #define ZAP_TYPE(type) ZCL_##type##_ATTRIBUTE_TYPE #define ZAP_LONG_DEFAULTS_INDEX(index) \ { \ - (uint8_t *) (&generatedDefaults[index]) \ + &generatedDefaults[index] \ } #define ZAP_MIN_MAX_DEFAULTS_INDEX(index) \ { \ - (uint8_t *) (&minMaxDefault[index]) \ + &minMaxDefaults[index] \ } #define ZAP_EMPTY_DEFAULT() \ { \ diff --git a/zzz_generated/placeholder/app1/zap-generated/endpoint_config.h b/zzz_generated/placeholder/app1/zap-generated/endpoint_config.h index 15f4a0ff026eda..9c108eead6c1bb 100644 --- a/zzz_generated/placeholder/app1/zap-generated/endpoint_config.h +++ b/zzz_generated/placeholder/app1/zap-generated/endpoint_config.h @@ -144,11 +144,11 @@ #define ZAP_TYPE(type) ZCL_##type##_ATTRIBUTE_TYPE #define ZAP_LONG_DEFAULTS_INDEX(index) \ { \ - (uint8_t *) (&generatedDefaults[index]) \ + &generatedDefaults[index] \ } #define ZAP_MIN_MAX_DEFAULTS_INDEX(index) \ { \ - (uint8_t *) (&minMaxDefault[index]) \ + &minMaxDefaults[index] \ } #define ZAP_EMPTY_DEFAULT() \ { \ @@ -160,9 +160,17 @@ } // This is an array of EmberAfAttributeMinMaxValue structures. -#define GENERATED_MIN_MAX_DEFAULT_COUNT 0 +#define GENERATED_MIN_MAX_DEFAULT_COUNT 2 #define GENERATED_MIN_MAX_DEFAULTS \ { \ + \ + /* Endpoint: 1, Cluster: Identify (server) */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFE }, /* identify time */ \ + \ + /* Endpoint: 1, Cluster: Color Control (server) */ \ + { \ + (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFEFF \ + } /* start up color temperature mireds */ \ } #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask @@ -210,9 +218,10 @@ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Identify (server) */ \ - { 0x0000, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x0) }, /* identify time */ \ - { 0x0001, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x0) }, /* identify type */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ + { 0x0000, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(0) }, /* identify time */ \ + { 0x0001, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x0) }, /* identify type */ \ + { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Groups (server) */ \ { 0x0000, ZAP_TYPE(BITMAP8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* name support */ \ @@ -255,8 +264,8 @@ { 0x0004, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x607D) }, /* current y */ \ { 0x000F, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x00) }, /* color control options */ \ { 0x400D, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* couple color temp to level min-mireds */ \ - { 0x4010, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_EMPTY_DEFAULT() }, /* start up color temperature mireds */ \ + { 0x4010, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(1) }, /* start up color temperature mireds */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ } diff --git a/zzz_generated/placeholder/app2/zap-generated/endpoint_config.h b/zzz_generated/placeholder/app2/zap-generated/endpoint_config.h index 0d92b359ab4303..2bc2d8587f0dc2 100644 --- a/zzz_generated/placeholder/app2/zap-generated/endpoint_config.h +++ b/zzz_generated/placeholder/app2/zap-generated/endpoint_config.h @@ -144,11 +144,11 @@ #define ZAP_TYPE(type) ZCL_##type##_ATTRIBUTE_TYPE #define ZAP_LONG_DEFAULTS_INDEX(index) \ { \ - (uint8_t *) (&generatedDefaults[index]) \ + &generatedDefaults[index] \ } #define ZAP_MIN_MAX_DEFAULTS_INDEX(index) \ { \ - (uint8_t *) (&minMaxDefault[index]) \ + &minMaxDefaults[index] \ } #define ZAP_EMPTY_DEFAULT() \ { \ @@ -160,9 +160,14 @@ } // This is an array of EmberAfAttributeMinMaxValue structures. -#define GENERATED_MIN_MAX_DEFAULT_COUNT 0 +#define GENERATED_MIN_MAX_DEFAULT_COUNT 1 #define GENERATED_MIN_MAX_DEFAULTS \ { \ + \ + /* Endpoint: 1, Cluster: Identify (server) */ \ + { \ + (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFE \ + } /* identify time */ \ } #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask @@ -210,9 +215,10 @@ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Identify (server) */ \ - { 0x0000, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x0) }, /* identify time */ \ - { 0x0001, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x0) }, /* identify type */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ + { 0x0000, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(0) }, /* identify time */ \ + { 0x0001, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x0) }, /* identify type */ \ + { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Groups (server) */ \ { 0x0000, ZAP_TYPE(BITMAP8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* name support */ \ diff --git a/zzz_generated/pump-app/zap-generated/endpoint_config.h b/zzz_generated/pump-app/zap-generated/endpoint_config.h index 4fe5f355c91b23..52c1de77aefafe 100644 --- a/zzz_generated/pump-app/zap-generated/endpoint_config.h +++ b/zzz_generated/pump-app/zap-generated/endpoint_config.h @@ -540,11 +540,11 @@ #define ZAP_TYPE(type) ZCL_##type##_ATTRIBUTE_TYPE #define ZAP_LONG_DEFAULTS_INDEX(index) \ { \ - (uint8_t *) (&generatedDefaults[index]) \ + &generatedDefaults[index] \ } #define ZAP_MIN_MAX_DEFAULTS_INDEX(index) \ { \ - (uint8_t *) (&minMaxDefault[index]) \ + &minMaxDefaults[index] \ } #define ZAP_EMPTY_DEFAULT() \ { \ @@ -556,9 +556,15 @@ } // This is an array of EmberAfAttributeMinMaxValue structures. -#define GENERATED_MIN_MAX_DEFAULT_COUNT 0 +#define GENERATED_MIN_MAX_DEFAULT_COUNT 2 #define GENERATED_MIN_MAX_DEFAULTS \ { \ + \ + /* Endpoint: 1, Cluster: Pump Configuration and Control (server) */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFE }, /* OperationMode */ \ + { \ + (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFE \ + } /* ControlMode */ \ } #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask @@ -764,15 +770,18 @@ { 0x0012, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* EffectiveControlMode */ \ { 0x0013, ZAP_TYPE(INT16S), 2, 0, ZAP_EMPTY_DEFAULT() }, /* Capacity */ \ { 0x0014, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* Speed */ \ - { 0x0015, ZAP_TYPE(INT24U), 3, ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_LONG_DEFAULTS_INDEX(595) }, /* LifetimeRunningHours */ \ - { 0x0016, ZAP_TYPE(INT24U), 3, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(598) }, /* Power */ \ - { 0x0017, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(601) }, /* LifetimeEnergyConsumed */ \ - { 0x0020, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x00) }, /* OperationMode */ \ - { 0x0021, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x00) }, /* ControlMode */ \ - { 0x0022, ZAP_TYPE(BITMAP16), 2, 0, ZAP_EMPTY_DEFAULT() }, /* AlarmMask */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(605) }, /* FeatureMap */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x0015, ZAP_TYPE(INT24U), 3, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_LONG_DEFAULTS_INDEX(595) }, /* LifetimeRunningHours */ \ + { 0x0016, ZAP_TYPE(INT24U), 3, 0, ZAP_LONG_DEFAULTS_INDEX(598) }, /* Power */ \ + { 0x0017, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_LONG_DEFAULTS_INDEX(601) }, /* LifetimeEnergyConsumed */ \ + { 0x0020, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(0) }, /* OperationMode */ \ + { 0x0021, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(1) }, /* ControlMode */ \ + { 0x0022, ZAP_TYPE(BITMAP16), 2, 0, ZAP_EMPTY_DEFAULT() }, /* AlarmMask */ \ + { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(605) }, /* FeatureMap */ \ + { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Temperature Measurement (client) */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ diff --git a/zzz_generated/pump-controller-app/zap-generated/endpoint_config.h b/zzz_generated/pump-controller-app/zap-generated/endpoint_config.h index 7243731f95b495..953f763645f888 100644 --- a/zzz_generated/pump-controller-app/zap-generated/endpoint_config.h +++ b/zzz_generated/pump-controller-app/zap-generated/endpoint_config.h @@ -512,11 +512,11 @@ #define ZAP_TYPE(type) ZCL_##type##_ATTRIBUTE_TYPE #define ZAP_LONG_DEFAULTS_INDEX(index) \ { \ - (uint8_t *) (&generatedDefaults[index]) \ + &generatedDefaults[index] \ } #define ZAP_MIN_MAX_DEFAULTS_INDEX(index) \ { \ - (uint8_t *) (&minMaxDefault[index]) \ + &minMaxDefaults[index] \ } #define ZAP_EMPTY_DEFAULT() \ { \ diff --git a/zzz_generated/temperature-measurement-app/zap-generated/endpoint_config.h b/zzz_generated/temperature-measurement-app/zap-generated/endpoint_config.h index f125fbface4894..788acee2fcfb0b 100644 --- a/zzz_generated/temperature-measurement-app/zap-generated/endpoint_config.h +++ b/zzz_generated/temperature-measurement-app/zap-generated/endpoint_config.h @@ -244,11 +244,11 @@ #define ZAP_TYPE(type) ZCL_##type##_ATTRIBUTE_TYPE #define ZAP_LONG_DEFAULTS_INDEX(index) \ { \ - (uint8_t *) (&generatedDefaults[index]) \ + &generatedDefaults[index] \ } #define ZAP_MIN_MAX_DEFAULTS_INDEX(index) \ { \ - (uint8_t *) (&minMaxDefault[index]) \ + &minMaxDefaults[index] \ } #define ZAP_EMPTY_DEFAULT() \ { \ diff --git a/zzz_generated/thermostat/zap-generated/endpoint_config.h b/zzz_generated/thermostat/zap-generated/endpoint_config.h index 23c3f6cd7fa1e2..f22e8f60fda957 100644 --- a/zzz_generated/thermostat/zap-generated/endpoint_config.h +++ b/zzz_generated/thermostat/zap-generated/endpoint_config.h @@ -606,11 +606,11 @@ #define ZAP_TYPE(type) ZCL_##type##_ATTRIBUTE_TYPE #define ZAP_LONG_DEFAULTS_INDEX(index) \ { \ - (uint8_t *) (&generatedDefaults[index]) \ + &generatedDefaults[index] \ } #define ZAP_MIN_MAX_DEFAULTS_INDEX(index) \ { \ - (uint8_t *) (&minMaxDefault[index]) \ + &minMaxDefaults[index] \ } #define ZAP_EMPTY_DEFAULT() \ { \ @@ -622,9 +622,26 @@ } // This is an array of EmberAfAttributeMinMaxValue structures. -#define GENERATED_MIN_MAX_DEFAULT_COUNT 0 +#define GENERATED_MIN_MAX_DEFAULT_COUNT 9 #define GENERATED_MIN_MAX_DEFAULTS \ { \ + \ + /* Endpoint: 0, Cluster: Identify (server) */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFE }, /* identify time */ \ + \ + /* Endpoint: 1, Cluster: Identify (server) */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFE }, /* identify time */ \ + \ + /* Endpoint: 1, Cluster: Thermostat (server) */ \ + { (uint16_t) 0x2BC, (uint16_t) 0x954D, (uint16_t) 0x7FFF }, /* min heat setpoint limit */ \ + { (uint16_t) 0xBB8, (uint16_t) 0x954D, (uint16_t) 0x7FFF }, /* max heat setpoint limit */ \ + { (uint16_t) 0x640, (uint16_t) 0x954D, (uint16_t) 0x7FFF }, /* min cool setpoint limit */ \ + { (uint16_t) 0xC80, (uint16_t) 0x954D, (uint16_t) 0x7FFF }, /* max cool setpoint limit */ \ + { (uint16_t) 0x19, (uint16_t) 0xA, (uint16_t) 0x19 }, /* min setpoint dead band */ \ + { (uint16_t) 0x4, (uint16_t) 0x0, (uint16_t) 0x5 }, /* control sequence of operation */ \ + { \ + (uint16_t) 0x1, (uint16_t) 0x0, (uint16_t) 0x7 \ + } /* system mode */ \ } #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask @@ -634,8 +651,9 @@ { \ \ /* Endpoint: 0, Cluster: Identify (server) */ \ - { 0x0000, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x0000) }, /* identify time */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ + { 0x0000, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(0) }, /* identify time */ \ + { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Descriptor (server) */ \ { 0x0000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* device list */ \ @@ -826,9 +844,10 @@ { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Identify (server) */ \ - { 0x0000, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x0000) }, /* identify time */ \ - { 0x0001, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x0) }, /* identify type */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ + { 0x0000, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(1) }, /* identify time */ \ + { 0x0001, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x0) }, /* identify type */ \ + { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Groups (server) */ \ { 0x0000, ZAP_TYPE(BITMAP8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* name support */ \ @@ -868,15 +887,21 @@ ZAP_SIMPLE_DEFAULT(0x0A28) }, /* occupied cooling setpoint */ \ { 0x0012, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_SIMPLE_DEFAULT(0x07D0) }, /* occupied heating setpoint */ \ - { 0x0015, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(700) }, /* min heat setpoint limit */ \ - { 0x0016, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(3000) }, /* max heat setpoint limit */ \ - { 0x0017, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(1600) }, /* min cool setpoint limit */ \ - { 0x0018, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(3200) }, /* max cool setpoint limit */ \ - { 0x0019, ZAP_TYPE(INT8S), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x19) }, /* min setpoint dead band */ \ - { 0x001B, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_SIMPLE_DEFAULT(0x04) }, /* control sequence of operation */ \ - { 0x001C, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x01) }, /* system mode */ \ - { 0x0020, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* start of week */ \ + { 0x0015, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(2) }, /* min heat setpoint limit */ \ + { 0x0016, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(3) }, /* max heat setpoint limit */ \ + { 0x0017, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(4) }, /* min cool setpoint limit */ \ + { 0x0018, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(5) }, /* max cool setpoint limit */ \ + { 0x0019, ZAP_TYPE(INT8S), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(6) }, /* min setpoint dead band */ \ + { 0x001B, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(7) }, /* control sequence of operation */ \ + { 0x001C, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(8) }, /* system mode */ \ + { 0x0020, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* start of week */ \ { 0x0021, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(7) }, /* number of weekly transitions */ \ { 0x0022, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(4) }, /* number of daily transitions */ \ { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(1124) }, /* FeatureMap */ \ diff --git a/zzz_generated/tv-app/zap-generated/endpoint_config.h b/zzz_generated/tv-app/zap-generated/endpoint_config.h index c873086e9b26e2..e72102dd5107c0 100644 --- a/zzz_generated/tv-app/zap-generated/endpoint_config.h +++ b/zzz_generated/tv-app/zap-generated/endpoint_config.h @@ -1010,11 +1010,11 @@ #define ZAP_TYPE(type) ZCL_##type##_ATTRIBUTE_TYPE #define ZAP_LONG_DEFAULTS_INDEX(index) \ { \ - (uint8_t *) (&generatedDefaults[index]) \ + &generatedDefaults[index] \ } #define ZAP_MIN_MAX_DEFAULTS_INDEX(index) \ { \ - (uint8_t *) (&minMaxDefault[index]) \ + &minMaxDefaults[index] \ } #define ZAP_EMPTY_DEFAULT() \ { \ @@ -1026,9 +1026,14 @@ } // This is an array of EmberAfAttributeMinMaxValue structures. -#define GENERATED_MIN_MAX_DEFAULT_COUNT 0 +#define GENERATED_MIN_MAX_DEFAULT_COUNT 1 #define GENERATED_MIN_MAX_DEFAULTS \ { \ + \ + /* Endpoint: 2, Cluster: Level Control (server) */ \ + { \ + (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x3 \ + } /* options */ \ } #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask @@ -1287,22 +1292,27 @@ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(4) }, /* ClusterRevision */ \ \ /* Endpoint: 2, Cluster: Level Control (server) */ \ - { 0x0000, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* current level */ \ - { 0x0001, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* remaining time */ \ - { 0x0002, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* min level */ \ - { 0x0003, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0xFF) }, /* max level */ \ - { 0x0004, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* current frequency */ \ - { 0x0005, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* min frequency */ \ - { 0x0006, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* max frequency */ \ - { 0x000F, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x00) }, /* options */ \ + { 0x0000, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* current level */ \ + { 0x0001, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* remaining time */ \ + { 0x0002, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* min level */ \ + { 0x0003, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0xFF) }, /* max level */ \ + { 0x0004, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* current frequency */ \ + { 0x0005, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* min frequency */ \ + { 0x0006, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* max frequency */ \ + { 0x000F, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(0) }, /* options */ \ { 0x0010, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_SIMPLE_DEFAULT(0x0000) }, /* on off transition time */ \ - { 0x0011, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0xFE) }, /* on level */ \ - { 0x0012, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* on transition time */ \ - { 0x0013, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* off transition time */ \ - { 0x0014, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* default move rate */ \ - { 0x4000, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* start up current level */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ + ZAP_SIMPLE_DEFAULT(0x0000) }, /* on off transition time */ \ + { 0x0011, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_SIMPLE_DEFAULT(0xFE) }, /* on level */ \ + { 0x0012, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_EMPTY_DEFAULT() }, /* on transition time */ \ + { 0x0013, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_EMPTY_DEFAULT() }, /* off transition time */ \ + { 0x0014, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_EMPTY_DEFAULT() }, /* default move rate */ \ + { 0x4000, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* start up current level */ \ + { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ \ /* Endpoint: 2, Cluster: Descriptor (server) */ \ { 0x0000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* device list */ \ diff --git a/zzz_generated/tv-casting-app/zap-generated/endpoint_config.h b/zzz_generated/tv-casting-app/zap-generated/endpoint_config.h index 8094d61eef64e7..df8eea42a2c944 100644 --- a/zzz_generated/tv-casting-app/zap-generated/endpoint_config.h +++ b/zzz_generated/tv-casting-app/zap-generated/endpoint_config.h @@ -1020,11 +1020,11 @@ #define ZAP_TYPE(type) ZCL_##type##_ATTRIBUTE_TYPE #define ZAP_LONG_DEFAULTS_INDEX(index) \ { \ - (uint8_t *) (&generatedDefaults[index]) \ + &generatedDefaults[index] \ } #define ZAP_MIN_MAX_DEFAULTS_INDEX(index) \ { \ - (uint8_t *) (&minMaxDefault[index]) \ + &minMaxDefaults[index] \ } #define ZAP_EMPTY_DEFAULT() \ { \ @@ -1036,9 +1036,38 @@ } // This is an array of EmberAfAttributeMinMaxValue structures. -#define GENERATED_MIN_MAX_DEFAULT_COUNT 0 +#define GENERATED_MIN_MAX_DEFAULT_COUNT 15 #define GENERATED_MIN_MAX_DEFAULTS \ { \ + \ + /* Endpoint: 1, Cluster: Identify (server) */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFE }, /* identify time */ \ + \ + /* Endpoint: 1, Cluster: Level Control (server) */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x3 }, /* options */ \ + \ + /* Endpoint: 1, Cluster: Binary Input (Basic) (server) */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x1 }, /* out of service */ \ + \ + /* Endpoint: 1, Cluster: Window Covering (server) */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xF }, /* Mode */ \ + \ + /* Endpoint: 1, Cluster: Thermostat (server) */ \ + { (uint16_t) 0x4, (uint16_t) 0x0, (uint16_t) 0x5 }, /* control sequence of operation */ \ + { (uint16_t) 0x1, (uint16_t) 0x0, (uint16_t) 0x7 }, /* system mode */ \ + \ + /* Endpoint: 1, Cluster: Color Control (server) */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFEFF }, /* white point x */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFEFF }, /* white point y */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFEFF }, /* color point r x */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFEFF }, /* color point r y */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFEFF }, /* color point g x */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFEFF }, /* color point g y */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFEFF }, /* color point b x */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFEFF }, /* color point b y */ \ + { \ + (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFEFF \ + } /* start up color temperature mireds */ \ } #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask @@ -1239,8 +1268,9 @@ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Identify (server) */ \ - { 0x0000, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x0000) }, /* identify time */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ + { 0x0000, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(0) }, /* identify time */ \ + { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Groups (server) */ \ { 0x0000, ZAP_TYPE(BITMAP8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* name support */ \ @@ -1264,28 +1294,34 @@ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(4) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Level Control (server) */ \ - { 0x0000, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* current level */ \ - { 0x0001, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* remaining time */ \ - { 0x0002, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* min level */ \ - { 0x0003, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0xFF) }, /* max level */ \ - { 0x0004, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* current frequency */ \ - { 0x0005, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* min frequency */ \ - { 0x0006, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* max frequency */ \ - { 0x000F, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x00) }, /* options */ \ + { 0x0000, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* current level */ \ + { 0x0001, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* remaining time */ \ + { 0x0002, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* min level */ \ + { 0x0003, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0xFF) }, /* max level */ \ + { 0x0004, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* current frequency */ \ + { 0x0005, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* min frequency */ \ + { 0x0006, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* max frequency */ \ + { 0x000F, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(1) }, /* options */ \ { 0x0010, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_SIMPLE_DEFAULT(0x0000) }, /* on off transition time */ \ - { 0x0011, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0xFE) }, /* on level */ \ - { 0x0012, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* on transition time */ \ - { 0x0013, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* off transition time */ \ - { 0x0014, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* default move rate */ \ - { 0x4000, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* start up current level */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ + ZAP_SIMPLE_DEFAULT(0x0000) }, /* on off transition time */ \ + { 0x0011, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_SIMPLE_DEFAULT(0xFE) }, /* on level */ \ + { 0x0012, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_EMPTY_DEFAULT() }, /* on transition time */ \ + { 0x0013, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_EMPTY_DEFAULT() }, /* off transition time */ \ + { 0x0014, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_EMPTY_DEFAULT() }, /* default move rate */ \ + { 0x4000, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* start up current level */ \ + { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Binary Input (Basic) (server) */ \ - { 0x0051, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x00) }, /* out of service */ \ - { 0x0055, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* present value */ \ - { 0x006F, ZAP_TYPE(BITMAP8), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* status flags */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x0051, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(2) }, /* out of service */ \ + { 0x0055, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* present value */ \ + { 0x006F, ZAP_TYPE(BITMAP8), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* status flags */ \ + { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Descriptor (server) */ \ { 0x0000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* device list */ \ @@ -1345,9 +1381,10 @@ { 0x0011, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0xFFFF) }, /* InstalledClosedLimitLift */ \ { 0x0012, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* InstalledOpenLimitTilt */ \ { 0x0013, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0xFFFF) }, /* InstalledClosedLimitTilt */ \ - { 0x0017, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x00) }, /* Mode */ \ - { 0x001A, ZAP_TYPE(BITMAP16), 2, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* SafetyStatus */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ + { 0x0017, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(3) }, /* Mode */ \ + { 0x001A, ZAP_TYPE(BITMAP16), 2, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* SafetyStatus */ \ + { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Barrier Control (server) */ \ { 0x0001, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* barrier moving state */ \ @@ -1362,10 +1399,11 @@ ZAP_SIMPLE_DEFAULT(0x0A28) }, /* occupied cooling setpoint */ \ { 0x0012, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_SIMPLE_DEFAULT(0x07D0) }, /* occupied heating setpoint */ \ - { 0x001B, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_SIMPLE_DEFAULT(0x04) }, /* control sequence of operation */ \ - { 0x001C, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x01) }, /* system mode */ \ - { 0x0020, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* start of week */ \ + { 0x001B, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(4) }, /* control sequence of operation */ \ + { 0x001C, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(5) }, /* system mode */ \ + { 0x0020, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* start of week */ \ { 0x0021, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(7) }, /* number of weekly transitions */ \ { 0x0022, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(4) }, /* number of daily transitions */ \ { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(1382) }, /* FeatureMap */ \ @@ -1401,28 +1439,36 @@ { 0x0028, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* primary 6 x */ \ { 0x0029, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* primary 6 y */ \ { 0x002A, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* primary 6 intensity */ \ - { 0x0030, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* white point x */ \ - { 0x0031, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* white point y */ \ - { 0x0032, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* color point r x */ \ - { 0x0033, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* color point r y */ \ - { 0x0034, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* color point r intensity */ \ - { 0x0036, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* color point g x */ \ - { 0x0037, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* color point g y */ \ - { 0x0038, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* color point g intensity */ \ - { 0x003A, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* color point b x */ \ - { 0x003B, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* color point b y */ \ - { 0x003C, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* color point b intensity */ \ - { 0x4000, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* enhanced current hue */ \ - { 0x4001, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x01) }, /* enhanced color mode */ \ - { 0x4002, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* color loop active */ \ - { 0x4003, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* color loop direction */ \ - { 0x4004, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0019) }, /* color loop time */ \ - { 0x400A, ZAP_TYPE(BITMAP16), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* color capabilities */ \ - { 0x400B, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* color temp physical min */ \ - { 0x400C, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0xFEFF) }, /* color temp physical max */ \ + { 0x0030, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(6) }, /* white point x */ \ + { 0x0031, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(7) }, /* white point y */ \ + { 0x0032, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(8) }, /* color point r x */ \ + { 0x0033, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(9) }, /* color point r y */ \ + { 0x0034, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* color point r intensity */ \ + { 0x0036, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(10) }, /* color point g x */ \ + { 0x0037, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(11) }, /* color point g y */ \ + { 0x0038, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* color point g intensity */ \ + { 0x003A, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(12) }, /* color point b x */ \ + { 0x003B, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(13) }, /* color point b y */ \ + { 0x003C, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* color point b intensity */ \ + { 0x4000, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* enhanced current hue */ \ + { 0x4001, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x01) }, /* enhanced color mode */ \ + { 0x4002, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* color loop active */ \ + { 0x4003, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* color loop direction */ \ + { 0x4004, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0019) }, /* color loop time */ \ + { 0x400A, ZAP_TYPE(BITMAP16), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* color capabilities */ \ + { 0x400B, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* color temp physical min */ \ + { 0x400C, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0xFEFF) }, /* color temp physical max */ \ { 0x400D, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* couple color temp to level min-mireds */ \ - { 0x4010, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_EMPTY_DEFAULT() }, /* start up color temperature mireds */ \ + { 0x4010, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(14) }, /* start up color temperature mireds */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Temperature Measurement (server) */ \ diff --git a/zzz_generated/window-app/zap-generated/endpoint_config.h b/zzz_generated/window-app/zap-generated/endpoint_config.h index 7493e0332b4668..e9f7f5edefae04 100644 --- a/zzz_generated/window-app/zap-generated/endpoint_config.h +++ b/zzz_generated/window-app/zap-generated/endpoint_config.h @@ -560,11 +560,11 @@ #define ZAP_TYPE(type) ZCL_##type##_ATTRIBUTE_TYPE #define ZAP_LONG_DEFAULTS_INDEX(index) \ { \ - (uint8_t *) (&generatedDefaults[index]) \ + &generatedDefaults[index] \ } #define ZAP_MIN_MAX_DEFAULTS_INDEX(index) \ { \ - (uint8_t *) (&minMaxDefault[index]) \ + &minMaxDefaults[index] \ } #define ZAP_EMPTY_DEFAULT() \ { \ @@ -576,9 +576,17 @@ } // This is an array of EmberAfAttributeMinMaxValue structures. -#define GENERATED_MIN_MAX_DEFAULT_COUNT 0 +#define GENERATED_MIN_MAX_DEFAULT_COUNT 3 #define GENERATED_MIN_MAX_DEFAULTS \ { \ + \ + /* Endpoint: 1, Cluster: Identify (server) */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFE }, /* identify time */ \ + \ + /* Endpoint: 1, Cluster: Window Covering (server) */ \ + { (uint16_t) 0x14, (uint16_t) 0x0, (uint16_t) 0xF }, /* Mode */ \ + \ + /* Endpoint: 2, Cluster: Window Covering (server) */ { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xF } /* Mode */ \ } #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask @@ -764,9 +772,10 @@ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Identify (server) */ \ - { 0x0000, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x0000) }, /* identify time */ \ - { 0x0001, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x0) }, /* identify type */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ + { 0x0000, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(0) }, /* identify time */ \ + { 0x0001, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x0) }, /* identify type */ \ + { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Descriptor (server) */ \ { 0x0000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* device list */ \ @@ -792,10 +801,11 @@ { 0x0011, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0xFFFF) }, /* InstalledClosedLimitLift */ \ { 0x0012, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* InstalledOpenLimitTilt */ \ { 0x0013, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0xFFFF) }, /* InstalledClosedLimitTilt */ \ - { 0x0017, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x14) }, /* Mode */ \ - { 0x001A, ZAP_TYPE(BITMAP16), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* SafetyStatus */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(615) }, /* FeatureMap */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(5) }, /* ClusterRevision */ \ + { 0x0017, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(1) }, /* Mode */ \ + { 0x001A, ZAP_TYPE(BITMAP16), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* SafetyStatus */ \ + { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(615) }, /* FeatureMap */ \ + { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(5) }, /* ClusterRevision */ \ \ /* Endpoint: 2, Cluster: Descriptor (server) */ \ { 0x0000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* device list */ \ @@ -821,10 +831,11 @@ { 0x0011, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0xFFFF) }, /* InstalledClosedLimitLift */ \ { 0x0012, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* InstalledOpenLimitTilt */ \ { 0x0013, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0xFFFF) }, /* InstalledClosedLimitTilt */ \ - { 0x0017, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x00) }, /* Mode */ \ - { 0x001A, ZAP_TYPE(BITMAP16), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* SafetyStatus */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(619) }, /* FeatureMap */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(5) }, /* ClusterRevision */ \ + { 0x0017, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(2) }, /* Mode */ \ + { 0x001A, ZAP_TYPE(BITMAP16), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* SafetyStatus */ \ + { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(619) }, /* FeatureMap */ \ + { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(5) }, /* ClusterRevision */ \ } // This is an array of EmberAfCluster structures.