diff --git a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter index a51a1a38380504..68285788abe004 100644 --- a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter +++ b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter @@ -1318,14 +1318,14 @@ server cluster EthernetNetworkDiagnostics = 55 { k400g = 9; } - readonly attribute enum8 PHYRate = 0; - readonly attribute boolean fullDuplex = 1; + readonly attribute nullable PHYRateType PHYRate = 0; + readonly attribute nullable boolean fullDuplex = 1; readonly attribute int64u packetRxCount = 2; readonly attribute int64u packetTxCount = 3; readonly attribute int64u txErrCount = 4; readonly attribute int64u collisionCount = 5; readonly attribute int64u overrunCount = 6; - readonly attribute boolean carrierDetect = 7; + readonly attribute nullable boolean carrierDetect = 7; readonly attribute int64u timeSinceReset = 8; readonly global attribute bitmap32 featureMap = 65532; readonly global attribute int16u clusterRevision = 65533; diff --git a/examples/bridge-app/bridge-common/bridge-app.matter b/examples/bridge-app/bridge-common/bridge-app.matter index c097c824910f5e..13a7f3d7804ad4 100644 --- a/examples/bridge-app/bridge-common/bridge-app.matter +++ b/examples/bridge-app/bridge-common/bridge-app.matter @@ -260,14 +260,14 @@ server cluster EthernetNetworkDiagnostics = 55 { k400g = 9; } - readonly attribute enum8 PHYRate = 0; - readonly attribute boolean fullDuplex = 1; + readonly attribute nullable PHYRateType PHYRate = 0; + readonly attribute nullable boolean fullDuplex = 1; readonly attribute int64u packetRxCount = 2; readonly attribute int64u packetTxCount = 3; readonly attribute int64u txErrCount = 4; readonly attribute int64u collisionCount = 5; readonly attribute int64u overrunCount = 6; - readonly attribute boolean carrierDetect = 7; + readonly attribute nullable boolean carrierDetect = 7; readonly attribute int64u timeSinceReset = 8; readonly global attribute bitmap32 featureMap = 65532; readonly global attribute int16u clusterRevision = 65533; diff --git a/examples/door-lock-app/door-lock-common/door-lock-app.matter b/examples/door-lock-app/door-lock-common/door-lock-app.matter index 82cf27d5d76245..e994c385313be0 100644 --- a/examples/door-lock-app/door-lock-common/door-lock-app.matter +++ b/examples/door-lock-app/door-lock-common/door-lock-app.matter @@ -737,14 +737,14 @@ server cluster EthernetNetworkDiagnostics = 55 { k400g = 9; } - readonly attribute enum8 PHYRate = 0; - readonly attribute boolean fullDuplex = 1; + readonly attribute nullable PHYRateType PHYRate = 0; + readonly attribute nullable boolean fullDuplex = 1; readonly attribute int64u packetRxCount = 2; readonly attribute int64u packetTxCount = 3; readonly attribute int64u txErrCount = 4; readonly attribute int64u collisionCount = 5; readonly attribute int64u overrunCount = 6; - readonly attribute boolean carrierDetect = 7; + readonly attribute nullable boolean carrierDetect = 7; readonly attribute int64u timeSinceReset = 8; readonly global attribute bitmap32 featureMap = 65532; readonly global attribute int16u clusterRevision = 65533; diff --git a/examples/light-switch-app/light-switch-common/light-switch-app.matter b/examples/light-switch-app/light-switch-common/light-switch-app.matter index 4d55543b099037..b46e9af6ca9b65 100644 --- a/examples/light-switch-app/light-switch-common/light-switch-app.matter +++ b/examples/light-switch-app/light-switch-common/light-switch-app.matter @@ -447,14 +447,14 @@ server cluster EthernetNetworkDiagnostics = 55 { k400g = 9; } - readonly attribute enum8 PHYRate = 0; - readonly attribute boolean fullDuplex = 1; + readonly attribute nullable PHYRateType PHYRate = 0; + readonly attribute nullable boolean fullDuplex = 1; readonly attribute int64u packetRxCount = 2; readonly attribute int64u packetTxCount = 3; readonly attribute int64u txErrCount = 4; readonly attribute int64u collisionCount = 5; readonly attribute int64u overrunCount = 6; - readonly attribute boolean carrierDetect = 7; + readonly attribute nullable boolean carrierDetect = 7; readonly attribute int64u timeSinceReset = 8; readonly global attribute bitmap32 featureMap = 65532; readonly global attribute int16u clusterRevision = 65533; diff --git a/examples/lighting-app/lighting-common/lighting-app.matter b/examples/lighting-app/lighting-common/lighting-app.matter index 82aae8a7c09438..6e59dd7f6b3c2c 100644 --- a/examples/lighting-app/lighting-common/lighting-app.matter +++ b/examples/lighting-app/lighting-common/lighting-app.matter @@ -452,14 +452,14 @@ server cluster EthernetNetworkDiagnostics = 55 { k400g = 9; } - readonly attribute enum8 PHYRate = 0; - readonly attribute boolean fullDuplex = 1; + readonly attribute nullable PHYRateType PHYRate = 0; + readonly attribute nullable boolean fullDuplex = 1; readonly attribute int64u packetRxCount = 2; readonly attribute int64u packetTxCount = 3; readonly attribute int64u txErrCount = 4; readonly attribute int64u collisionCount = 5; readonly attribute int64u overrunCount = 6; - readonly attribute boolean carrierDetect = 7; + readonly attribute nullable boolean carrierDetect = 7; readonly attribute int64u timeSinceReset = 8; readonly global attribute bitmap32 featureMap = 65532; readonly global attribute int16u clusterRevision = 65533; diff --git a/examples/lock-app/lock-common/lock-app.matter b/examples/lock-app/lock-common/lock-app.matter index d161f034fdb9f9..fdc976a4a65294 100644 --- a/examples/lock-app/lock-common/lock-app.matter +++ b/examples/lock-app/lock-common/lock-app.matter @@ -198,14 +198,14 @@ server cluster EthernetNetworkDiagnostics = 55 { k400g = 9; } - readonly attribute enum8 PHYRate = 0; - readonly attribute boolean fullDuplex = 1; + readonly attribute nullable PHYRateType PHYRate = 0; + readonly attribute nullable boolean fullDuplex = 1; readonly attribute int64u packetRxCount = 2; readonly attribute int64u packetTxCount = 3; readonly attribute int64u txErrCount = 4; readonly attribute int64u collisionCount = 5; readonly attribute int64u overrunCount = 6; - readonly attribute boolean carrierDetect = 7; + readonly attribute nullable boolean carrierDetect = 7; readonly attribute int64u timeSinceReset = 8; readonly global attribute bitmap32 featureMap = 65532; readonly global attribute int16u clusterRevision = 65533; diff --git a/examples/pump-controller-app/pump-controller-common/pump-controller-app.matter b/examples/pump-controller-app/pump-controller-common/pump-controller-app.matter index ea637490d1d035..65a2636078dcf5 100644 --- a/examples/pump-controller-app/pump-controller-common/pump-controller-app.matter +++ b/examples/pump-controller-app/pump-controller-common/pump-controller-app.matter @@ -198,14 +198,14 @@ server cluster EthernetNetworkDiagnostics = 55 { k400g = 9; } - readonly attribute enum8 PHYRate = 0; - readonly attribute boolean fullDuplex = 1; + readonly attribute nullable PHYRateType PHYRate = 0; + readonly attribute nullable boolean fullDuplex = 1; readonly attribute int64u packetRxCount = 2; readonly attribute int64u packetTxCount = 3; readonly attribute int64u txErrCount = 4; readonly attribute int64u collisionCount = 5; readonly attribute int64u overrunCount = 6; - readonly attribute boolean carrierDetect = 7; + readonly attribute nullable boolean carrierDetect = 7; readonly attribute int64u timeSinceReset = 8; readonly global attribute bitmap32 featureMap = 65532; readonly global attribute int16u clusterRevision = 65533; diff --git a/examples/temperature-measurement-app/esp32/main/temperature-measurement.matter b/examples/temperature-measurement-app/esp32/main/temperature-measurement.matter index 154ca83bea567c..785c64339fcfc6 100644 --- a/examples/temperature-measurement-app/esp32/main/temperature-measurement.matter +++ b/examples/temperature-measurement-app/esp32/main/temperature-measurement.matter @@ -198,14 +198,14 @@ server cluster EthernetNetworkDiagnostics = 55 { k400g = 9; } - readonly attribute enum8 PHYRate = 0; - readonly attribute boolean fullDuplex = 1; + readonly attribute nullable PHYRateType PHYRate = 0; + readonly attribute nullable boolean fullDuplex = 1; readonly attribute int64u packetRxCount = 2; readonly attribute int64u packetTxCount = 3; readonly attribute int64u txErrCount = 4; readonly attribute int64u collisionCount = 5; readonly attribute int64u overrunCount = 6; - readonly attribute boolean carrierDetect = 7; + readonly attribute nullable boolean carrierDetect = 7; readonly attribute int64u timeSinceReset = 8; readonly global attribute bitmap32 featureMap = 65532; readonly global attribute int16u clusterRevision = 65533; diff --git a/examples/thermostat/thermostat-common/thermostat.matter b/examples/thermostat/thermostat-common/thermostat.matter index 2fe1a8271cb6b0..ab2b892dfd3ad8 100644 --- a/examples/thermostat/thermostat-common/thermostat.matter +++ b/examples/thermostat/thermostat-common/thermostat.matter @@ -219,14 +219,14 @@ server cluster EthernetNetworkDiagnostics = 55 { k400g = 9; } - readonly attribute enum8 PHYRate = 0; - readonly attribute boolean fullDuplex = 1; + readonly attribute nullable PHYRateType PHYRate = 0; + readonly attribute nullable boolean fullDuplex = 1; readonly attribute int64u packetRxCount = 2; readonly attribute int64u packetTxCount = 3; readonly attribute int64u txErrCount = 4; readonly attribute int64u collisionCount = 5; readonly attribute int64u overrunCount = 6; - readonly attribute boolean carrierDetect = 7; + readonly attribute nullable boolean carrierDetect = 7; readonly attribute int64u timeSinceReset = 8; readonly global attribute bitmap32 featureMap = 65532; readonly global attribute int16u clusterRevision = 65533; diff --git a/examples/tv-app/tv-common/tv-app.matter b/examples/tv-app/tv-common/tv-app.matter index c15b12d97a5244..4f07fd6d020926 100644 --- a/examples/tv-app/tv-common/tv-app.matter +++ b/examples/tv-app/tv-common/tv-app.matter @@ -527,14 +527,14 @@ server cluster EthernetNetworkDiagnostics = 55 { k400g = 9; } - readonly attribute enum8 PHYRate = 0; - readonly attribute boolean fullDuplex = 1; + readonly attribute nullable PHYRateType PHYRate = 0; + readonly attribute nullable boolean fullDuplex = 1; readonly attribute int64u packetRxCount = 2; readonly attribute int64u packetTxCount = 3; readonly attribute int64u txErrCount = 4; readonly attribute int64u collisionCount = 5; readonly attribute int64u overrunCount = 6; - readonly attribute boolean carrierDetect = 7; + readonly attribute nullable boolean carrierDetect = 7; readonly attribute int64u timeSinceReset = 8; readonly global attribute bitmap32 featureMap = 65532; readonly global attribute int16u clusterRevision = 65533; diff --git a/examples/tv-casting-app/tv-casting-common/tv-casting-app.matter b/examples/tv-casting-app/tv-casting-common/tv-casting-app.matter index 5bb9d36960f58c..b41a504fa3ea3a 100644 --- a/examples/tv-casting-app/tv-casting-common/tv-casting-app.matter +++ b/examples/tv-casting-app/tv-casting-common/tv-casting-app.matter @@ -1244,14 +1244,14 @@ server cluster EthernetNetworkDiagnostics = 55 { k400g = 9; } - readonly attribute enum8 PHYRate = 0; - readonly attribute boolean fullDuplex = 1; + readonly attribute nullable PHYRateType PHYRate = 0; + readonly attribute nullable boolean fullDuplex = 1; readonly attribute int64u packetRxCount = 2; readonly attribute int64u packetTxCount = 3; readonly attribute int64u txErrCount = 4; readonly attribute int64u collisionCount = 5; readonly attribute int64u overrunCount = 6; - readonly attribute boolean carrierDetect = 7; + readonly attribute nullable boolean carrierDetect = 7; readonly attribute int64u timeSinceReset = 8; readonly global attribute bitmap32 featureMap = 65532; readonly global attribute int16u clusterRevision = 65533; diff --git a/examples/window-app/common/window-app.matter b/examples/window-app/common/window-app.matter index acdbe50dee1417..831a7526c5735c 100644 --- a/examples/window-app/common/window-app.matter +++ b/examples/window-app/common/window-app.matter @@ -168,14 +168,14 @@ server cluster EthernetNetworkDiagnostics = 55 { k400g = 9; } - readonly attribute enum8 PHYRate = 0; - readonly attribute boolean fullDuplex = 1; + readonly attribute nullable PHYRateType PHYRate = 0; + readonly attribute nullable boolean fullDuplex = 1; readonly attribute int64u packetRxCount = 2; readonly attribute int64u packetTxCount = 3; readonly attribute int64u txErrCount = 4; readonly attribute int64u collisionCount = 5; readonly attribute int64u overrunCount = 6; - readonly attribute boolean carrierDetect = 7; + readonly attribute nullable boolean carrierDetect = 7; readonly attribute int64u timeSinceReset = 8; readonly global attribute bitmap32 featureMap = 65532; readonly global attribute int16u clusterRevision = 65533; diff --git a/src/app/clusters/ethernet-network-diagnostics-server/ethernet-network-diagnostics-server.cpp b/src/app/clusters/ethernet-network-diagnostics-server/ethernet-network-diagnostics-server.cpp index d22005ba58cbe6..d79a3129335050 100644 --- a/src/app/clusters/ethernet-network-diagnostics-server/ethernet-network-diagnostics-server.cpp +++ b/src/app/clusters/ethernet-network-diagnostics-server/ethernet-network-diagnostics-server.cpp @@ -47,6 +47,10 @@ class EthernetDiagosticsAttrAccess : public AttributeAccessInterface private: template CHIP_ERROR ReadIfSupported(CHIP_ERROR (DiagnosticDataProvider::*getter)(T &), AttributeValueEncoder & aEncoder); + + CHIP_ERROR ReadPHYRate(AttributeValueEncoder & aEncoder); + CHIP_ERROR ReadFullDuplex(AttributeValueEncoder & aEncoder); + CHIP_ERROR ReadCarrierDetect(AttributeValueEncoder & aEncoder); }; template @@ -67,6 +71,61 @@ CHIP_ERROR EthernetDiagosticsAttrAccess::ReadIfSupported(CHIP_ERROR (DiagnosticD return aEncoder.Encode(data); } +CHIP_ERROR EthernetDiagosticsAttrAccess::ReadPHYRate(AttributeValueEncoder & aEncoder) +{ + Attributes::PHYRate::TypeInfo::Type pHYRate; + uint8_t value = 0; + + if (DeviceLayer::GetDiagnosticDataProvider().GetEthPHYRate(value) == CHIP_NO_ERROR) + { + pHYRate.SetNonNull(static_cast(value)); + ChipLogProgress(Zcl, "The current nominal, usable speed at the top of the physical layer of the Node: %d", value); + } + else + { + ChipLogProgress(Zcl, "The Ethernet interface is not currently configured or operational"); + } + + return aEncoder.Encode(pHYRate); +} + +CHIP_ERROR EthernetDiagosticsAttrAccess::ReadFullDuplex(AttributeValueEncoder & aEncoder) +{ + Attributes::FullDuplex::TypeInfo::Type fullDuplex; + bool value = 0; + + if (DeviceLayer::GetDiagnosticDataProvider().GetEthFullDuplex(value) == CHIP_NO_ERROR) + { + fullDuplex.SetNonNull(value); + ChipLogProgress(Zcl, "The full-duplex operating status of Node: %d", value); + } + else + { + ChipLogProgress(Zcl, "The Ethernet interface is not currently configured or operational"); + } + + return aEncoder.Encode(fullDuplex); +} + +CHIP_ERROR EthernetDiagosticsAttrAccess::ReadCarrierDetect(AttributeValueEncoder & aEncoder) +{ + Attributes::CarrierDetect::TypeInfo::Type carrierDetect; + bool value = 0; + + if (DeviceLayer::GetDiagnosticDataProvider().GetEthCarrierDetect(value) == CHIP_NO_ERROR) + { + carrierDetect.SetNonNull(value); + ChipLogProgress(Zcl, "The status of the Carrier Detect control signal present on the ethernet network interface: %d", + value); + } + else + { + ChipLogProgress(Zcl, "The Ethernet interface is not currently configured or operational"); + } + + return aEncoder.Encode(carrierDetect); +} + EthernetDiagosticsAttrAccess gAttrAccess; CHIP_ERROR EthernetDiagosticsAttrAccess::Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) @@ -80,13 +139,13 @@ CHIP_ERROR EthernetDiagosticsAttrAccess::Read(const ConcreteReadAttributePath & switch (aPath.mAttributeId) { case PHYRate::Id: { - return ReadIfSupported(&DiagnosticDataProvider::GetEthPHYRate, aEncoder); + return ReadPHYRate(aEncoder); } case FullDuplex::Id: { - return ReadIfSupported(&DiagnosticDataProvider::GetEthFullDuplex, aEncoder); + return ReadFullDuplex(aEncoder); } case CarrierDetect::Id: { - return ReadIfSupported(&DiagnosticDataProvider::GetEthCarrierDetect, aEncoder); + return ReadCarrierDetect(aEncoder); } case TimeSinceReset::Id: { return ReadIfSupported(&DiagnosticDataProvider::GetEthTimeSinceReset, aEncoder); diff --git a/src/app/zap-templates/zcl/data-model/chip/ethernet-network-diagnostics-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/ethernet-network-diagnostics-cluster.xml index 5f1f0fe30dfade..ff74895c18fe29 100644 --- a/src/app/zap-templates/zcl/data-model/chip/ethernet-network-diagnostics-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/ethernet-network-diagnostics-cluster.xml @@ -35,14 +35,14 @@ limitations under the License. 0x0037 ETHERNET_NETWORK_DIAGNOSTICS_CLUSTER The Ethernet Network Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. - PHYRate - FullDuplex + PHYRate + FullDuplex PacketRxCount PacketTxCount TxErrCount CollisionCount OverrunCount - CarrierDetect + CarrierDetect TimeSinceReset Reception of this command SHALL reset the attributes: PacketRxCount, PacketTxCount, TxErrCount, CollisionCount, OverrunCount to 0 diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter index deda22970b2c33..aef5495dbe1b61 100644 --- a/src/controller/data_model/controller-clusters.matter +++ b/src/controller/data_model/controller-clusters.matter @@ -1619,14 +1619,14 @@ client cluster EthernetNetworkDiagnostics = 55 { k400g = 9; } - readonly attribute enum8 PHYRate = 0; - readonly attribute boolean fullDuplex = 1; + readonly attribute nullable PHYRateType PHYRate = 0; + readonly attribute nullable boolean fullDuplex = 1; readonly attribute int64u packetRxCount = 2; readonly attribute int64u packetTxCount = 3; readonly attribute int64u txErrCount = 4; readonly attribute int64u collisionCount = 5; readonly attribute int64u overrunCount = 6; - readonly attribute boolean carrierDetect = 7; + readonly attribute nullable boolean carrierDetect = 7; readonly attribute int64u timeSinceReset = 8; readonly global attribute command_id serverGeneratedCommandList[] = 65528; readonly global attribute command_id clientGeneratedCommandList[] = 65529; diff --git a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp index 16c6954b0dddec..6c3329fe5028c0 100644 --- a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp +++ b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp @@ -4662,10 +4662,17 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR return nullptr; } jobject value; - std::string valueClassName = "java/lang/Integer"; - std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + if (cppValue.IsNull()) + { + value = nullptr; + } + else + { + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + static_cast(cppValue.Value()), value); + } return value; } case Attributes::FullDuplex::Id: { @@ -4677,10 +4684,17 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR return nullptr; } jobject value; - std::string valueClassName = "java/lang/Boolean"; - std::string valueCtorSignature = "(Z)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), cppValue, - value); + if (cppValue.IsNull()) + { + value = nullptr; + } + else + { + std::string valueClassName = "java/lang/Boolean"; + std::string valueCtorSignature = "(Z)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + cppValue.Value(), value); + } return value; } case Attributes::PacketRxCount::Id: { @@ -4767,10 +4781,17 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR return nullptr; } jobject value; - std::string valueClassName = "java/lang/Boolean"; - std::string valueCtorSignature = "(Z)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), cppValue, - value); + if (cppValue.IsNull()) + { + value = nullptr; + } + else + { + std::string valueClassName = "java/lang/Boolean"; + std::string valueCtorSignature = "(Z)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + cppValue.Value(), value); + } return value; } case Attributes::TimeSinceReset::Id: { diff --git a/src/controller/java/zap-generated/CHIPClusters-JNI.cpp b/src/controller/java/zap-generated/CHIPClusters-JNI.cpp index 3accb6c018eecc..feb21490f5bad9 100644 --- a/src/controller/java/zap-generated/CHIPClusters-JNI.cpp +++ b/src/controller/java/zap-generated/CHIPClusters-JNI.cpp @@ -13065,8 +13065,10 @@ JNI_METHOD(void, EthernetNetworkDiagnosticsCluster, subscribePHYRateAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - std::unique_ptr onSuccess( - Platform::New(callback, true), chip::Platform::Delete); + std::unique_ptr + onSuccess(Platform::New(callback, true), + chip::Platform::Delete); VerifyOrReturn(onSuccess.get() != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); @@ -13088,9 +13090,9 @@ JNI_METHOD(void, EthernetNetworkDiagnosticsCluster, subscribePHYRateAttribute) onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, - static_cast(minInterval), static_cast(maxInterval), - CHIPInt8uAttributeCallback::OnSubscriptionEstablished); + err = cppCluster->SubscribeAttribute( + onSuccess->mContext, successFn->mCall, failureFn->mCall, static_cast(minInterval), + static_cast(maxInterval), CHIPEthernetNetworkDiagnosticsPHYRateAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -13102,8 +13104,10 @@ JNI_METHOD(void, EthernetNetworkDiagnosticsCluster, subscribeFullDuplexAttribute (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - std::unique_ptr onSuccess( - Platform::New(callback, true), chip::Platform::Delete); + std::unique_ptr + onSuccess(Platform::New(callback, true), + chip::Platform::Delete); VerifyOrReturn(onSuccess.get() != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); @@ -13125,9 +13129,9 @@ JNI_METHOD(void, EthernetNetworkDiagnosticsCluster, subscribeFullDuplexAttribute onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, - static_cast(minInterval), static_cast(maxInterval), - CHIPBooleanAttributeCallback::OnSubscriptionEstablished); + err = cppCluster->SubscribeAttribute( + onSuccess->mContext, successFn->mCall, failureFn->mCall, static_cast(minInterval), + static_cast(maxInterval), CHIPEthernetNetworkDiagnosticsFullDuplexAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -13328,8 +13332,10 @@ JNI_METHOD(void, EthernetNetworkDiagnosticsCluster, subscribeCarrierDetectAttrib (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - std::unique_ptr onSuccess( - Platform::New(callback, true), chip::Platform::Delete); + std::unique_ptr + onSuccess(Platform::New(callback, true), + chip::Platform::Delete); VerifyOrReturn(onSuccess.get() != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); @@ -13352,9 +13358,10 @@ JNI_METHOD(void, EthernetNetworkDiagnosticsCluster, subscribeCarrierDetectAttrib onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, - static_cast(minInterval), static_cast(maxInterval), - CHIPBooleanAttributeCallback::OnSubscriptionEstablished); + err = cppCluster->SubscribeAttribute( + onSuccess->mContext, successFn->mCall, failureFn->mCall, static_cast(minInterval), + static_cast(maxInterval), + CHIPEthernetNetworkDiagnosticsCarrierDetectAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); diff --git a/src/controller/java/zap-generated/CHIPReadCallbacks.cpp b/src/controller/java/zap-generated/CHIPReadCallbacks.cpp index 34ddf3fbb76759..22f8516e54f838 100644 --- a/src/controller/java/zap-generated/CHIPReadCallbacks.cpp +++ b/src/controller/java/zap-generated/CHIPReadCallbacks.cpp @@ -6434,6 +6434,207 @@ void CHIPElectricalMeasurementAttributeListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } +CHIPEthernetNetworkDiagnosticsPHYRateAttributeCallback::CHIPEthernetNetworkDiagnosticsPHYRateAttributeCallback(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"); + } +} + +CHIPEthernetNetworkDiagnosticsPHYRateAttributeCallback::~CHIPEthernetNetworkDiagnosticsPHYRateAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPEthernetNetworkDiagnosticsPHYRateAttributeCallback::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; + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + static_cast(value.Value()), javaValue); + } + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPEthernetNetworkDiagnosticsFullDuplexAttributeCallback::CHIPEthernetNetworkDiagnosticsFullDuplexAttributeCallback( + 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"); + } +} + +CHIPEthernetNetworkDiagnosticsFullDuplexAttributeCallback::~CHIPEthernetNetworkDiagnosticsFullDuplexAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPEthernetNetworkDiagnosticsFullDuplexAttributeCallback::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/Boolean;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Boolean"; + std::string javaValueCtorSignature = "(Z)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); + } + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPEthernetNetworkDiagnosticsCarrierDetectAttributeCallback::CHIPEthernetNetworkDiagnosticsCarrierDetectAttributeCallback( + 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"); + } +} + +CHIPEthernetNetworkDiagnosticsCarrierDetectAttributeCallback::~CHIPEthernetNetworkDiagnosticsCarrierDetectAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPEthernetNetworkDiagnosticsCarrierDetectAttributeCallback::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/Boolean;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Boolean"; + std::string javaValueCtorSignature = "(Z)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); + } + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + CHIPEthernetNetworkDiagnosticsServerGeneratedCommandListAttributeCallback:: CHIPEthernetNetworkDiagnosticsServerGeneratedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : chip::Callback::Callback(CallbackFn, diff --git a/src/controller/java/zap-generated/CHIPReadCallbacks.h b/src/controller/java/zap-generated/CHIPReadCallbacks.h index b64db9fec5fc1c..91f24b7ec5b8f7 100644 --- a/src/controller/java/zap-generated/CHIPReadCallbacks.h +++ b/src/controller/java/zap-generated/CHIPReadCallbacks.h @@ -2715,6 +2715,98 @@ class CHIPElectricalMeasurementAttributeListAttributeCallback bool keepAlive; }; +class CHIPEthernetNetworkDiagnosticsPHYRateAttributeCallback + : public chip::Callback::Callback +{ +public: + CHIPEthernetNetworkDiagnosticsPHYRateAttributeCallback(jobject javaCallback, bool keepAlive = false); + + ~CHIPEthernetNetworkDiagnosticsPHYRateAttributeCallback(); + + static void maybeDestroy(CHIPEthernetNetworkDiagnosticsPHYRateAttributeCallback * callback) + { + if (!callback->keepAlive) + { + callback->Cancel(); + chip::Platform::Delete(callback); + } + } + + static void + CallbackFn(void * context, + const chip::app::DataModel::Nullable & value); + static void OnSubscriptionEstablished(void * context) + { + CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished( + reinterpret_cast(context)->javaCallbackRef); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); + }; + +private: + jobject javaCallbackRef; + bool keepAlive; +}; + +class CHIPEthernetNetworkDiagnosticsFullDuplexAttributeCallback + : public chip::Callback::Callback +{ +public: + CHIPEthernetNetworkDiagnosticsFullDuplexAttributeCallback(jobject javaCallback, bool keepAlive = false); + + ~CHIPEthernetNetworkDiagnosticsFullDuplexAttributeCallback(); + + static void maybeDestroy(CHIPEthernetNetworkDiagnosticsFullDuplexAttributeCallback * callback) + { + if (!callback->keepAlive) + { + callback->Cancel(); + chip::Platform::Delete(callback); + } + } + + static void CallbackFn(void * context, const chip::app::DataModel::Nullable & value); + static void OnSubscriptionEstablished(void * context) + { + CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished( + reinterpret_cast(context)->javaCallbackRef); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); + }; + +private: + jobject javaCallbackRef; + bool keepAlive; +}; + +class CHIPEthernetNetworkDiagnosticsCarrierDetectAttributeCallback + : public chip::Callback::Callback +{ +public: + CHIPEthernetNetworkDiagnosticsCarrierDetectAttributeCallback(jobject javaCallback, bool keepAlive = false); + + ~CHIPEthernetNetworkDiagnosticsCarrierDetectAttributeCallback(); + + static void maybeDestroy(CHIPEthernetNetworkDiagnosticsCarrierDetectAttributeCallback * callback) + { + if (!callback->keepAlive) + { + callback->Cancel(); + chip::Platform::Delete(callback); + } + } + + static void CallbackFn(void * context, const chip::app::DataModel::Nullable & value); + static void OnSubscriptionEstablished(void * context) + { + CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished( + reinterpret_cast(context)->javaCallbackRef); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); + }; + +private: + jobject javaCallbackRef; + bool keepAlive; +}; + class CHIPEthernetNetworkDiagnosticsServerGeneratedCommandListAttributeCallback : 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 f570c78e5fbc4f..390b587cfefe67 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java @@ -7162,6 +7162,30 @@ private native void resetCounts( DefaultClusterCallback Callback, @Nullable Integer timedInvokeTimeoutMs); + public interface PHYRateAttributeCallback { + void onSuccess(@Nullable Integer value); + + void onError(Exception ex); + + default void onSubscriptionEstablished() {} + } + + public interface FullDuplexAttributeCallback { + void onSuccess(@Nullable Boolean value); + + void onError(Exception ex); + + default void onSubscriptionEstablished() {} + } + + public interface CarrierDetectAttributeCallback { + void onSuccess(@Nullable Boolean value); + + void onError(Exception ex); + + default void onSubscriptionEstablished() {} + } + public interface ServerGeneratedCommandListAttributeCallback { void onSuccess(List valueList); @@ -7186,21 +7210,21 @@ public interface AttributeListAttributeCallback { default void onSubscriptionEstablished() {} } - public void readPHYRateAttribute(IntegerAttributeCallback callback) { + public void readPHYRateAttribute(PHYRateAttributeCallback callback) { readPHYRateAttribute(chipClusterPtr, callback); } public void subscribePHYRateAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { + PHYRateAttributeCallback callback, int minInterval, int maxInterval) { subscribePHYRateAttribute(chipClusterPtr, callback, minInterval, maxInterval); } - public void readFullDuplexAttribute(BooleanAttributeCallback callback) { + public void readFullDuplexAttribute(FullDuplexAttributeCallback callback) { readFullDuplexAttribute(chipClusterPtr, callback); } public void subscribeFullDuplexAttribute( - BooleanAttributeCallback callback, int minInterval, int maxInterval) { + FullDuplexAttributeCallback callback, int minInterval, int maxInterval) { subscribeFullDuplexAttribute(chipClusterPtr, callback, minInterval, maxInterval); } @@ -7249,12 +7273,12 @@ public void subscribeOverrunCountAttribute( subscribeOverrunCountAttribute(chipClusterPtr, callback, minInterval, maxInterval); } - public void readCarrierDetectAttribute(BooleanAttributeCallback callback) { + public void readCarrierDetectAttribute(CarrierDetectAttributeCallback callback) { readCarrierDetectAttribute(chipClusterPtr, callback); } public void subscribeCarrierDetectAttribute( - BooleanAttributeCallback callback, int minInterval, int maxInterval) { + CarrierDetectAttributeCallback callback, int minInterval, int maxInterval) { subscribeCarrierDetectAttribute(chipClusterPtr, callback, minInterval, maxInterval); } @@ -7317,16 +7341,19 @@ public void subscribeClusterRevisionAttribute( } private native void readPHYRateAttribute( - long chipClusterPtr, IntegerAttributeCallback callback); + long chipClusterPtr, PHYRateAttributeCallback callback); private native void subscribePHYRateAttribute( - long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); + long chipClusterPtr, PHYRateAttributeCallback callback, int minInterval, int maxInterval); private native void readFullDuplexAttribute( - long chipClusterPtr, BooleanAttributeCallback callback); + long chipClusterPtr, FullDuplexAttributeCallback callback); private native void subscribeFullDuplexAttribute( - long chipClusterPtr, BooleanAttributeCallback callback, int minInterval, int maxInterval); + long chipClusterPtr, + FullDuplexAttributeCallback callback, + int minInterval, + int maxInterval); private native void readPacketRxCountAttribute( long chipClusterPtr, LongAttributeCallback callback); @@ -7359,10 +7386,13 @@ private native void subscribeOverrunCountAttribute( long chipClusterPtr, LongAttributeCallback callback, int minInterval, int maxInterval); private native void readCarrierDetectAttribute( - long chipClusterPtr, BooleanAttributeCallback callback); + long chipClusterPtr, CarrierDetectAttributeCallback callback); private native void subscribeCarrierDetectAttribute( - long chipClusterPtr, BooleanAttributeCallback callback, int minInterval, int maxInterval); + long chipClusterPtr, + CarrierDetectAttributeCallback callback, + int minInterval, + int maxInterval); private native void readTimeSinceResetAttribute( long chipClusterPtr, LongAttributeCallback callback); diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ClusterReadMapping.java b/src/controller/java/zap-generated/chip/devicecontroller/ClusterReadMapping.java index aaf560126eeddf..9e5d35df547e54 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ClusterReadMapping.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ClusterReadMapping.java @@ -3254,7 +3254,9 @@ public Map> getReadAttributeMap() { new InteractionInfo( (cluster, callback, commandArguments) -> { ((ChipClusters.EthernetNetworkDiagnosticsCluster) cluster) - .readPHYRateAttribute((ChipClusters.IntegerAttributeCallback) callback); + .readPHYRateAttribute( + (ChipClusters.EthernetNetworkDiagnosticsCluster.PHYRateAttributeCallback) + callback); }, () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), readEthernetNetworkDiagnosticsPHYRateCommandParams); @@ -3266,7 +3268,9 @@ public Map> getReadAttributeMap() { new InteractionInfo( (cluster, callback, commandArguments) -> { ((ChipClusters.EthernetNetworkDiagnosticsCluster) cluster) - .readFullDuplexAttribute((ChipClusters.BooleanAttributeCallback) callback); + .readFullDuplexAttribute( + (ChipClusters.EthernetNetworkDiagnosticsCluster.FullDuplexAttributeCallback) + callback); }, () -> new ClusterInfoMapping.DelegatedBooleanAttributeCallback(), readEthernetNetworkDiagnosticsFullDuplexCommandParams); @@ -3344,7 +3348,10 @@ public Map> getReadAttributeMap() { new InteractionInfo( (cluster, callback, commandArguments) -> { ((ChipClusters.EthernetNetworkDiagnosticsCluster) cluster) - .readCarrierDetectAttribute((ChipClusters.BooleanAttributeCallback) callback); + .readCarrierDetectAttribute( + (ChipClusters.EthernetNetworkDiagnosticsCluster + .CarrierDetectAttributeCallback) + callback); }, () -> new ClusterInfoMapping.DelegatedBooleanAttributeCallback(), readEthernetNetworkDiagnosticsCarrierDetectCommandParams); diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py index 0926f5cf06560c..747590caaf8f0b 100644 --- a/src/controller/python/chip/clusters/Objects.py +++ b/src/controller/python/chip/clusters/Objects.py @@ -12652,14 +12652,14 @@ class EthernetNetworkDiagnostics(Cluster): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ - ClusterObjectFieldDescriptor(Label="PHYRate", Tag=0x00000000, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="fullDuplex", Tag=0x00000001, Type=typing.Optional[bool]), + ClusterObjectFieldDescriptor(Label="PHYRate", Tag=0x00000000, Type=typing.Union[None, Nullable, EthernetNetworkDiagnostics.Enums.PHYRateType]), + ClusterObjectFieldDescriptor(Label="fullDuplex", Tag=0x00000001, Type=typing.Union[None, Nullable, bool]), ClusterObjectFieldDescriptor(Label="packetRxCount", Tag=0x00000002, Type=uint), ClusterObjectFieldDescriptor(Label="packetTxCount", Tag=0x00000003, Type=uint), ClusterObjectFieldDescriptor(Label="txErrCount", Tag=0x00000004, Type=uint), ClusterObjectFieldDescriptor(Label="collisionCount", Tag=0x00000005, Type=uint), ClusterObjectFieldDescriptor(Label="overrunCount", Tag=0x00000006, Type=uint), - ClusterObjectFieldDescriptor(Label="carrierDetect", Tag=0x00000007, Type=typing.Optional[bool]), + ClusterObjectFieldDescriptor(Label="carrierDetect", Tag=0x00000007, Type=typing.Union[None, Nullable, bool]), ClusterObjectFieldDescriptor(Label="timeSinceReset", Tag=0x00000008, Type=typing.Optional[uint]), ClusterObjectFieldDescriptor(Label="serverGeneratedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="clientGeneratedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), @@ -12668,14 +12668,14 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - PHYRate: 'typing.Optional[uint]' = None - fullDuplex: 'typing.Optional[bool]' = None + PHYRate: 'typing.Union[None, Nullable, EthernetNetworkDiagnostics.Enums.PHYRateType]' = None + fullDuplex: 'typing.Union[None, Nullable, bool]' = None packetRxCount: 'uint' = None packetTxCount: 'uint' = None txErrCount: 'uint' = None collisionCount: 'uint' = None overrunCount: 'uint' = None - carrierDetect: 'typing.Optional[bool]' = None + carrierDetect: 'typing.Union[None, Nullable, bool]' = None timeSinceReset: 'typing.Optional[uint]' = None serverGeneratedCommandList: 'typing.List[uint]' = None clientGeneratedCommandList: 'typing.List[uint]' = None @@ -12726,9 +12726,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, EthernetNetworkDiagnostics.Enums.PHYRateType]) - value: 'typing.Optional[uint]' = None + value: 'typing.Union[None, Nullable, EthernetNetworkDiagnostics.Enums.PHYRateType]' = None @dataclass class FullDuplex(ClusterAttributeDescriptor): @@ -12742,9 +12742,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[bool]) + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, bool]) - value: 'typing.Optional[bool]' = None + value: 'typing.Union[None, Nullable, bool]' = None @dataclass class PacketRxCount(ClusterAttributeDescriptor): @@ -12838,9 +12838,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[bool]) + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, bool]) - value: 'typing.Optional[bool]' = None + value: 'typing.Union[None, Nullable, bool]' = None @dataclass class TimeSinceReset(ClusterAttributeDescriptor): diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPAttributeTLVValueDecoder.mm b/src/darwin/Framework/CHIP/zap-generated/CHIPAttributeTLVValueDecoder.mm index 8f515e35e876b4..780d7ea63fe937 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPAttributeTLVValueDecoder.mm +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPAttributeTLVValueDecoder.mm @@ -3968,8 +3968,12 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue.Value())]; + } return value; } case Attributes::FullDuplex::Id: { @@ -3979,8 +3983,12 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithBool:cppValue]; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithBool:cppValue.Value()]; + } return value; } case Attributes::PacketRxCount::Id: { @@ -4045,8 +4053,12 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithBool:cppValue]; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithBool:cppValue.Value()]; + } return value; } case Attributes::TimeSinceReset::Id: { diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm index 585a220b8ee1fa..d8b041e6b8e2ea 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm @@ -9235,12 +9235,14 @@ new CHIPCommandSuccessCallbackBridge( - (void)readAttributePHYRateWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = EthernetNetworkDiagnostics::Attributes::PHYRate::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPNullableEthernetNetworkDiagnosticsClusterPHYRateTypeAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = EthernetNetworkDiagnostics::Attributes::PHYRate::TypeInfo; + auto successFn + = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributePHYRateWithMinInterval:(uint16_t)minInterval @@ -9248,14 +9250,17 @@ - (void)subscribeAttributePHYRateWithMinInterval:(uint16_t)minInterval subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt8uAttributeCallbackSubscriptionBridge( + new CHIPNullableEthernetNetworkDiagnosticsClusterPHYRateTypeAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = EthernetNetworkDiagnostics::Attributes::PHYRate::TypeInfo; - auto successFn = Callback::FromCancelable(success); + auto successFn + = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - minInterval, maxInterval, CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); + minInterval, maxInterval, + CHIPNullableEthernetNetworkDiagnosticsClusterPHYRateTypeAttributeCallbackSubscriptionBridge:: + OnSubscriptionEstablished); }, subscriptionEstablishedHandler); } @@ -9263,12 +9268,13 @@ new CHIPInt8uAttributeCallbackSubscriptionBridge( - (void)readAttributeFullDuplexWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPBooleanAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = EthernetNetworkDiagnostics::Attributes::FullDuplex::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPNullableBooleanAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = EthernetNetworkDiagnostics::Attributes::FullDuplex::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeFullDuplexWithMinInterval:(uint16_t)minInterval @@ -9276,14 +9282,14 @@ - (void)subscribeAttributeFullDuplexWithMinInterval:(uint16_t)minInterval subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPBooleanAttributeCallbackSubscriptionBridge( + new CHIPNullableBooleanAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = EthernetNetworkDiagnostics::Attributes::FullDuplex::TypeInfo; - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - minInterval, maxInterval, CHIPBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); + minInterval, maxInterval, CHIPNullableBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); }, subscriptionEstablishedHandler); } @@ -9434,12 +9440,13 @@ new CHIPInt64uAttributeCallbackSubscriptionBridge( - (void)readAttributeCarrierDetectWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPBooleanAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = EthernetNetworkDiagnostics::Attributes::CarrierDetect::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPNullableBooleanAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = EthernetNetworkDiagnostics::Attributes::CarrierDetect::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeCarrierDetectWithMinInterval:(uint16_t)minInterval @@ -9448,14 +9455,14 @@ - (void)subscribeAttributeCarrierDetectWithMinInterval:(uint16_t)minInterval reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPBooleanAttributeCallbackSubscriptionBridge( + new CHIPNullableBooleanAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = EthernetNetworkDiagnostics::Attributes::CarrierDetect::TypeInfo; - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - minInterval, maxInterval, CHIPBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); + minInterval, maxInterval, CHIPNullableBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); }, subscriptionEstablishedHandler); } diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.h b/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.h index 6e12ac61c5e2f3..2d7c95e9385780 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.h @@ -465,14 +465,14 @@ NS_ASSUME_NONNULL_BEGIN */ @interface CHIPTestEthernetNetworkDiagnostics : CHIPEthernetNetworkDiagnostics -- (void)writeAttributePHYRateWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeFullDuplexWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributePHYRateWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeFullDuplexWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributePacketRxCountWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributePacketTxCountWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeTxErrCountWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeCollisionCountWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeOverrunCountWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeCarrierDetectWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeCarrierDetectWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeTimeSinceResetWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeServerGeneratedCommandListWithValue:(NSArray * _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 ed2ce079d8f592..6518bd384bbc00 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.mm @@ -5504,7 +5504,7 @@ @implementation CHIPTestEthernetNetworkDiagnostics return &_cppCluster; } -- (void)writeAttributePHYRateWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributePHYRateWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( self.callbackQueue, @@ -5515,14 +5515,19 @@ new CHIPDefaultSuccessCallbackBridge( ListFreer listFreer; using TypeInfo = EthernetNetworkDiagnostics::Attributes::PHYRate::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = static_cast>(value.unsignedCharValue); + } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeFullDuplexWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeFullDuplexWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( self.callbackQueue, @@ -5533,7 +5538,12 @@ new CHIPDefaultSuccessCallbackBridge( ListFreer listFreer; using TypeInfo = EthernetNetworkDiagnostics::Attributes::FullDuplex::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.boolValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.boolValue; + } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); @@ -5630,7 +5640,7 @@ new CHIPDefaultSuccessCallbackBridge( }); } -- (void)writeAttributeCarrierDetectWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeCarrierDetectWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( self.callbackQueue, @@ -5641,7 +5651,12 @@ new CHIPDefaultSuccessCallbackBridge( ListFreer listFreer; using TypeInfo = EthernetNetworkDiagnostics::Attributes::CarrierDetect::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.boolValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.boolValue; + } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); diff --git a/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h b/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h index 4eb1589f17ef72..fbf58e77313643 100644 --- a/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h +++ b/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h @@ -1709,17 +1709,17 @@ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server) */ \ - { 0x00000000, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* PHYRate */ \ - { 0x00000001, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* FullDuplex */ \ - { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(569) }, /* PacketRxCount */ \ - { 0x00000003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(577) }, /* PacketTxCount */ \ - { 0x00000004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(585) }, /* TxErrCount */ \ - { 0x00000005, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(593) }, /* CollisionCount */ \ - { 0x00000006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(601) }, /* OverrunCount */ \ - { 0x00000007, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* CarrierDetect */ \ - { 0x00000008, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(609) }, /* TimeSinceReset */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(617) }, /* FeatureMap */ \ - { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_EMPTY_DEFAULT() }, /* PHYRate */ \ + { 0x00000001, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_SIMPLE_DEFAULT(0x00) }, /* FullDuplex */ \ + { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(569) }, /* PacketRxCount */ \ + { 0x00000003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(577) }, /* PacketTxCount */ \ + { 0x00000004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(585) }, /* TxErrCount */ \ + { 0x00000005, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(593) }, /* CollisionCount */ \ + { 0x00000006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(601) }, /* OverrunCount */ \ + { 0x00000007, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_SIMPLE_DEFAULT(0x00) }, /* CarrierDetect */ \ + { 0x00000008, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(609) }, /* TimeSinceReset */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(617) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ { 0x00000000, ZAP_TYPE(INT8U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* WindowStatus */ \ 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 0a636dcf8c365e..da01c015267786 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 @@ -10996,25 +10996,29 @@ namespace Attributes { namespace PHYRate { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, + DataModel::Nullable & value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::EthernetNetworkDiagnostics::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + if (Traits::IsNullValue(temp)) { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + value.SetNull(); + } + else + { + value.SetNonNull() = Traits::StorageToWorking(temp); } - *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::EthernetNetworkDiagnostics::PHYRateType value) { - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } @@ -11024,11 +11028,31 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) return emberAfWriteServerAttribute(endpoint, Clusters::EthernetNetworkDiagnostics::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } +EmberAfStatus SetNull(chip::EndpointId endpoint) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteServerAttribute(endpoint, Clusters::EthernetNetworkDiagnostics::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); +} + +EmberAfStatus Set(chip::EndpointId endpoint, + const chip::app::DataModel::Nullable & value) +{ + if (value.IsNull()) + { + return SetNull(endpoint); + } + + return Set(endpoint, value.Value()); +} + } // namespace PHYRate namespace FullDuplex { -EmberAfStatus Get(chip::EndpointId endpoint, bool * value) +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -11036,17 +11060,20 @@ EmberAfStatus Get(chip::EndpointId endpoint, bool * value) EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::EthernetNetworkDiagnostics::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + if (Traits::IsNullValue(temp)) { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + value.SetNull(); + } + else + { + value.SetNonNull() = Traits::StorageToWorking(temp); } - *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, bool value) { using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } @@ -11057,6 +11084,26 @@ EmberAfStatus Set(chip::EndpointId endpoint, bool value) ZCL_BOOLEAN_ATTRIBUTE_TYPE); } +EmberAfStatus SetNull(chip::EndpointId endpoint) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteServerAttribute(endpoint, Clusters::EthernetNetworkDiagnostics::Id, Id, writable, + ZCL_BOOLEAN_ATTRIBUTE_TYPE); +} + +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +{ + if (value.IsNull()) + { + return SetNull(endpoint); + } + + return Set(endpoint, value.Value()); +} + } // namespace FullDuplex namespace PacketRxCount { @@ -11221,7 +11268,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint64_t value) namespace CarrierDetect { -EmberAfStatus Get(chip::EndpointId endpoint, bool * value) +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -11229,17 +11276,20 @@ EmberAfStatus Get(chip::EndpointId endpoint, bool * value) EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::EthernetNetworkDiagnostics::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + if (Traits::IsNullValue(temp)) { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + value.SetNull(); + } + else + { + value.SetNonNull() = Traits::StorageToWorking(temp); } - *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, bool value) { using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } @@ -11250,6 +11300,26 @@ EmberAfStatus Set(chip::EndpointId endpoint, bool value) ZCL_BOOLEAN_ATTRIBUTE_TYPE); } +EmberAfStatus SetNull(chip::EndpointId endpoint) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteServerAttribute(endpoint, Clusters::EthernetNetworkDiagnostics::Id, Id, writable, + ZCL_BOOLEAN_ATTRIBUTE_TYPE); +} + +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +{ + if (value.IsNull()) + { + return SetNull(endpoint); + } + + return Set(endpoint, value.Value()); +} + } // namespace CarrierDetect namespace TimeSinceReset { 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 8bd3040c40b70f..cca17bb395316a 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 @@ -1965,13 +1965,19 @@ namespace EthernetNetworkDiagnostics { namespace Attributes { namespace PHYRate { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // enum8 -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); +EmberAfStatus Get(chip::EndpointId endpoint, + DataModel::Nullable & value); // PHYRateType +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::EthernetNetworkDiagnostics::PHYRateType value); +EmberAfStatus SetNull(chip::EndpointId endpoint); +EmberAfStatus Set(chip::EndpointId endpoint, + const chip::app::DataModel::Nullable & value); } // namespace PHYRate namespace FullDuplex { -EmberAfStatus Get(chip::EndpointId endpoint, bool * value); // boolean +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // boolean EmberAfStatus Set(chip::EndpointId endpoint, bool value); +EmberAfStatus SetNull(chip::EndpointId endpoint); +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); } // namespace FullDuplex namespace PacketRxCount { @@ -2000,8 +2006,10 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint64_t value); } // namespace OverrunCount namespace CarrierDetect { -EmberAfStatus Get(chip::EndpointId endpoint, bool * value); // boolean +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // boolean EmberAfStatus Set(chip::EndpointId endpoint, bool value); +EmberAfStatus SetNull(chip::EndpointId endpoint); +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); } // namespace CarrierDetect namespace TimeSinceReset { 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 a936ed900b8457..7af807ed1bcfcf 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 @@ -14425,9 +14425,9 @@ namespace Attributes { namespace PHYRate { struct TypeInfo { - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; static constexpr ClusterId GetClusterId() { return Clusters::EthernetNetworkDiagnostics::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::PHYRate::Id; } @@ -14437,9 +14437,9 @@ struct TypeInfo namespace FullDuplex { struct TypeInfo { - using Type = bool; - using DecodableType = bool; - using DecodableArgType = bool; + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; static constexpr ClusterId GetClusterId() { return Clusters::EthernetNetworkDiagnostics::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::FullDuplex::Id; } @@ -14509,9 +14509,9 @@ struct TypeInfo namespace CarrierDetect { struct TypeInfo { - using Type = bool; - using DecodableType = bool; - using DecodableArgType = bool; + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; static constexpr ClusterId GetClusterId() { return Clusters::EthernetNetworkDiagnostics::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::CarrierDetect::Id; } @@ -14599,14 +14599,14 @@ struct TypeInfo CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::PHYRate::TypeInfo::DecodableType PHYRate = static_cast(0); - Attributes::FullDuplex::TypeInfo::DecodableType fullDuplex = static_cast(0); + Attributes::PHYRate::TypeInfo::DecodableType PHYRate; + Attributes::FullDuplex::TypeInfo::DecodableType fullDuplex; Attributes::PacketRxCount::TypeInfo::DecodableType packetRxCount = static_cast(0); Attributes::PacketTxCount::TypeInfo::DecodableType packetTxCount = static_cast(0); Attributes::TxErrCount::TypeInfo::DecodableType txErrCount = static_cast(0); Attributes::CollisionCount::TypeInfo::DecodableType collisionCount = static_cast(0); Attributes::OverrunCount::TypeInfo::DecodableType overrunCount = static_cast(0); - Attributes::CarrierDetect::TypeInfo::DecodableType carrierDetect = static_cast(0); + Attributes::CarrierDetect::TypeInfo::DecodableType carrierDetect; Attributes::TimeSinceReset::TypeInfo::DecodableType timeSinceReset = static_cast(0); Attributes::ServerGeneratedCommandList::TypeInfo::DecodableType serverGeneratedCommandList; Attributes::ClientGeneratedCommandList::TypeInfo::DecodableType clientGeneratedCommandList; diff --git a/zzz_generated/bridge-app/zap-generated/endpoint_config.h b/zzz_generated/bridge-app/zap-generated/endpoint_config.h index c92ae7cfd94b63..39ede1689a175f 100644 --- a/zzz_generated/bridge-app/zap-generated/endpoint_config.h +++ b/zzz_generated/bridge-app/zap-generated/endpoint_config.h @@ -806,17 +806,17 @@ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server) */ \ - { 0x00000000, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* PHYRate */ \ - { 0x00000001, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* FullDuplex */ \ - { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(315) }, /* PacketRxCount */ \ - { 0x00000003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(323) }, /* PacketTxCount */ \ - { 0x00000004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(331) }, /* TxErrCount */ \ - { 0x00000005, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(339) }, /* CollisionCount */ \ - { 0x00000006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(347) }, /* OverrunCount */ \ - { 0x00000007, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* CarrierDetect */ \ - { 0x00000008, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(355) }, /* TimeSinceReset */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(363) }, /* FeatureMap */ \ - { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_EMPTY_DEFAULT() }, /* PHYRate */ \ + { 0x00000001, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_SIMPLE_DEFAULT(0x00) }, /* FullDuplex */ \ + { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(315) }, /* PacketRxCount */ \ + { 0x00000003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(323) }, /* PacketTxCount */ \ + { 0x00000004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(331) }, /* TxErrCount */ \ + { 0x00000005, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(339) }, /* CollisionCount */ \ + { 0x00000006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(347) }, /* OverrunCount */ \ + { 0x00000007, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_SIMPLE_DEFAULT(0x00) }, /* CarrierDetect */ \ + { 0x00000008, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(355) }, /* TimeSinceReset */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(363) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ { 0x00000000, ZAP_TYPE(INT8U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* WindowStatus */ \ diff --git a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp index 6de350f58ba458..892ec908c3674b 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp +++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp @@ -5179,12 +5179,12 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP switch (path.mAttributeId) { case EthernetNetworkDiagnostics::Attributes::PHYRate::Id: { - uint8_t value; + chip::app::DataModel::Nullable value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("PHYRate", 1, value); } case EthernetNetworkDiagnostics::Attributes::FullDuplex::Id: { - bool value; + chip::app::DataModel::Nullable value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("FullDuplex", 1, value); } @@ -5214,7 +5214,7 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP return DataModelLogger::LogValue("OverrunCount", 1, value); } case EthernetNetworkDiagnostics::Attributes::CarrierDetect::Id: { - bool value; + chip::app::DataModel::Nullable value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("CarrierDetect", 1, value); } diff --git a/zzz_generated/door-lock-app/zap-generated/endpoint_config.h b/zzz_generated/door-lock-app/zap-generated/endpoint_config.h index 67806590292a22..944f66ef11833d 100644 --- a/zzz_generated/door-lock-app/zap-generated/endpoint_config.h +++ b/zzz_generated/door-lock-app/zap-generated/endpoint_config.h @@ -812,17 +812,17 @@ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server) */ \ - { 0x00000000, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* PHYRate */ \ - { 0x00000001, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* FullDuplex */ \ - { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(323) }, /* PacketRxCount */ \ - { 0x00000003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(331) }, /* PacketTxCount */ \ - { 0x00000004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(339) }, /* TxErrCount */ \ - { 0x00000005, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(347) }, /* CollisionCount */ \ - { 0x00000006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(355) }, /* OverrunCount */ \ - { 0x00000007, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* CarrierDetect */ \ - { 0x00000008, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(363) }, /* TimeSinceReset */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(371) }, /* FeatureMap */ \ - { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_EMPTY_DEFAULT() }, /* PHYRate */ \ + { 0x00000001, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_SIMPLE_DEFAULT(0x00) }, /* FullDuplex */ \ + { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(323) }, /* PacketRxCount */ \ + { 0x00000003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(331) }, /* PacketTxCount */ \ + { 0x00000004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(339) }, /* TxErrCount */ \ + { 0x00000005, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(347) }, /* CollisionCount */ \ + { 0x00000006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(355) }, /* OverrunCount */ \ + { 0x00000007, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_SIMPLE_DEFAULT(0x00) }, /* CarrierDetect */ \ + { 0x00000008, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(363) }, /* TimeSinceReset */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(371) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ { 0x00000000, ZAP_TYPE(INT8U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* WindowStatus */ \ diff --git a/zzz_generated/light-switch-app/zap-generated/endpoint_config.h b/zzz_generated/light-switch-app/zap-generated/endpoint_config.h index d9094961aea125..f88f80ec7f95a2 100644 --- a/zzz_generated/light-switch-app/zap-generated/endpoint_config.h +++ b/zzz_generated/light-switch-app/zap-generated/endpoint_config.h @@ -717,17 +717,17 @@ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server) */ \ - { 0x00000000, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* PHYRate */ \ - { 0x00000001, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* FullDuplex */ \ - { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(293) }, /* PacketRxCount */ \ - { 0x00000003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(301) }, /* PacketTxCount */ \ - { 0x00000004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(309) }, /* TxErrCount */ \ - { 0x00000005, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(317) }, /* CollisionCount */ \ - { 0x00000006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(325) }, /* OverrunCount */ \ - { 0x00000007, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* CarrierDetect */ \ - { 0x00000008, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(333) }, /* TimeSinceReset */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(341) }, /* FeatureMap */ \ - { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_EMPTY_DEFAULT() }, /* PHYRate */ \ + { 0x00000001, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_SIMPLE_DEFAULT(0x00) }, /* FullDuplex */ \ + { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(293) }, /* PacketRxCount */ \ + { 0x00000003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(301) }, /* PacketTxCount */ \ + { 0x00000004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(309) }, /* TxErrCount */ \ + { 0x00000005, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(317) }, /* CollisionCount */ \ + { 0x00000006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(325) }, /* OverrunCount */ \ + { 0x00000007, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_SIMPLE_DEFAULT(0x00) }, /* CarrierDetect */ \ + { 0x00000008, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(333) }, /* TimeSinceReset */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(341) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ { 0x00000000, ZAP_TYPE(INT8U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* WindowStatus */ \ diff --git a/zzz_generated/lighting-app/zap-generated/endpoint_config.h b/zzz_generated/lighting-app/zap-generated/endpoint_config.h index c52973b2c1ba8f..6575b5e38c7ba6 100644 --- a/zzz_generated/lighting-app/zap-generated/endpoint_config.h +++ b/zzz_generated/lighting-app/zap-generated/endpoint_config.h @@ -778,17 +778,17 @@ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server) */ \ - { 0x00000000, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* PHYRate */ \ - { 0x00000001, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* FullDuplex */ \ - { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(311) }, /* PacketRxCount */ \ - { 0x00000003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(319) }, /* PacketTxCount */ \ - { 0x00000004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(327) }, /* TxErrCount */ \ - { 0x00000005, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(335) }, /* CollisionCount */ \ - { 0x00000006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(343) }, /* OverrunCount */ \ - { 0x00000007, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* CarrierDetect */ \ - { 0x00000008, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(351) }, /* TimeSinceReset */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(359) }, /* FeatureMap */ \ - { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_EMPTY_DEFAULT() }, /* PHYRate */ \ + { 0x00000001, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_SIMPLE_DEFAULT(0x00) }, /* FullDuplex */ \ + { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(311) }, /* PacketRxCount */ \ + { 0x00000003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(319) }, /* PacketTxCount */ \ + { 0x00000004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(327) }, /* TxErrCount */ \ + { 0x00000005, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(335) }, /* CollisionCount */ \ + { 0x00000006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(343) }, /* OverrunCount */ \ + { 0x00000007, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_SIMPLE_DEFAULT(0x00) }, /* CarrierDetect */ \ + { 0x00000008, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(351) }, /* TimeSinceReset */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(359) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ { 0x00000000, ZAP_TYPE(INT8U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* WindowStatus */ \ diff --git a/zzz_generated/lock-app/zap-generated/endpoint_config.h b/zzz_generated/lock-app/zap-generated/endpoint_config.h index bb4f1f8e0a8bf9..a36bc800742670 100644 --- a/zzz_generated/lock-app/zap-generated/endpoint_config.h +++ b/zzz_generated/lock-app/zap-generated/endpoint_config.h @@ -794,17 +794,17 @@ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server) */ \ - { 0x00000000, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* PHYRate */ \ - { 0x00000001, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* FullDuplex */ \ - { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(323) }, /* PacketRxCount */ \ - { 0x00000003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(331) }, /* PacketTxCount */ \ - { 0x00000004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(339) }, /* TxErrCount */ \ - { 0x00000005, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(347) }, /* CollisionCount */ \ - { 0x00000006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(355) }, /* OverrunCount */ \ - { 0x00000007, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* CarrierDetect */ \ - { 0x00000008, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(363) }, /* TimeSinceReset */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(371) }, /* FeatureMap */ \ - { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_EMPTY_DEFAULT() }, /* PHYRate */ \ + { 0x00000001, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_SIMPLE_DEFAULT(0x00) }, /* FullDuplex */ \ + { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(323) }, /* PacketRxCount */ \ + { 0x00000003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(331) }, /* PacketTxCount */ \ + { 0x00000004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(339) }, /* TxErrCount */ \ + { 0x00000005, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(347) }, /* CollisionCount */ \ + { 0x00000006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(355) }, /* OverrunCount */ \ + { 0x00000007, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_SIMPLE_DEFAULT(0x00) }, /* CarrierDetect */ \ + { 0x00000008, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(363) }, /* TimeSinceReset */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(371) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ { 0x00000000, ZAP_TYPE(INT8U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* WindowStatus */ \ 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 ea8f41ba4eba75..cd4f12d5d248d2 100644 --- a/zzz_generated/pump-controller-app/zap-generated/endpoint_config.h +++ b/zzz_generated/pump-controller-app/zap-generated/endpoint_config.h @@ -750,17 +750,17 @@ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server) */ \ - { 0x00000000, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* PHYRate */ \ - { 0x00000001, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* FullDuplex */ \ - { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(315) }, /* PacketRxCount */ \ - { 0x00000003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(323) }, /* PacketTxCount */ \ - { 0x00000004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(331) }, /* TxErrCount */ \ - { 0x00000005, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(339) }, /* CollisionCount */ \ - { 0x00000006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(347) }, /* OverrunCount */ \ - { 0x00000007, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* CarrierDetect */ \ - { 0x00000008, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(355) }, /* TimeSinceReset */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(363) }, /* FeatureMap */ \ - { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_EMPTY_DEFAULT() }, /* PHYRate */ \ + { 0x00000001, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_SIMPLE_DEFAULT(0x00) }, /* FullDuplex */ \ + { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(315) }, /* PacketRxCount */ \ + { 0x00000003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(323) }, /* PacketTxCount */ \ + { 0x00000004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(331) }, /* TxErrCount */ \ + { 0x00000005, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(339) }, /* CollisionCount */ \ + { 0x00000006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(347) }, /* OverrunCount */ \ + { 0x00000007, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_SIMPLE_DEFAULT(0x00) }, /* CarrierDetect */ \ + { 0x00000008, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(355) }, /* TimeSinceReset */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(363) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ { 0x00000000, ZAP_TYPE(INT8U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* WindowStatus */ \ 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 3c2d49030d3344..64be26465ee95e 100644 --- a/zzz_generated/temperature-measurement-app/zap-generated/endpoint_config.h +++ b/zzz_generated/temperature-measurement-app/zap-generated/endpoint_config.h @@ -404,17 +404,17 @@ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server) */ \ - { 0x00000000, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* PHYRate */ \ - { 0x00000001, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* FullDuplex */ \ - { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(110) }, /* PacketRxCount */ \ - { 0x00000003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(118) }, /* PacketTxCount */ \ - { 0x00000004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(126) }, /* TxErrCount */ \ - { 0x00000005, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(134) }, /* CollisionCount */ \ - { 0x00000006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(142) }, /* OverrunCount */ \ - { 0x00000007, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* CarrierDetect */ \ - { 0x00000008, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(150) }, /* TimeSinceReset */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(158) }, /* FeatureMap */ \ - { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_EMPTY_DEFAULT() }, /* PHYRate */ \ + { 0x00000001, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_SIMPLE_DEFAULT(0x00) }, /* FullDuplex */ \ + { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(110) }, /* PacketRxCount */ \ + { 0x00000003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(118) }, /* PacketTxCount */ \ + { 0x00000004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(126) }, /* TxErrCount */ \ + { 0x00000005, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(134) }, /* CollisionCount */ \ + { 0x00000006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(142) }, /* OverrunCount */ \ + { 0x00000007, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_SIMPLE_DEFAULT(0x00) }, /* CarrierDetect */ \ + { 0x00000008, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(150) }, /* TimeSinceReset */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(158) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ { 0x00000000, ZAP_TYPE(INT8U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* WindowStatus */ \ diff --git a/zzz_generated/thermostat/zap-generated/endpoint_config.h b/zzz_generated/thermostat/zap-generated/endpoint_config.h index e0aa6367dd4eef..6838bb0260e56c 100644 --- a/zzz_generated/thermostat/zap-generated/endpoint_config.h +++ b/zzz_generated/thermostat/zap-generated/endpoint_config.h @@ -854,17 +854,17 @@ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server) */ \ - { 0x00000000, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* PHYRate */ \ - { 0x00000001, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* FullDuplex */ \ - { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(315) }, /* PacketRxCount */ \ - { 0x00000003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(323) }, /* PacketTxCount */ \ - { 0x00000004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(331) }, /* TxErrCount */ \ - { 0x00000005, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(339) }, /* CollisionCount */ \ - { 0x00000006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(347) }, /* OverrunCount */ \ - { 0x00000007, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* CarrierDetect */ \ - { 0x00000008, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(355) }, /* TimeSinceReset */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(363) }, /* FeatureMap */ \ - { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_EMPTY_DEFAULT() }, /* PHYRate */ \ + { 0x00000001, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_SIMPLE_DEFAULT(0x00) }, /* FullDuplex */ \ + { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(315) }, /* PacketRxCount */ \ + { 0x00000003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(323) }, /* PacketTxCount */ \ + { 0x00000004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(331) }, /* TxErrCount */ \ + { 0x00000005, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(339) }, /* CollisionCount */ \ + { 0x00000006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(347) }, /* OverrunCount */ \ + { 0x00000007, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_SIMPLE_DEFAULT(0x00) }, /* CarrierDetect */ \ + { 0x00000008, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(355) }, /* TimeSinceReset */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(363) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ { 0x00000000, ZAP_TYPE(INT8U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* WindowStatus */ \ diff --git a/zzz_generated/tv-app/zap-generated/endpoint_config.h b/zzz_generated/tv-app/zap-generated/endpoint_config.h index 76f4aec2001101..291009cc30c168 100644 --- a/zzz_generated/tv-app/zap-generated/endpoint_config.h +++ b/zzz_generated/tv-app/zap-generated/endpoint_config.h @@ -1198,17 +1198,17 @@ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server) */ \ - { 0x00000000, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* PHYRate */ \ - { 0x00000001, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* FullDuplex */ \ - { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(315) }, /* PacketRxCount */ \ - { 0x00000003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(323) }, /* PacketTxCount */ \ - { 0x00000004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(331) }, /* TxErrCount */ \ - { 0x00000005, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(339) }, /* CollisionCount */ \ - { 0x00000006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(347) }, /* OverrunCount */ \ - { 0x00000007, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* CarrierDetect */ \ - { 0x00000008, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(355) }, /* TimeSinceReset */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(363) }, /* FeatureMap */ \ - { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_EMPTY_DEFAULT() }, /* PHYRate */ \ + { 0x00000001, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_SIMPLE_DEFAULT(0x00) }, /* FullDuplex */ \ + { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(315) }, /* PacketRxCount */ \ + { 0x00000003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(323) }, /* PacketTxCount */ \ + { 0x00000004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(331) }, /* TxErrCount */ \ + { 0x00000005, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(339) }, /* CollisionCount */ \ + { 0x00000006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(347) }, /* OverrunCount */ \ + { 0x00000007, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_SIMPLE_DEFAULT(0x00) }, /* CarrierDetect */ \ + { 0x00000008, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(355) }, /* TimeSinceReset */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(363) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ { 0x00000000, ZAP_TYPE(INT8U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* WindowStatus */ \ 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 82c8c878f2229f..89b3b75b5fb7ea 100644 --- a/zzz_generated/tv-casting-app/zap-generated/endpoint_config.h +++ b/zzz_generated/tv-casting-app/zap-generated/endpoint_config.h @@ -1061,17 +1061,17 @@ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server) */ \ - { 0x00000000, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* PHYRate */ \ - { 0x00000001, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* FullDuplex */ \ - { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(315) }, /* PacketRxCount */ \ - { 0x00000003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(323) }, /* PacketTxCount */ \ - { 0x00000004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(331) }, /* TxErrCount */ \ - { 0x00000005, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(339) }, /* CollisionCount */ \ - { 0x00000006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(347) }, /* OverrunCount */ \ - { 0x00000007, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* CarrierDetect */ \ - { 0x00000008, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(355) }, /* TimeSinceReset */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(363) }, /* FeatureMap */ \ - { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_EMPTY_DEFAULT() }, /* PHYRate */ \ + { 0x00000001, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_SIMPLE_DEFAULT(0x00) }, /* FullDuplex */ \ + { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(315) }, /* PacketRxCount */ \ + { 0x00000003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(323) }, /* PacketTxCount */ \ + { 0x00000004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(331) }, /* TxErrCount */ \ + { 0x00000005, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(339) }, /* CollisionCount */ \ + { 0x00000006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(347) }, /* OverrunCount */ \ + { 0x00000007, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_SIMPLE_DEFAULT(0x00) }, /* CarrierDetect */ \ + { 0x00000008, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(355) }, /* TimeSinceReset */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(363) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ { 0x00000000, ZAP_TYPE(INT8U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* WindowStatus */ \ diff --git a/zzz_generated/window-app/zap-generated/endpoint_config.h b/zzz_generated/window-app/zap-generated/endpoint_config.h index c7fe13b587b717..08d648933e6b73 100644 --- a/zzz_generated/window-app/zap-generated/endpoint_config.h +++ b/zzz_generated/window-app/zap-generated/endpoint_config.h @@ -801,17 +801,17 @@ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server) */ \ - { 0x00000000, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* PHYRate */ \ - { 0x00000001, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* FullDuplex */ \ - { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(331) }, /* PacketRxCount */ \ - { 0x00000003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(339) }, /* PacketTxCount */ \ - { 0x00000004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(347) }, /* TxErrCount */ \ - { 0x00000005, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(355) }, /* CollisionCount */ \ - { 0x00000006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(363) }, /* OverrunCount */ \ - { 0x00000007, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* CarrierDetect */ \ - { 0x00000008, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(371) }, /* TimeSinceReset */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(379) }, /* FeatureMap */ \ - { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_EMPTY_DEFAULT() }, /* PHYRate */ \ + { 0x00000001, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_SIMPLE_DEFAULT(0x00) }, /* FullDuplex */ \ + { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(331) }, /* PacketRxCount */ \ + { 0x00000003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(339) }, /* PacketTxCount */ \ + { 0x00000004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(347) }, /* TxErrCount */ \ + { 0x00000005, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(355) }, /* CollisionCount */ \ + { 0x00000006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(363) }, /* OverrunCount */ \ + { 0x00000007, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_SIMPLE_DEFAULT(0x00) }, /* CarrierDetect */ \ + { 0x00000008, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(371) }, /* TimeSinceReset */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(379) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ { 0x00000000, ZAP_TYPE(INT8U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* WindowStatus */ \