diff --git a/src/app/zap-templates/zcl/data-model/chip/bridged-device-basic-information-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/bridged-device-basic-information-cluster.xml
deleted file mode 100644
index d425d12e574506..00000000000000
--- a/src/app/zap-templates/zcl/data-model/chip/bridged-device-basic-information-cluster.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-
-
-
-
-
-
-
- General
- Bridged Device Basic Information
- 0x0039
- BRIDGED_DEVICE_BASIC_INFORMATION_CLUSTER
- true
- true
- This Cluster serves two purposes towards a Node communicating with a Bridge:
-indicate that the functionality on the Endpoint where it is placed (and its Parts) is bridged from
-a non-CHIP technology, and
-provide a centralized collection of attributes that the Node MAY collect to aid in conveying
-information regarding the Bridged Device to a user, such as the vendor name, the model name,
-or user-assigned name.
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/controller/java/zap-generated/CHIPCallbackTypes.h b/src/controller/java/zap-generated/CHIPCallbackTypes.h
index 70cf3fd1757f86..487f03d7902984 100644
--- a/src/controller/java/zap-generated/CHIPCallbackTypes.h
+++ b/src/controller/java/zap-generated/CHIPCallbackTypes.h
@@ -145,8 +145,36 @@ typedef void (*CHIPBridgedActionsClusterSetupUrlAttributeCallbackType)(
typedef void (*CHIPBridgedActionsClusterClusterRevisionAttributeCallbackType)(
void *, chip::app::Clusters::BridgedActions::Attributes::ClusterRevision::TypeInfo::DecodableArgType);
-typedef void (*CHIPBridgedDeviceBasicInformationClusterClusterRevisionAttributeCallbackType)(
- void *, chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::ClusterRevision::TypeInfo::DecodableArgType);
+typedef void (*CHIPBridgedDeviceBasicClusterVendorNameAttributeCallbackType)(
+ void *, chip::app::Clusters::BridgedDeviceBasic::Attributes::VendorName::TypeInfo::DecodableArgType);
+typedef void (*CHIPBridgedDeviceBasicClusterVendorIDAttributeCallbackType)(
+ void *, chip::app::Clusters::BridgedDeviceBasic::Attributes::VendorID::TypeInfo::DecodableArgType);
+typedef void (*CHIPBridgedDeviceBasicClusterProductNameAttributeCallbackType)(
+ void *, chip::app::Clusters::BridgedDeviceBasic::Attributes::ProductName::TypeInfo::DecodableArgType);
+typedef void (*CHIPBridgedDeviceBasicClusterNodeLabelAttributeCallbackType)(
+ void *, chip::app::Clusters::BridgedDeviceBasic::Attributes::NodeLabel::TypeInfo::DecodableArgType);
+typedef void (*CHIPBridgedDeviceBasicClusterHardwareVersionAttributeCallbackType)(
+ void *, chip::app::Clusters::BridgedDeviceBasic::Attributes::HardwareVersion::TypeInfo::DecodableArgType);
+typedef void (*CHIPBridgedDeviceBasicClusterHardwareVersionStringAttributeCallbackType)(
+ void *, chip::app::Clusters::BridgedDeviceBasic::Attributes::HardwareVersionString::TypeInfo::DecodableArgType);
+typedef void (*CHIPBridgedDeviceBasicClusterSoftwareVersionAttributeCallbackType)(
+ void *, chip::app::Clusters::BridgedDeviceBasic::Attributes::SoftwareVersion::TypeInfo::DecodableArgType);
+typedef void (*CHIPBridgedDeviceBasicClusterSoftwareVersionStringAttributeCallbackType)(
+ void *, chip::app::Clusters::BridgedDeviceBasic::Attributes::SoftwareVersionString::TypeInfo::DecodableArgType);
+typedef void (*CHIPBridgedDeviceBasicClusterManufacturingDateAttributeCallbackType)(
+ void *, chip::app::Clusters::BridgedDeviceBasic::Attributes::ManufacturingDate::TypeInfo::DecodableArgType);
+typedef void (*CHIPBridgedDeviceBasicClusterPartNumberAttributeCallbackType)(
+ void *, chip::app::Clusters::BridgedDeviceBasic::Attributes::PartNumber::TypeInfo::DecodableArgType);
+typedef void (*CHIPBridgedDeviceBasicClusterProductURLAttributeCallbackType)(
+ void *, chip::app::Clusters::BridgedDeviceBasic::Attributes::ProductURL::TypeInfo::DecodableArgType);
+typedef void (*CHIPBridgedDeviceBasicClusterProductLabelAttributeCallbackType)(
+ void *, chip::app::Clusters::BridgedDeviceBasic::Attributes::ProductLabel::TypeInfo::DecodableArgType);
+typedef void (*CHIPBridgedDeviceBasicClusterSerialNumberAttributeCallbackType)(
+ void *, chip::app::Clusters::BridgedDeviceBasic::Attributes::SerialNumber::TypeInfo::DecodableArgType);
+typedef void (*CHIPBridgedDeviceBasicClusterReachableAttributeCallbackType)(
+ void *, chip::app::Clusters::BridgedDeviceBasic::Attributes::Reachable::TypeInfo::DecodableArgType);
+typedef void (*CHIPBridgedDeviceBasicClusterClusterRevisionAttributeCallbackType)(
+ void *, chip::app::Clusters::BridgedDeviceBasic::Attributes::ClusterRevision::TypeInfo::DecodableArgType);
typedef void (*CHIPColorControlClusterCurrentHueAttributeCallbackType)(
void *, chip::app::Clusters::ColorControl::Attributes::CurrentHue::TypeInfo::DecodableArgType);
diff --git a/src/controller/java/zap-generated/CHIPClusters-JNI.cpp b/src/controller/java/zap-generated/CHIPClusters-JNI.cpp
index bb1e4ab5b61a45..0bd024f10db59d 100644
--- a/src/controller/java/zap-generated/CHIPClusters-JNI.cpp
+++ b/src/controller/java/zap-generated/CHIPClusters-JNI.cpp
@@ -4005,17 +4005,16 @@ JNI_METHOD(void, BridgedActionsCluster, reportClusterRevisionAttribute)
onReport.release();
}
-JNI_METHOD(jlong, BridgedDeviceBasicInformationCluster, initWithDevice)
-(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId)
+JNI_METHOD(jlong, BridgedDeviceBasicCluster, initWithDevice)(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId)
{
chip::DeviceLayer::StackLock lock;
- BridgedDeviceBasicInformationCluster * cppCluster = new BridgedDeviceBasicInformationCluster();
+ BridgedDeviceBasicCluster * cppCluster = new BridgedDeviceBasicCluster();
cppCluster->Associate(reinterpret_cast(devicePtr), endpointId);
return reinterpret_cast(cppCluster);
}
-JNI_METHOD(void, BridgedDeviceBasicInformationCluster, subscribeClusterRevisionAttribute)
+JNI_METHOD(void, BridgedDeviceBasicCluster, subscribeVendorNameAttribute)
(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval)
{
chip::DeviceLayer::StackLock lock;
@@ -4031,13 +4030,270 @@ JNI_METHOD(void, BridgedDeviceBasicInformationCluster, subscribeClusterRevisionA
chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY));
- CHIP_ERROR err = CHIP_NO_ERROR;
- BridgedDeviceBasicInformationCluster * cppCluster = reinterpret_cast(clusterPtr);
+ CHIP_ERROR err = CHIP_NO_ERROR;
+ BridgedDeviceBasicCluster * cppCluster = reinterpret_cast(clusterPtr);
VerifyOrReturn(cppCluster != nullptr,
chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE));
- err = cppCluster->SubscribeAttributeClusterRevision(onSuccess->Cancel(), onFailure->Cancel(),
+ err = cppCluster->SubscribeAttributeVendorName(onSuccess->Cancel(), onFailure->Cancel(), static_cast(minInterval),
+ static_cast(maxInterval));
+ VerifyOrReturn(err == CHIP_NO_ERROR,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Error subscribing to attribute", err));
+
+ onSuccess.release();
+ onFailure.release();
+}
+
+JNI_METHOD(void, BridgedDeviceBasicCluster, reportVendorNameAttribute)
+(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback)
+{
+ chip::DeviceLayer::StackLock lock;
+ std::unique_ptr onReport(
+ Platform::New(callback, true), Platform::Delete);
+ VerifyOrReturn(onReport.get() != nullptr,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Error creating native report callback", CHIP_ERROR_NO_MEMORY));
+
+ CHIP_ERROR err = CHIP_NO_ERROR;
+ BridgedDeviceBasicCluster * cppCluster = reinterpret_cast(clusterPtr);
+ VerifyOrReturn(cppCluster != nullptr,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE));
+
+ err = cppCluster->ReportAttributeVendorName(onReport->Cancel());
+ VerifyOrReturn(err == CHIP_NO_ERROR,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Error registering for attribute reporting", err));
+
+ onReport.release();
+}
+JNI_METHOD(void, BridgedDeviceBasicCluster, subscribeVendorIDAttribute)
+(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval)
+{
+ chip::DeviceLayer::StackLock lock;
+ std::unique_ptr onSuccess(
+ Platform::New(callback), Platform::Delete);
+ VerifyOrReturn(onSuccess.get() != nullptr,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY));
+
+ std::unique_ptr onFailure(
+ Platform::New(callback), Platform::Delete);
+ VerifyOrReturn(onFailure.get() != nullptr,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY));
+
+ CHIP_ERROR err = CHIP_NO_ERROR;
+ BridgedDeviceBasicCluster * cppCluster = reinterpret_cast(clusterPtr);
+ VerifyOrReturn(cppCluster != nullptr,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE));
+
+ err = cppCluster->SubscribeAttributeVendorID(onSuccess->Cancel(), onFailure->Cancel(), static_cast(minInterval),
+ static_cast(maxInterval));
+ VerifyOrReturn(err == CHIP_NO_ERROR,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Error subscribing to attribute", err));
+
+ onSuccess.release();
+ onFailure.release();
+}
+
+JNI_METHOD(void, BridgedDeviceBasicCluster, reportVendorIDAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback)
+{
+ chip::DeviceLayer::StackLock lock;
+ std::unique_ptr onReport(
+ Platform::New(callback, true), Platform::Delete);
+ VerifyOrReturn(onReport.get() != nullptr,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Error creating native report callback", CHIP_ERROR_NO_MEMORY));
+
+ CHIP_ERROR err = CHIP_NO_ERROR;
+ BridgedDeviceBasicCluster * cppCluster = reinterpret_cast(clusterPtr);
+ VerifyOrReturn(cppCluster != nullptr,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE));
+
+ err = cppCluster->ReportAttributeVendorID(onReport->Cancel());
+ VerifyOrReturn(err == CHIP_NO_ERROR,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Error registering for attribute reporting", err));
+
+ onReport.release();
+}
+JNI_METHOD(void, BridgedDeviceBasicCluster, subscribeProductNameAttribute)
+(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval)
+{
+ chip::DeviceLayer::StackLock lock;
+ std::unique_ptr onSuccess(
+ Platform::New(callback), Platform::Delete);
+ VerifyOrReturn(onSuccess.get() != nullptr,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY));
+
+ std::unique_ptr onFailure(
+ Platform::New(callback), Platform::Delete);
+ VerifyOrReturn(onFailure.get() != nullptr,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY));
+
+ CHIP_ERROR err = CHIP_NO_ERROR;
+ BridgedDeviceBasicCluster * cppCluster = reinterpret_cast(clusterPtr);
+ VerifyOrReturn(cppCluster != nullptr,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE));
+
+ err = cppCluster->SubscribeAttributeProductName(onSuccess->Cancel(), onFailure->Cancel(), static_cast(minInterval),
+ static_cast(maxInterval));
+ VerifyOrReturn(err == CHIP_NO_ERROR,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Error subscribing to attribute", err));
+
+ onSuccess.release();
+ onFailure.release();
+}
+
+JNI_METHOD(void, BridgedDeviceBasicCluster, reportProductNameAttribute)
+(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback)
+{
+ chip::DeviceLayer::StackLock lock;
+ std::unique_ptr onReport(
+ Platform::New(callback, true), Platform::Delete);
+ VerifyOrReturn(onReport.get() != nullptr,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Error creating native report callback", CHIP_ERROR_NO_MEMORY));
+
+ CHIP_ERROR err = CHIP_NO_ERROR;
+ BridgedDeviceBasicCluster * cppCluster = reinterpret_cast(clusterPtr);
+ VerifyOrReturn(cppCluster != nullptr,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE));
+
+ err = cppCluster->ReportAttributeProductName(onReport->Cancel());
+ VerifyOrReturn(err == CHIP_NO_ERROR,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Error registering for attribute reporting", err));
+
+ onReport.release();
+}
+
+JNI_METHOD(void, BridgedDeviceBasicCluster, writeNodeLabelAttribute)
+(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jstring value)
+{
+ chip::DeviceLayer::StackLock lock;
+ using TypeInfo = chip::app::Clusters::BridgedDeviceBasic::Attributes::NodeLabel::TypeInfo;
+ TypeInfo::Type cppValue;
+
+ cppValue = chip::JniUtfString(env, static_cast(value)).charSpan();
+
+ std::unique_ptr onSuccess(
+ Platform::New(callback), Platform::Delete);
+ VerifyOrReturn(onSuccess.get() != nullptr,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY));
+
+ std::unique_ptr onFailure(
+ Platform::New(callback), Platform::Delete);
+ VerifyOrReturn(onFailure.get() != nullptr,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY));
+
+ CHIP_ERROR err = CHIP_NO_ERROR;
+ BridgedDeviceBasicCluster * cppCluster = reinterpret_cast(clusterPtr);
+ VerifyOrReturn(cppCluster != nullptr,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE));
+
+ auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel());
+ auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel());
+ err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall);
+ VerifyOrReturn(
+ err == CHIP_NO_ERROR,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err));
+
+ onSuccess.release();
+ onFailure.release();
+}
+JNI_METHOD(void, BridgedDeviceBasicCluster, subscribeNodeLabelAttribute)
+(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval)
+{
+ chip::DeviceLayer::StackLock lock;
+ std::unique_ptr onSuccess(
+ Platform::New(callback), Platform::Delete);
+ VerifyOrReturn(onSuccess.get() != nullptr,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY));
+
+ std::unique_ptr onFailure(
+ Platform::New(callback), Platform::Delete);
+ VerifyOrReturn(onFailure.get() != nullptr,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY));
+
+ CHIP_ERROR err = CHIP_NO_ERROR;
+ BridgedDeviceBasicCluster * cppCluster = reinterpret_cast(clusterPtr);
+ VerifyOrReturn(cppCluster != nullptr,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE));
+
+ err = cppCluster->SubscribeAttributeNodeLabel(onSuccess->Cancel(), onFailure->Cancel(), static_cast(minInterval),
+ static_cast(maxInterval));
+ VerifyOrReturn(err == CHIP_NO_ERROR,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Error subscribing to attribute", err));
+
+ onSuccess.release();
+ onFailure.release();
+}
+
+JNI_METHOD(void, BridgedDeviceBasicCluster, reportNodeLabelAttribute)
+(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback)
+{
+ chip::DeviceLayer::StackLock lock;
+ std::unique_ptr onReport(
+ Platform::New(callback, true), Platform::Delete);
+ VerifyOrReturn(onReport.get() != nullptr,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Error creating native report callback", CHIP_ERROR_NO_MEMORY));
+
+ CHIP_ERROR err = CHIP_NO_ERROR;
+ BridgedDeviceBasicCluster * cppCluster = reinterpret_cast(clusterPtr);
+ VerifyOrReturn(cppCluster != nullptr,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE));
+
+ err = cppCluster->ReportAttributeNodeLabel(onReport->Cancel());
+ VerifyOrReturn(err == CHIP_NO_ERROR,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Error registering for attribute reporting", err));
+
+ onReport.release();
+}
+JNI_METHOD(void, BridgedDeviceBasicCluster, subscribeHardwareVersionAttribute)
+(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval)
+{
+ chip::DeviceLayer::StackLock lock;
+ std::unique_ptr onSuccess(
+ Platform::New(callback), Platform::Delete);
+ VerifyOrReturn(onSuccess.get() != nullptr,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY));
+
+ std::unique_ptr onFailure(
+ Platform::New(callback), Platform::Delete);
+ VerifyOrReturn(onFailure.get() != nullptr,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY));
+
+ CHIP_ERROR err = CHIP_NO_ERROR;
+ BridgedDeviceBasicCluster * cppCluster = reinterpret_cast(clusterPtr);
+ VerifyOrReturn(cppCluster != nullptr,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE));
+
+ err = cppCluster->SubscribeAttributeHardwareVersion(onSuccess->Cancel(), onFailure->Cancel(),
static_cast(minInterval), static_cast(maxInterval));
VerifyOrReturn(err == CHIP_NO_ERROR,
chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
@@ -4047,7 +4303,7 @@ JNI_METHOD(void, BridgedDeviceBasicInformationCluster, subscribeClusterRevisionA
onFailure.release();
}
-JNI_METHOD(void, BridgedDeviceBasicInformationCluster, reportClusterRevisionAttribute)
+JNI_METHOD(void, BridgedDeviceBasicCluster, reportHardwareVersionAttribute)
(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback)
{
chip::DeviceLayer::StackLock lock;
@@ -4057,8 +4313,558 @@ JNI_METHOD(void, BridgedDeviceBasicInformationCluster, reportClusterRevisionAttr
chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
env, callback, "Error creating native report callback", CHIP_ERROR_NO_MEMORY));
- CHIP_ERROR err = CHIP_NO_ERROR;
- BridgedDeviceBasicInformationCluster * cppCluster = reinterpret_cast(clusterPtr);
+ CHIP_ERROR err = CHIP_NO_ERROR;
+ BridgedDeviceBasicCluster * cppCluster = reinterpret_cast(clusterPtr);
+ VerifyOrReturn(cppCluster != nullptr,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE));
+
+ err = cppCluster->ReportAttributeHardwareVersion(onReport->Cancel());
+ VerifyOrReturn(err == CHIP_NO_ERROR,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Error registering for attribute reporting", err));
+
+ onReport.release();
+}
+JNI_METHOD(void, BridgedDeviceBasicCluster, subscribeHardwareVersionStringAttribute)
+(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval)
+{
+ chip::DeviceLayer::StackLock lock;
+ std::unique_ptr onSuccess(
+ Platform::New(callback), Platform::Delete);
+ VerifyOrReturn(onSuccess.get() != nullptr,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY));
+
+ std::unique_ptr onFailure(
+ Platform::New(callback), Platform::Delete);
+ VerifyOrReturn(onFailure.get() != nullptr,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY));
+
+ CHIP_ERROR err = CHIP_NO_ERROR;
+ BridgedDeviceBasicCluster * cppCluster = reinterpret_cast(clusterPtr);
+ VerifyOrReturn(cppCluster != nullptr,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE));
+
+ err = cppCluster->SubscribeAttributeHardwareVersionString(
+ onSuccess->Cancel(), onFailure->Cancel(), static_cast(minInterval), static_cast(maxInterval));
+ VerifyOrReturn(err == CHIP_NO_ERROR,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Error subscribing to attribute", err));
+
+ onSuccess.release();
+ onFailure.release();
+}
+
+JNI_METHOD(void, BridgedDeviceBasicCluster, reportHardwareVersionStringAttribute)
+(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback)
+{
+ chip::DeviceLayer::StackLock lock;
+ std::unique_ptr onReport(
+ Platform::New(callback, true), Platform::Delete);
+ VerifyOrReturn(onReport.get() != nullptr,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Error creating native report callback", CHIP_ERROR_NO_MEMORY));
+
+ CHIP_ERROR err = CHIP_NO_ERROR;
+ BridgedDeviceBasicCluster * cppCluster = reinterpret_cast(clusterPtr);
+ VerifyOrReturn(cppCluster != nullptr,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE));
+
+ err = cppCluster->ReportAttributeHardwareVersionString(onReport->Cancel());
+ VerifyOrReturn(err == CHIP_NO_ERROR,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Error registering for attribute reporting", err));
+
+ onReport.release();
+}
+JNI_METHOD(void, BridgedDeviceBasicCluster, subscribeSoftwareVersionAttribute)
+(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval)
+{
+ chip::DeviceLayer::StackLock lock;
+ std::unique_ptr onSuccess(
+ Platform::New(callback), Platform::Delete);
+ VerifyOrReturn(onSuccess.get() != nullptr,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY));
+
+ std::unique_ptr onFailure(
+ Platform::New(callback), Platform::Delete);
+ VerifyOrReturn(onFailure.get() != nullptr,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY));
+
+ CHIP_ERROR err = CHIP_NO_ERROR;
+ BridgedDeviceBasicCluster * cppCluster = reinterpret_cast(clusterPtr);
+ VerifyOrReturn(cppCluster != nullptr,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE));
+
+ err = cppCluster->SubscribeAttributeSoftwareVersion(onSuccess->Cancel(), onFailure->Cancel(),
+ static_cast(minInterval), static_cast(maxInterval));
+ VerifyOrReturn(err == CHIP_NO_ERROR,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Error subscribing to attribute", err));
+
+ onSuccess.release();
+ onFailure.release();
+}
+
+JNI_METHOD(void, BridgedDeviceBasicCluster, reportSoftwareVersionAttribute)
+(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback)
+{
+ chip::DeviceLayer::StackLock lock;
+ std::unique_ptr onReport(
+ Platform::New(callback, true), Platform::Delete);
+ VerifyOrReturn(onReport.get() != nullptr,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Error creating native report callback", CHIP_ERROR_NO_MEMORY));
+
+ CHIP_ERROR err = CHIP_NO_ERROR;
+ BridgedDeviceBasicCluster * cppCluster = reinterpret_cast(clusterPtr);
+ VerifyOrReturn(cppCluster != nullptr,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE));
+
+ err = cppCluster->ReportAttributeSoftwareVersion(onReport->Cancel());
+ VerifyOrReturn(err == CHIP_NO_ERROR,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Error registering for attribute reporting", err));
+
+ onReport.release();
+}
+JNI_METHOD(void, BridgedDeviceBasicCluster, subscribeSoftwareVersionStringAttribute)
+(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval)
+{
+ chip::DeviceLayer::StackLock lock;
+ std::unique_ptr onSuccess(
+ Platform::New(callback), Platform::Delete);
+ VerifyOrReturn(onSuccess.get() != nullptr,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY));
+
+ std::unique_ptr onFailure(
+ Platform::New(callback), Platform::Delete);
+ VerifyOrReturn(onFailure.get() != nullptr,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY));
+
+ CHIP_ERROR err = CHIP_NO_ERROR;
+ BridgedDeviceBasicCluster * cppCluster = reinterpret_cast(clusterPtr);
+ VerifyOrReturn(cppCluster != nullptr,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE));
+
+ err = cppCluster->SubscribeAttributeSoftwareVersionString(
+ onSuccess->Cancel(), onFailure->Cancel(), static_cast(minInterval), static_cast(maxInterval));
+ VerifyOrReturn(err == CHIP_NO_ERROR,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Error subscribing to attribute", err));
+
+ onSuccess.release();
+ onFailure.release();
+}
+
+JNI_METHOD(void, BridgedDeviceBasicCluster, reportSoftwareVersionStringAttribute)
+(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback)
+{
+ chip::DeviceLayer::StackLock lock;
+ std::unique_ptr onReport(
+ Platform::New(callback, true), Platform::Delete);
+ VerifyOrReturn(onReport.get() != nullptr,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Error creating native report callback", CHIP_ERROR_NO_MEMORY));
+
+ CHIP_ERROR err = CHIP_NO_ERROR;
+ BridgedDeviceBasicCluster * cppCluster = reinterpret_cast(clusterPtr);
+ VerifyOrReturn(cppCluster != nullptr,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE));
+
+ err = cppCluster->ReportAttributeSoftwareVersionString(onReport->Cancel());
+ VerifyOrReturn(err == CHIP_NO_ERROR,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Error registering for attribute reporting", err));
+
+ onReport.release();
+}
+JNI_METHOD(void, BridgedDeviceBasicCluster, subscribeManufacturingDateAttribute)
+(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval)
+{
+ chip::DeviceLayer::StackLock lock;
+ std::unique_ptr onSuccess(
+ Platform::New(callback), Platform::Delete);
+ VerifyOrReturn(onSuccess.get() != nullptr,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY));
+
+ std::unique_ptr onFailure(
+ Platform::New(callback), Platform::Delete);
+ VerifyOrReturn(onFailure.get() != nullptr,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY));
+
+ CHIP_ERROR err = CHIP_NO_ERROR;
+ BridgedDeviceBasicCluster * cppCluster = reinterpret_cast(clusterPtr);
+ VerifyOrReturn(cppCluster != nullptr,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE));
+
+ err = cppCluster->SubscribeAttributeManufacturingDate(onSuccess->Cancel(), onFailure->Cancel(),
+ static_cast(minInterval), static_cast(maxInterval));
+ VerifyOrReturn(err == CHIP_NO_ERROR,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Error subscribing to attribute", err));
+
+ onSuccess.release();
+ onFailure.release();
+}
+
+JNI_METHOD(void, BridgedDeviceBasicCluster, reportManufacturingDateAttribute)
+(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback)
+{
+ chip::DeviceLayer::StackLock lock;
+ std::unique_ptr onReport(
+ Platform::New(callback, true), Platform::Delete);
+ VerifyOrReturn(onReport.get() != nullptr,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Error creating native report callback", CHIP_ERROR_NO_MEMORY));
+
+ CHIP_ERROR err = CHIP_NO_ERROR;
+ BridgedDeviceBasicCluster * cppCluster = reinterpret_cast(clusterPtr);
+ VerifyOrReturn(cppCluster != nullptr,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE));
+
+ err = cppCluster->ReportAttributeManufacturingDate(onReport->Cancel());
+ VerifyOrReturn(err == CHIP_NO_ERROR,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Error registering for attribute reporting", err));
+
+ onReport.release();
+}
+JNI_METHOD(void, BridgedDeviceBasicCluster, subscribePartNumberAttribute)
+(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval)
+{
+ chip::DeviceLayer::StackLock lock;
+ std::unique_ptr onSuccess(
+ Platform::New(callback), Platform::Delete);
+ VerifyOrReturn(onSuccess.get() != nullptr,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY));
+
+ std::unique_ptr onFailure(
+ Platform::New(callback), Platform::Delete);
+ VerifyOrReturn(onFailure.get() != nullptr,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY));
+
+ CHIP_ERROR err = CHIP_NO_ERROR;
+ BridgedDeviceBasicCluster * cppCluster = reinterpret_cast(clusterPtr);
+ VerifyOrReturn(cppCluster != nullptr,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE));
+
+ err = cppCluster->SubscribeAttributePartNumber(onSuccess->Cancel(), onFailure->Cancel(), static_cast(minInterval),
+ static_cast(maxInterval));
+ VerifyOrReturn(err == CHIP_NO_ERROR,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Error subscribing to attribute", err));
+
+ onSuccess.release();
+ onFailure.release();
+}
+
+JNI_METHOD(void, BridgedDeviceBasicCluster, reportPartNumberAttribute)
+(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback)
+{
+ chip::DeviceLayer::StackLock lock;
+ std::unique_ptr onReport(
+ Platform::New(callback, true), Platform::Delete);
+ VerifyOrReturn(onReport.get() != nullptr,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Error creating native report callback", CHIP_ERROR_NO_MEMORY));
+
+ CHIP_ERROR err = CHIP_NO_ERROR;
+ BridgedDeviceBasicCluster * cppCluster = reinterpret_cast(clusterPtr);
+ VerifyOrReturn(cppCluster != nullptr,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE));
+
+ err = cppCluster->ReportAttributePartNumber(onReport->Cancel());
+ VerifyOrReturn(err == CHIP_NO_ERROR,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Error registering for attribute reporting", err));
+
+ onReport.release();
+}
+JNI_METHOD(void, BridgedDeviceBasicCluster, subscribeProductURLAttribute)
+(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval)
+{
+ chip::DeviceLayer::StackLock lock;
+ std::unique_ptr onSuccess(
+ Platform::New(callback), Platform::Delete);
+ VerifyOrReturn(onSuccess.get() != nullptr,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY));
+
+ std::unique_ptr onFailure(
+ Platform::New(callback), Platform::Delete);
+ VerifyOrReturn(onFailure.get() != nullptr,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY));
+
+ CHIP_ERROR err = CHIP_NO_ERROR;
+ BridgedDeviceBasicCluster * cppCluster = reinterpret_cast(clusterPtr);
+ VerifyOrReturn(cppCluster != nullptr,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE));
+
+ err = cppCluster->SubscribeAttributeProductURL(onSuccess->Cancel(), onFailure->Cancel(), static_cast(minInterval),
+ static_cast(maxInterval));
+ VerifyOrReturn(err == CHIP_NO_ERROR,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Error subscribing to attribute", err));
+
+ onSuccess.release();
+ onFailure.release();
+}
+
+JNI_METHOD(void, BridgedDeviceBasicCluster, reportProductURLAttribute)
+(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback)
+{
+ chip::DeviceLayer::StackLock lock;
+ std::unique_ptr onReport(
+ Platform::New(callback, true), Platform::Delete);
+ VerifyOrReturn(onReport.get() != nullptr,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Error creating native report callback", CHIP_ERROR_NO_MEMORY));
+
+ CHIP_ERROR err = CHIP_NO_ERROR;
+ BridgedDeviceBasicCluster * cppCluster = reinterpret_cast(clusterPtr);
+ VerifyOrReturn(cppCluster != nullptr,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE));
+
+ err = cppCluster->ReportAttributeProductURL(onReport->Cancel());
+ VerifyOrReturn(err == CHIP_NO_ERROR,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Error registering for attribute reporting", err));
+
+ onReport.release();
+}
+JNI_METHOD(void, BridgedDeviceBasicCluster, subscribeProductLabelAttribute)
+(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval)
+{
+ chip::DeviceLayer::StackLock lock;
+ std::unique_ptr onSuccess(
+ Platform::New(callback), Platform::Delete);
+ VerifyOrReturn(onSuccess.get() != nullptr,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY));
+
+ std::unique_ptr onFailure(
+ Platform::New(callback), Platform::Delete);
+ VerifyOrReturn(onFailure.get() != nullptr,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY));
+
+ CHIP_ERROR err = CHIP_NO_ERROR;
+ BridgedDeviceBasicCluster * cppCluster = reinterpret_cast(clusterPtr);
+ VerifyOrReturn(cppCluster != nullptr,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE));
+
+ err = cppCluster->SubscribeAttributeProductLabel(onSuccess->Cancel(), onFailure->Cancel(), static_cast(minInterval),
+ static_cast(maxInterval));
+ VerifyOrReturn(err == CHIP_NO_ERROR,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Error subscribing to attribute", err));
+
+ onSuccess.release();
+ onFailure.release();
+}
+
+JNI_METHOD(void, BridgedDeviceBasicCluster, reportProductLabelAttribute)
+(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback)
+{
+ chip::DeviceLayer::StackLock lock;
+ std::unique_ptr onReport(
+ Platform::New(callback, true), Platform::Delete);
+ VerifyOrReturn(onReport.get() != nullptr,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Error creating native report callback", CHIP_ERROR_NO_MEMORY));
+
+ CHIP_ERROR err = CHIP_NO_ERROR;
+ BridgedDeviceBasicCluster * cppCluster = reinterpret_cast(clusterPtr);
+ VerifyOrReturn(cppCluster != nullptr,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE));
+
+ err = cppCluster->ReportAttributeProductLabel(onReport->Cancel());
+ VerifyOrReturn(err == CHIP_NO_ERROR,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Error registering for attribute reporting", err));
+
+ onReport.release();
+}
+JNI_METHOD(void, BridgedDeviceBasicCluster, subscribeSerialNumberAttribute)
+(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval)
+{
+ chip::DeviceLayer::StackLock lock;
+ std::unique_ptr onSuccess(
+ Platform::New(callback), Platform::Delete);
+ VerifyOrReturn(onSuccess.get() != nullptr,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY));
+
+ std::unique_ptr onFailure(
+ Platform::New(callback), Platform::Delete);
+ VerifyOrReturn(onFailure.get() != nullptr,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY));
+
+ CHIP_ERROR err = CHIP_NO_ERROR;
+ BridgedDeviceBasicCluster * cppCluster = reinterpret_cast(clusterPtr);
+ VerifyOrReturn(cppCluster != nullptr,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE));
+
+ err = cppCluster->SubscribeAttributeSerialNumber(onSuccess->Cancel(), onFailure->Cancel(), static_cast(minInterval),
+ static_cast(maxInterval));
+ VerifyOrReturn(err == CHIP_NO_ERROR,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Error subscribing to attribute", err));
+
+ onSuccess.release();
+ onFailure.release();
+}
+
+JNI_METHOD(void, BridgedDeviceBasicCluster, reportSerialNumberAttribute)
+(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback)
+{
+ chip::DeviceLayer::StackLock lock;
+ std::unique_ptr onReport(
+ Platform::New(callback, true), Platform::Delete);
+ VerifyOrReturn(onReport.get() != nullptr,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Error creating native report callback", CHIP_ERROR_NO_MEMORY));
+
+ CHIP_ERROR err = CHIP_NO_ERROR;
+ BridgedDeviceBasicCluster * cppCluster = reinterpret_cast(clusterPtr);
+ VerifyOrReturn(cppCluster != nullptr,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE));
+
+ err = cppCluster->ReportAttributeSerialNumber(onReport->Cancel());
+ VerifyOrReturn(err == CHIP_NO_ERROR,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Error registering for attribute reporting", err));
+
+ onReport.release();
+}
+JNI_METHOD(void, BridgedDeviceBasicCluster, subscribeReachableAttribute)
+(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval)
+{
+ chip::DeviceLayer::StackLock lock;
+ std::unique_ptr onSuccess(
+ Platform::New(callback), Platform::Delete);
+ VerifyOrReturn(onSuccess.get() != nullptr,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY));
+
+ std::unique_ptr onFailure(
+ Platform::New(callback), Platform::Delete);
+ VerifyOrReturn(onFailure.get() != nullptr,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY));
+
+ CHIP_ERROR err = CHIP_NO_ERROR;
+ BridgedDeviceBasicCluster * cppCluster = reinterpret_cast(clusterPtr);
+ VerifyOrReturn(cppCluster != nullptr,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE));
+
+ err = cppCluster->SubscribeAttributeReachable(onSuccess->Cancel(), onFailure->Cancel(), static_cast(minInterval),
+ static_cast(maxInterval));
+ VerifyOrReturn(err == CHIP_NO_ERROR,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Error subscribing to attribute", err));
+
+ onSuccess.release();
+ onFailure.release();
+}
+
+JNI_METHOD(void, BridgedDeviceBasicCluster, reportReachableAttribute)
+(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback)
+{
+ chip::DeviceLayer::StackLock lock;
+ std::unique_ptr onReport(
+ Platform::New(callback, true), Platform::Delete);
+ VerifyOrReturn(onReport.get() != nullptr,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Error creating native report callback", CHIP_ERROR_NO_MEMORY));
+
+ CHIP_ERROR err = CHIP_NO_ERROR;
+ BridgedDeviceBasicCluster * cppCluster = reinterpret_cast(clusterPtr);
+ VerifyOrReturn(cppCluster != nullptr,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE));
+
+ err = cppCluster->ReportAttributeReachable(onReport->Cancel());
+ VerifyOrReturn(err == CHIP_NO_ERROR,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Error registering for attribute reporting", err));
+
+ onReport.release();
+}
+JNI_METHOD(void, BridgedDeviceBasicCluster, subscribeClusterRevisionAttribute)
+(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval)
+{
+ chip::DeviceLayer::StackLock lock;
+ std::unique_ptr onSuccess(
+ Platform::New(callback), Platform::Delete);
+ VerifyOrReturn(onSuccess.get() != nullptr,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY));
+
+ std::unique_ptr onFailure(
+ Platform::New(callback), Platform::Delete);
+ VerifyOrReturn(onFailure.get() != nullptr,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY));
+
+ CHIP_ERROR err = CHIP_NO_ERROR;
+ BridgedDeviceBasicCluster * cppCluster = reinterpret_cast(clusterPtr);
+ VerifyOrReturn(cppCluster != nullptr,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE));
+
+ err = cppCluster->SubscribeAttributeClusterRevision(onSuccess->Cancel(), onFailure->Cancel(),
+ static_cast(minInterval), static_cast(maxInterval));
+ VerifyOrReturn(err == CHIP_NO_ERROR,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Error subscribing to attribute", err));
+
+ onSuccess.release();
+ onFailure.release();
+}
+
+JNI_METHOD(void, BridgedDeviceBasicCluster, reportClusterRevisionAttribute)
+(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback)
+{
+ chip::DeviceLayer::StackLock lock;
+ std::unique_ptr onReport(
+ Platform::New(callback, true), Platform::Delete);
+ VerifyOrReturn(onReport.get() != nullptr,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Error creating native report callback", CHIP_ERROR_NO_MEMORY));
+
+ CHIP_ERROR err = CHIP_NO_ERROR;
+ BridgedDeviceBasicCluster * cppCluster = reinterpret_cast(clusterPtr);
VerifyOrReturn(cppCluster != nullptr,
chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE));
diff --git a/src/controller/java/zap-generated/CHIPClustersRead-JNI.cpp b/src/controller/java/zap-generated/CHIPClustersRead-JNI.cpp
index 974ee4fa91003e..7cd5f849aceefe 100644
--- a/src/controller/java/zap-generated/CHIPClustersRead-JNI.cpp
+++ b/src/controller/java/zap-generated/CHIPClustersRead-JNI.cpp
@@ -1881,11 +1881,155 @@ JNI_METHOD(void, BridgedActionsCluster, readClusterRevisionAttribute)
onFailure.release();
}
-JNI_METHOD(void, BridgedDeviceBasicInformationCluster, readClusterRevisionAttribute)
+JNI_METHOD(void, BridgedDeviceBasicCluster, readVendorNameAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback)
+{
+ chip::DeviceLayer::StackLock lock;
+ using TypeInfo = chip::app::Clusters::BridgedDeviceBasic::Attributes::VendorName::TypeInfo;
+ std::unique_ptr onSuccess(
+ chip::Platform::New(callback, false),
+ chip::Platform::Delete);
+ VerifyOrReturn(onSuccess.get() != nullptr,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY));
+
+ std::unique_ptr onFailure(
+ chip::Platform::New(callback), chip::Platform::Delete);
+ VerifyOrReturn(onFailure.get() != nullptr,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY));
+
+ CHIP_ERROR err = CHIP_NO_ERROR;
+ chip::Controller::BridgedDeviceBasicCluster * cppCluster =
+ reinterpret_cast(clusterPtr);
+ VerifyOrReturn(cppCluster != nullptr,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE));
+
+ auto successFn =
+ chip::Callback::Callback::FromCancelable(onSuccess->Cancel());
+ auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel());
+ err = cppCluster->ReadAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall);
+ VerifyOrReturn(
+ err == CHIP_NO_ERROR,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error reading attribute", err));
+
+ onSuccess.release();
+ onFailure.release();
+}
+
+JNI_METHOD(void, BridgedDeviceBasicCluster, readVendorIDAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback)
+{
+ chip::DeviceLayer::StackLock lock;
+ using TypeInfo = chip::app::Clusters::BridgedDeviceBasic::Attributes::VendorID::TypeInfo;
+ std::unique_ptr onSuccess(
+ chip::Platform::New(callback, false), chip::Platform::Delete);
+ VerifyOrReturn(onSuccess.get() != nullptr,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY));
+
+ std::unique_ptr onFailure(
+ chip::Platform::New(callback), chip::Platform::Delete);
+ VerifyOrReturn(onFailure.get() != nullptr,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY));
+
+ CHIP_ERROR err = CHIP_NO_ERROR;
+ chip::Controller::BridgedDeviceBasicCluster * cppCluster =
+ reinterpret_cast(clusterPtr);
+ VerifyOrReturn(cppCluster != nullptr,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE));
+
+ auto successFn =
+ chip::Callback::Callback::FromCancelable(onSuccess->Cancel());
+ auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel());
+ err = cppCluster->ReadAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall);
+ VerifyOrReturn(
+ err == CHIP_NO_ERROR,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error reading attribute", err));
+
+ onSuccess.release();
+ onFailure.release();
+}
+
+JNI_METHOD(void, BridgedDeviceBasicCluster, readProductNameAttribute)
+(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback)
+{
+ chip::DeviceLayer::StackLock lock;
+ using TypeInfo = chip::app::Clusters::BridgedDeviceBasic::Attributes::ProductName::TypeInfo;
+ std::unique_ptr onSuccess(
+ chip::Platform::New(callback, false),
+ chip::Platform::Delete);
+ VerifyOrReturn(onSuccess.get() != nullptr,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY));
+
+ std::unique_ptr onFailure(
+ chip::Platform::New(callback), chip::Platform::Delete);
+ VerifyOrReturn(onFailure.get() != nullptr,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY));
+
+ CHIP_ERROR err = CHIP_NO_ERROR;
+ chip::Controller::BridgedDeviceBasicCluster * cppCluster =
+ reinterpret_cast(clusterPtr);
+ VerifyOrReturn(cppCluster != nullptr,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE));
+
+ auto successFn = chip::Callback::Callback::FromCancelable(
+ onSuccess->Cancel());
+ auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel());
+ err = cppCluster->ReadAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall);
+ VerifyOrReturn(
+ err == CHIP_NO_ERROR,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error reading attribute", err));
+
+ onSuccess.release();
+ onFailure.release();
+}
+
+JNI_METHOD(void, BridgedDeviceBasicCluster, readNodeLabelAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback)
+{
+ chip::DeviceLayer::StackLock lock;
+ using TypeInfo = chip::app::Clusters::BridgedDeviceBasic::Attributes::NodeLabel::TypeInfo;
+ std::unique_ptr onSuccess(
+ chip::Platform::New(callback, false),
+ chip::Platform::Delete);
+ VerifyOrReturn(onSuccess.get() != nullptr,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY));
+
+ std::unique_ptr onFailure(
+ chip::Platform::New(callback), chip::Platform::Delete);
+ VerifyOrReturn(onFailure.get() != nullptr,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY));
+
+ CHIP_ERROR err = CHIP_NO_ERROR;
+ chip::Controller::BridgedDeviceBasicCluster * cppCluster =
+ reinterpret_cast(clusterPtr);
+ VerifyOrReturn(cppCluster != nullptr,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE));
+
+ auto successFn =
+ chip::Callback::Callback::FromCancelable(onSuccess->Cancel());
+ auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel());
+ err = cppCluster->ReadAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall);
+ VerifyOrReturn(
+ err == CHIP_NO_ERROR,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error reading attribute", err));
+
+ onSuccess.release();
+ onFailure.release();
+}
+
+JNI_METHOD(void, BridgedDeviceBasicCluster, readHardwareVersionAttribute)
(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback)
{
chip::DeviceLayer::StackLock lock;
- using TypeInfo = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::ClusterRevision::TypeInfo;
+ using TypeInfo = chip::app::Clusters::BridgedDeviceBasic::Attributes::HardwareVersion::TypeInfo;
std::unique_ptr onSuccess(
chip::Platform::New(callback, false), chip::Platform::Delete);
VerifyOrReturn(onSuccess.get() != nullptr,
@@ -1899,14 +2043,125 @@ JNI_METHOD(void, BridgedDeviceBasicInformationCluster, readClusterRevisionAttrib
env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY));
CHIP_ERROR err = CHIP_NO_ERROR;
- chip::Controller::BridgedDeviceBasicInformationCluster * cppCluster =
- reinterpret_cast(clusterPtr);
+ chip::Controller::BridgedDeviceBasicCluster * cppCluster =
+ reinterpret_cast(clusterPtr);
+ VerifyOrReturn(cppCluster != nullptr,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE));
+
+ auto successFn = chip::Callback::Callback::FromCancelable(
+ onSuccess->Cancel());
+ auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel());
+ err = cppCluster->ReadAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall);
+ VerifyOrReturn(
+ err == CHIP_NO_ERROR,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error reading attribute", err));
+
+ onSuccess.release();
+ onFailure.release();
+}
+
+JNI_METHOD(void, BridgedDeviceBasicCluster, readHardwareVersionStringAttribute)
+(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback)
+{
+ chip::DeviceLayer::StackLock lock;
+ using TypeInfo = chip::app::Clusters::BridgedDeviceBasic::Attributes::HardwareVersionString::TypeInfo;
+ std::unique_ptr onSuccess(
+ chip::Platform::New(callback, false),
+ chip::Platform::Delete);
+ VerifyOrReturn(onSuccess.get() != nullptr,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY));
+
+ std::unique_ptr onFailure(
+ chip::Platform::New(callback), chip::Platform::Delete