diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml
index 678b7b18195aa0..0929175b17d860 100644
--- a/.github/workflows/tests.yaml
+++ b/.github/workflows/tests.yaml
@@ -180,6 +180,7 @@ jobs:
src/app/zap-templates/zcl/data-model/chip/test-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/thermostat-user-interface-configuration-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/thermostat-cluster.xml \
+ src/app/zap-templates/zcl/data-model/chip/thread-border-router-management-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/thread-network-diagnostics-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/time-format-localization-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/time-synchronization-cluster.xml \
diff --git a/docs/zap_clusters.md b/docs/zap_clusters.md
index e23b2508a5ee54..9033fff4101de9 100644
--- a/docs/zap_clusters.md
+++ b/docs/zap_clusters.md
@@ -113,6 +113,7 @@ Generally regenerate using one of:
| 1070 | 0x42E | TotalVolatileOrganicCompoundsConcentrationMeasurement |
| 1071 | 0x42F | RadonConcentrationMeasurement |
| 1105 | 0x451 | WiFiNetworkManagement |
+| 1106 | 0x452 | ThreadBorderRouterManagement |
| 1107 | 0x453 | ThreadNetworkDirectory |
| 1283 | 0x503 | WakeOnLan |
| 1284 | 0x504 | Channel |
diff --git a/scripts/rules.matterlint b/scripts/rules.matterlint
index 037ed829a15a11..76e9d8df313d63 100644
--- a/scripts/rules.matterlint
+++ b/scripts/rules.matterlint
@@ -88,6 +88,7 @@ load "../src/app/zap-templates/zcl/data-model/chip/temperature-measurement-clust
load "../src/app/zap-templates/zcl/data-model/chip/test-cluster.xml";
load "../src/app/zap-templates/zcl/data-model/chip/thermostat-user-interface-configuration-cluster.xml";
load "../src/app/zap-templates/zcl/data-model/chip/thermostat-cluster.xml";
+load "../src/app/zap-templates/zcl/data-model/chip/thread-border-router-management-cluster.xml";
load "../src/app/zap-templates/zcl/data-model/chip/thread-network-diagnostics-cluster.xml";
load "../src/app/zap-templates/zcl/data-model/chip/time-format-localization-cluster.xml";
load "../src/app/zap-templates/zcl/data-model/chip/time-synchronization-cluster.xml";
diff --git a/src/app/zap-templates/zcl/data-model/all.xml b/src/app/zap-templates/zcl/data-model/all.xml
index f6db1481074e3b..e523acb886541d 100644
--- a/src/app/zap-templates/zcl/data-model/all.xml
+++ b/src/app/zap-templates/zcl/data-model/all.xml
@@ -93,6 +93,7 @@
+
diff --git a/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml b/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml
index 83a462c4a64a4a..0ffcdc11161333 100644
--- a/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml
+++ b/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml
@@ -2428,6 +2428,21 @@ limitations under the License.
+
+ MA-thread-border-router
+ HRAP
+ Matter Thread Border Router
+ 0x0103
+ 0x0091
+ Simple
+ Endpoint
+
+
+
+
+
+
+
MA-all-clusters-app
CHIP
diff --git a/src/app/zap-templates/zcl/data-model/chip/thread-border-router-management-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/thread-border-router-management-cluster.xml
new file mode 100644
index 00000000000000..2f87416f815b80
--- /dev/null
+++ b/src/app/zap-templates/zcl/data-model/chip/thread-border-router-management-cluster.xml
@@ -0,0 +1,76 @@
+
+
+
+
+
+
+
+
+
+
+
+ HRAP
+ Thread Border Router Management
+ 0x0452
+ THREAD_BORDER_ROUTER_MANAGEMENT
+ true
+ true
+ Manage the Thread network of Thread Border Router
+
+
+
+ BorderRouterName
+
+ BorderAgentID
+
+ ThreadVersion
+
+ InterfaceEnabled
+
+ ActiveDatasetTimestamp
+
+
+
+ Command to request the active operational dataset of the Thread network to which the border router is connected. This command must be sent over a valid CASE session
+
+
+
+
+ Command to request the pending dataset of the Thread network to which the border router is connected. This command must be sent over a valid CASE session
+
+
+
+
+ Generated response to GetActiveDatasetRequest or GetPendingDatasetRequest commands.
+
+
+
+
+ Command to set or update the active Dataset of the Thread network to which the Border Router is connected.
+
+
+
+
+
+
+ Command set or update the pending Dataset of the Thread network to which the Border Router is connected.
+
+
+
+
+
+
diff --git a/src/app/zap-templates/zcl/zcl-with-test-extensions.json b/src/app/zap-templates/zcl/zcl-with-test-extensions.json
index 30c14436667202..8b5df8b356c94d 100644
--- a/src/app/zap-templates/zcl/zcl-with-test-extensions.json
+++ b/src/app/zap-templates/zcl/zcl-with-test-extensions.json
@@ -115,6 +115,7 @@
"test-cluster.xml",
"thermostat-cluster.xml",
"thermostat-user-interface-configuration-cluster.xml",
+ "thread-border-router-management-cluster.xml",
"thread-network-diagnostics-cluster.xml",
"thread-network-directory-cluster.xml",
"time-format-localization-cluster.xml",
diff --git a/src/app/zap-templates/zcl/zcl.json b/src/app/zap-templates/zcl/zcl.json
index 33955572d795ec..5f82e9e16bee37 100644
--- a/src/app/zap-templates/zcl/zcl.json
+++ b/src/app/zap-templates/zcl/zcl.json
@@ -113,6 +113,7 @@
"test-cluster.xml",
"thermostat-cluster.xml",
"thermostat-user-interface-configuration-cluster.xml",
+ "thread-border-router-management-cluster.xml",
"thread-network-diagnostics-cluster.xml",
"thread-network-directory-cluster.xml",
"time-format-localization-cluster.xml",
diff --git a/src/app/zap_cluster_list.json b/src/app/zap_cluster_list.json
index 67083c04d3177d..4c7757224b1a7d 100644
--- a/src/app/zap_cluster_list.json
+++ b/src/app/zap_cluster_list.json
@@ -114,6 +114,7 @@
"TEMPERATURE_MEASUREMENT_CLUSTER": [],
"THERMOSTAT_CLUSTER": ["thermostat-client"],
"THERMOSTAT_USER_INTERFACE_CONFIGURATION_CLUSTER": [],
+ "THREAD_BORDER_ROUTER_MANAGEMENT_CLUSTER": [],
"THREAD_NETWORK_DIAGNOSTICS_CLUSTER": [],
"TIME_CLUSTER": [],
"TIME_FORMAT_LOCALIZATION_CLUSTER": [],
@@ -286,6 +287,7 @@
"THERMOSTAT_USER_INTERFACE_CONFIGURATION_CLUSTER": [
"thermostat-user-interface-configuration-server"
],
+ "THREAD_BORDER_ROUTER_MANAGEMENT_CLUSTER": [],
"THREAD_NETWORK_DIAGNOSTICS_CLUSTER": [
"thread-network-diagnostics-server"
],
diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter
index ab2e0db009c888..7b52983e9a7494 100644
--- a/src/controller/data_model/controller-clusters.matter
+++ b/src/controller/data_model/controller-clusters.matter
@@ -7674,6 +7674,49 @@ cluster WiFiNetworkManagement = 1105 {
command access(invoke: administer) NetworkPassphraseRequest(): NetworkPassphraseResponse = 0;
}
+/** Manage the Thread network of Thread Border Router */
+cluster ThreadBorderRouterManagement = 1106 {
+ revision 1;
+
+ bitmap Feature : bitmap32 {
+ kPANChange = 0x1;
+ }
+
+ readonly attribute char_string<63> borderRouterName = 0;
+ readonly attribute octet_string<254> borderAgentID = 1;
+ readonly attribute int16u threadVersion = 2;
+ readonly attribute boolean interfaceEnabled = 3;
+ readonly attribute nullable int64u activeDatasetTimestamp = 5;
+ readonly attribute command_id generatedCommandList[] = 65528;
+ readonly attribute command_id acceptedCommandList[] = 65529;
+ readonly attribute event_id eventList[] = 65530;
+ readonly attribute attrib_id attributeList[] = 65531;
+ readonly attribute bitmap32 featureMap = 65532;
+ readonly attribute int16u clusterRevision = 65533;
+
+ response struct DatasetResponse = 3 {
+ octet_string<254> dataset = 0;
+ }
+
+ request struct SetActiveDatasetRequestRequest {
+ octet_string<254> activeDataset = 0;
+ optional int64u breadcrumb = 1;
+ }
+
+ request struct SetPendingDatasetRequestRequest {
+ octet_string<254> pendingDataset = 0;
+ }
+
+ /** Command to request the active operational dataset of the Thread network to which the border router is connected. This command must be sent over a valid CASE session */
+ command access(invoke: manage) GetActiveDatasetRequest(): DatasetResponse = 0;
+ /** Command to request the pending dataset of the Thread network to which the border router is connected. This command must be sent over a valid CASE session */
+ command access(invoke: manage) GetPendingDatasetRequest(): DatasetResponse = 1;
+ /** Command to set or update the active Dataset of the Thread network to which the Border Router is connected. */
+ command access(invoke: manage) SetActiveDatasetRequest(SetActiveDatasetRequestRequest): DefaultSuccess = 4;
+ /** Command set or update the pending Dataset of the Thread network to which the Border Router is connected. */
+ command access(invoke: manage) SetPendingDatasetRequest(SetPendingDatasetRequestRequest): DefaultSuccess = 5;
+}
+
/** Manages the names and credentials of Thread networks visible to the user. */
cluster ThreadNetworkDirectory = 1107 {
revision 1;
diff --git a/src/controller/data_model/controller-clusters.zap b/src/controller/data_model/controller-clusters.zap
index 66863228023a7b..f78b80e09cddf8 100644
--- a/src/controller/data_model/controller-clusters.zap
+++ b/src/controller/data_model/controller-clusters.zap
@@ -1180,6 +1180,106 @@
}
]
},
+ {
+ "name": "Thread Border Router Management",
+ "code": 1106,
+ "mfgCode": null,
+ "define": "THREAD_BORDER_ROUTER_MANAGEMENT_CLUSTER",
+ "side": "client",
+ "enabled": 1,
+ "commands": [
+ {
+ "name": "GetActiveDatasetRequest",
+ "code": 0,
+ "mfgCode": null,
+ "source": "client",
+ "isIncoming": 0,
+ "isEnabled": 1
+ },
+ {
+ "name": "GetPendingDatasetRequest",
+ "code": 1,
+ "mfgCode": null,
+ "source": "client",
+ "isIncoming": 0,
+ "isEnabled": 1
+ },
+ {
+ "name": "DatasetResponse",
+ "code": 2,
+ "mfgCode": null,
+ "source": "server",
+ "isIncoming": 0,
+ "isEnabled": 1
+ },
+ {
+ "name": "SetActiveDatasetRequest",
+ "code": 3,
+ "mfgCode": null,
+ "source": "client",
+ "isIncoming": 0,
+ "isEnabled": 1
+ },
+ {
+ "name": "SetPendingDatasetRequest",
+ "code": 4,
+ "mfgCode": null,
+ "source": "client",
+ "isIncoming": 0,
+ "isEnabled": 1
+ },
+ {
+ "name": "TopologyRequest",
+ "code": 5,
+ "mfgCode": null,
+ "source": "client",
+ "isIncoming": 0,
+ "isEnabled": 1
+ },
+ {
+ "name": "TopologyResponse",
+ "code": 6,
+ "mfgCode": null,
+ "source": "server",
+ "isIncoming": 0,
+ "isEnabled": 1
+ }
+ ],
+ "attributes": [
+ {
+ "name": "FeatureMap",
+ "code": 65532,
+ "mfgCode": null,
+ "side": "client",
+ "type": "bitmap32",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "ClusterRevision",
+ "code": 65533,
+ "mfgCode": null,
+ "side": "client",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "2",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ }
+ ]
+ },
{
"name": "Thread Network Diagnostics",
"code": 53,
diff --git a/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java b/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java
index 7a16c3355daf4f..31c9e637c7b254 100644
--- a/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java
+++ b/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java
@@ -53083,6 +53083,438 @@ public void onSuccess(byte[] tlv) {
}
}
+ public static class ThreadBorderRouterManagementCluster extends BaseChipCluster {
+ public static final long CLUSTER_ID = 1106L;
+
+ private static final long BORDER_ROUTER_NAME_ATTRIBUTE_ID = 0L;
+ private static final long BORDER_AGENT_I_D_ATTRIBUTE_ID = 1L;
+ private static final long THREAD_VERSION_ATTRIBUTE_ID = 2L;
+ private static final long INTERFACE_ENABLED_ATTRIBUTE_ID = 3L;
+ private static final long ACTIVE_DATASET_TIMESTAMP_ATTRIBUTE_ID = 5L;
+ private static final long GENERATED_COMMAND_LIST_ATTRIBUTE_ID = 65528L;
+ private static final long ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID = 65529L;
+ private static final long EVENT_LIST_ATTRIBUTE_ID = 65530L;
+ private static final long ATTRIBUTE_LIST_ATTRIBUTE_ID = 65531L;
+ private static final long FEATURE_MAP_ATTRIBUTE_ID = 65532L;
+ private static final long CLUSTER_REVISION_ATTRIBUTE_ID = 65533L;
+
+ public ThreadBorderRouterManagementCluster(long devicePtr, int endpointId) {
+ super(devicePtr, endpointId, CLUSTER_ID);
+ }
+
+ @Override
+ @Deprecated
+ public long initWithDevice(long devicePtr, int endpointId) {
+ return 0L;
+ }
+
+ public void getActiveDatasetRequest(DatasetResponseCallback callback) {
+ getActiveDatasetRequest(callback, 0);
+ }
+
+ public void getActiveDatasetRequest(DatasetResponseCallback callback, int timedInvokeTimeoutMs) {
+ final long commandId = 0L;
+
+ ArrayList elements = new ArrayList<>();
+ StructType commandArgs = new StructType(elements);
+ invoke(new InvokeCallbackImpl(callback) {
+ @Override
+ public void onResponse(StructType invokeStructValue) {
+ final long datasetFieldID = 0L;
+ byte[] dataset = null;
+ for (StructElement element: invokeStructValue.value()) {
+ if (element.contextTagNum() == datasetFieldID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.ByteArray) {
+ ByteArrayType castingValue = element.value(ByteArrayType.class);
+ dataset = castingValue.value(byte[].class);
+ }
+ }
+ }
+ callback.onSuccess(dataset);
+ }}, commandId, commandArgs, timedInvokeTimeoutMs);
+ }
+
+ public void getPendingDatasetRequest(DatasetResponseCallback callback) {
+ getPendingDatasetRequest(callback, 0);
+ }
+
+ public void getPendingDatasetRequest(DatasetResponseCallback callback, int timedInvokeTimeoutMs) {
+ final long commandId = 1L;
+
+ ArrayList elements = new ArrayList<>();
+ StructType commandArgs = new StructType(elements);
+ invoke(new InvokeCallbackImpl(callback) {
+ @Override
+ public void onResponse(StructType invokeStructValue) {
+ final long datasetFieldID = 0L;
+ byte[] dataset = null;
+ for (StructElement element: invokeStructValue.value()) {
+ if (element.contextTagNum() == datasetFieldID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.ByteArray) {
+ ByteArrayType castingValue = element.value(ByteArrayType.class);
+ dataset = castingValue.value(byte[].class);
+ }
+ }
+ }
+ callback.onSuccess(dataset);
+ }}, commandId, commandArgs, timedInvokeTimeoutMs);
+ }
+
+ public void setActiveDatasetRequest(DefaultClusterCallback callback, byte[] activeDataset, Optional breadcrumb) {
+ setActiveDatasetRequest(callback, activeDataset, breadcrumb, 0);
+ }
+
+ public void setActiveDatasetRequest(DefaultClusterCallback callback, byte[] activeDataset, Optional breadcrumb, int timedInvokeTimeoutMs) {
+ final long commandId = 4L;
+
+ ArrayList elements = new ArrayList<>();
+ final long activeDatasetFieldID = 0L;
+ BaseTLVType activeDatasettlvValue = new ByteArrayType(activeDataset);
+ elements.add(new StructElement(activeDatasetFieldID, activeDatasettlvValue));
+
+ final long breadcrumbFieldID = 1L;
+ BaseTLVType breadcrumbtlvValue = breadcrumb.map((nonOptionalbreadcrumb) -> new UIntType(nonOptionalbreadcrumb)).orElse(new EmptyType());
+ elements.add(new StructElement(breadcrumbFieldID, breadcrumbtlvValue));
+
+ StructType commandArgs = new StructType(elements);
+ invoke(new InvokeCallbackImpl(callback) {
+ @Override
+ public void onResponse(StructType invokeStructValue) {
+ callback.onSuccess();
+ }}, commandId, commandArgs, timedInvokeTimeoutMs);
+ }
+
+ public void setPendingDatasetRequest(DefaultClusterCallback callback, byte[] pendingDataset) {
+ setPendingDatasetRequest(callback, pendingDataset, 0);
+ }
+
+ public void setPendingDatasetRequest(DefaultClusterCallback callback, byte[] pendingDataset, int timedInvokeTimeoutMs) {
+ final long commandId = 5L;
+
+ ArrayList elements = new ArrayList<>();
+ final long pendingDatasetFieldID = 0L;
+ BaseTLVType pendingDatasettlvValue = new ByteArrayType(pendingDataset);
+ elements.add(new StructElement(pendingDatasetFieldID, pendingDatasettlvValue));
+
+ StructType commandArgs = new StructType(elements);
+ invoke(new InvokeCallbackImpl(callback) {
+ @Override
+ public void onResponse(StructType invokeStructValue) {
+ callback.onSuccess();
+ }}, commandId, commandArgs, timedInvokeTimeoutMs);
+ }
+
+ public interface DatasetResponseCallback extends BaseClusterCallback {
+ void onSuccess(byte[] dataset);
+ }
+
+ public interface ActiveDatasetTimestampAttributeCallback extends BaseAttributeCallback {
+ void onSuccess(@Nullable Long value);
+ }
+
+ public interface GeneratedCommandListAttributeCallback extends BaseAttributeCallback {
+ void onSuccess(List value);
+ }
+
+ public interface AcceptedCommandListAttributeCallback extends BaseAttributeCallback {
+ void onSuccess(List value);
+ }
+
+ public interface EventListAttributeCallback extends BaseAttributeCallback {
+ void onSuccess(List value);
+ }
+
+ public interface AttributeListAttributeCallback extends BaseAttributeCallback {
+ void onSuccess(List value);
+ }
+
+ public void readBorderRouterNameAttribute(
+ CharStringAttributeCallback callback) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, BORDER_ROUTER_NAME_ATTRIBUTE_ID);
+
+ readAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ String value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, BORDER_ROUTER_NAME_ATTRIBUTE_ID, true);
+ }
+
+ public void subscribeBorderRouterNameAttribute(
+ CharStringAttributeCallback callback, int minInterval, int maxInterval) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, BORDER_ROUTER_NAME_ATTRIBUTE_ID);
+
+ subscribeAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ String value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, BORDER_ROUTER_NAME_ATTRIBUTE_ID, minInterval, maxInterval);
+ }
+
+ public void readBorderAgentIDAttribute(
+ OctetStringAttributeCallback callback) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, BORDER_AGENT_I_D_ATTRIBUTE_ID);
+
+ readAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ byte[] value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, BORDER_AGENT_I_D_ATTRIBUTE_ID, true);
+ }
+
+ public void subscribeBorderAgentIDAttribute(
+ OctetStringAttributeCallback callback, int minInterval, int maxInterval) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, BORDER_AGENT_I_D_ATTRIBUTE_ID);
+
+ subscribeAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ byte[] value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, BORDER_AGENT_I_D_ATTRIBUTE_ID, minInterval, maxInterval);
+ }
+
+ public void readThreadVersionAttribute(
+ IntegerAttributeCallback callback) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, THREAD_VERSION_ATTRIBUTE_ID);
+
+ readAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, THREAD_VERSION_ATTRIBUTE_ID, true);
+ }
+
+ public void subscribeThreadVersionAttribute(
+ IntegerAttributeCallback callback, int minInterval, int maxInterval) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, THREAD_VERSION_ATTRIBUTE_ID);
+
+ subscribeAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, THREAD_VERSION_ATTRIBUTE_ID, minInterval, maxInterval);
+ }
+
+ public void readInterfaceEnabledAttribute(
+ BooleanAttributeCallback callback) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, INTERFACE_ENABLED_ATTRIBUTE_ID);
+
+ readAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ Boolean value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, INTERFACE_ENABLED_ATTRIBUTE_ID, true);
+ }
+
+ public void subscribeInterfaceEnabledAttribute(
+ BooleanAttributeCallback callback, int minInterval, int maxInterval) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, INTERFACE_ENABLED_ATTRIBUTE_ID);
+
+ subscribeAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ Boolean value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, INTERFACE_ENABLED_ATTRIBUTE_ID, minInterval, maxInterval);
+ }
+
+ public void readActiveDatasetTimestampAttribute(
+ ActiveDatasetTimestampAttributeCallback callback) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACTIVE_DATASET_TIMESTAMP_ATTRIBUTE_ID);
+
+ readAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, ACTIVE_DATASET_TIMESTAMP_ATTRIBUTE_ID, true);
+ }
+
+ public void subscribeActiveDatasetTimestampAttribute(
+ ActiveDatasetTimestampAttributeCallback callback, int minInterval, int maxInterval) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACTIVE_DATASET_TIMESTAMP_ATTRIBUTE_ID);
+
+ subscribeAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, ACTIVE_DATASET_TIMESTAMP_ATTRIBUTE_ID, minInterval, maxInterval);
+ }
+
+ public void readGeneratedCommandListAttribute(
+ GeneratedCommandListAttributeCallback callback) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GENERATED_COMMAND_LIST_ATTRIBUTE_ID);
+
+ readAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, GENERATED_COMMAND_LIST_ATTRIBUTE_ID, true);
+ }
+
+ public void subscribeGeneratedCommandListAttribute(
+ GeneratedCommandListAttributeCallback callback, int minInterval, int maxInterval) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GENERATED_COMMAND_LIST_ATTRIBUTE_ID);
+
+ subscribeAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, GENERATED_COMMAND_LIST_ATTRIBUTE_ID, minInterval, maxInterval);
+ }
+
+ public void readAcceptedCommandListAttribute(
+ AcceptedCommandListAttributeCallback callback) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID);
+
+ readAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID, true);
+ }
+
+ public void subscribeAcceptedCommandListAttribute(
+ AcceptedCommandListAttributeCallback callback, int minInterval, int maxInterval) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID);
+
+ subscribeAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID, minInterval, maxInterval);
+ }
+
+ public void readEventListAttribute(
+ EventListAttributeCallback callback) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, EVENT_LIST_ATTRIBUTE_ID);
+
+ readAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, EVENT_LIST_ATTRIBUTE_ID, true);
+ }
+
+ public void subscribeEventListAttribute(
+ EventListAttributeCallback callback, int minInterval, int maxInterval) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, EVENT_LIST_ATTRIBUTE_ID);
+
+ subscribeAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, EVENT_LIST_ATTRIBUTE_ID, minInterval, maxInterval);
+ }
+
+ public void readAttributeListAttribute(
+ AttributeListAttributeCallback callback) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ATTRIBUTE_LIST_ATTRIBUTE_ID);
+
+ readAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, ATTRIBUTE_LIST_ATTRIBUTE_ID, true);
+ }
+
+ public void subscribeAttributeListAttribute(
+ AttributeListAttributeCallback callback, int minInterval, int maxInterval) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ATTRIBUTE_LIST_ATTRIBUTE_ID);
+
+ subscribeAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, ATTRIBUTE_LIST_ATTRIBUTE_ID, minInterval, maxInterval);
+ }
+
+ public void readFeatureMapAttribute(
+ LongAttributeCallback callback) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, FEATURE_MAP_ATTRIBUTE_ID);
+
+ readAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, FEATURE_MAP_ATTRIBUTE_ID, true);
+ }
+
+ public void subscribeFeatureMapAttribute(
+ LongAttributeCallback callback, int minInterval, int maxInterval) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, FEATURE_MAP_ATTRIBUTE_ID);
+
+ subscribeAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, FEATURE_MAP_ATTRIBUTE_ID, minInterval, maxInterval);
+ }
+
+ public void readClusterRevisionAttribute(
+ IntegerAttributeCallback callback) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CLUSTER_REVISION_ATTRIBUTE_ID);
+
+ readAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, CLUSTER_REVISION_ATTRIBUTE_ID, true);
+ }
+
+ public void subscribeClusterRevisionAttribute(
+ IntegerAttributeCallback callback, int minInterval, int maxInterval) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CLUSTER_REVISION_ATTRIBUTE_ID);
+
+ subscribeAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, CLUSTER_REVISION_ATTRIBUTE_ID, minInterval, maxInterval);
+ }
+ }
+
public static class ThreadNetworkDirectoryCluster extends BaseChipCluster {
public static final long CLUSTER_ID = 1107L;
diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java
index cd89fd9df6d472..ae1b08ac2aea18 100644
--- a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java
+++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java
@@ -331,6 +331,9 @@ public static BaseCluster getCluster(long clusterId) {
if (clusterId == WiFiNetworkManagement.ID) {
return new WiFiNetworkManagement();
}
+ if (clusterId == ThreadBorderRouterManagement.ID) {
+ return new ThreadBorderRouterManagement();
+ }
if (clusterId == ThreadNetworkDirectory.ID) {
return new ThreadNetworkDirectory();
}
@@ -14421,6 +14424,149 @@ public long getCommandID(String name) throws IllegalArgumentException {
return Command.valueOf(name).getID();
}
}
+ public static class ThreadBorderRouterManagement implements BaseCluster {
+ public static final long ID = 1106L;
+ public long getID() {
+ return ID;
+ }
+
+ public enum Attribute {
+ BorderRouterName(0L),
+ BorderAgentID(1L),
+ ThreadVersion(2L),
+ InterfaceEnabled(3L),
+ ActiveDatasetTimestamp(5L),
+ GeneratedCommandList(65528L),
+ AcceptedCommandList(65529L),
+ EventList(65530L),
+ AttributeList(65531L),
+ FeatureMap(65532L),
+ ClusterRevision(65533L),;
+ private final long id;
+ Attribute(long id) {
+ this.id = id;
+ }
+
+ public long getID() {
+ return id;
+ }
+
+ public static Attribute value(long id) throws NoSuchFieldError {
+ for (Attribute attribute : Attribute.values()) {
+ if (attribute.getID() == id) {
+ return attribute;
+ }
+ }
+ throw new NoSuchFieldError();
+ }
+ }
+
+ public enum Event {;
+ private final long id;
+ Event(long id) {
+ this.id = id;
+ }
+
+ public long getID() {
+ return id;
+ }
+
+ public static Event value(long id) throws NoSuchFieldError {
+ for (Event event : Event.values()) {
+ if (event.getID() == id) {
+ return event;
+ }
+ }
+ throw new NoSuchFieldError();
+ }
+ }
+
+ public enum Command {
+ GetActiveDatasetRequest(0L),
+ GetPendingDatasetRequest(1L),
+ SetActiveDatasetRequest(4L),
+ SetPendingDatasetRequest(5L),;
+ private final long id;
+ Command(long id) {
+ this.id = id;
+ }
+
+ public long getID() {
+ return id;
+ }
+
+ public static Command value(long id) throws NoSuchFieldError {
+ for (Command command : Command.values()) {
+ if (command.getID() == id) {
+ return command;
+ }
+ }
+ throw new NoSuchFieldError();
+ }
+ }public enum SetActiveDatasetRequestCommandField {ActiveDataset(0),Breadcrumb(1),;
+ private final int id;
+ SetActiveDatasetRequestCommandField(int id) {
+ this.id = id;
+ }
+
+ public int getID() {
+ return id;
+ }
+ public static SetActiveDatasetRequestCommandField value(int id) throws NoSuchFieldError {
+ for (SetActiveDatasetRequestCommandField field : SetActiveDatasetRequestCommandField.values()) {
+ if (field.getID() == id) {
+ return field;
+ }
+ }
+ throw new NoSuchFieldError();
+ }
+ }public enum SetPendingDatasetRequestCommandField {PendingDataset(0),;
+ private final int id;
+ SetPendingDatasetRequestCommandField(int id) {
+ this.id = id;
+ }
+
+ public int getID() {
+ return id;
+ }
+ public static SetPendingDatasetRequestCommandField value(int id) throws NoSuchFieldError {
+ for (SetPendingDatasetRequestCommandField field : SetPendingDatasetRequestCommandField.values()) {
+ if (field.getID() == id) {
+ return field;
+ }
+ }
+ throw new NoSuchFieldError();
+ }
+ }@Override
+ public String getAttributeName(long id) throws NoSuchFieldError {
+ return Attribute.value(id).toString();
+ }
+
+ @Override
+ public String getEventName(long id) throws NoSuchFieldError {
+ return Event.value(id).toString();
+ }
+
+ @Override
+ public String getCommandName(long id) throws NoSuchFieldError {
+ return Command.value(id).toString();
+ }
+
+ @Override
+ public long getAttributeID(String name) throws IllegalArgumentException {
+ return Attribute.valueOf(name).getID();
+ }
+
+ @Override
+ public long getEventID(String name) throws IllegalArgumentException {
+ return Event.valueOf(name).getID();
+ }
+
+ @Override
+ public long getCommandID(String name) throws IllegalArgumentException {
+ return Command.valueOf(name).getID();
+ }
+ }
public static class ThreadNetworkDirectory implements BaseCluster {
public static final long ID = 1107L;
public long getID() {
diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java
index 47ee02f5ede86c..7bf6b1baf76f1b 100644
--- a/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java
+++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java
@@ -17427,6 +17427,133 @@ public void onError(Exception ex) {
}
+ public static class DelegatedThreadBorderRouterManagementClusterDatasetResponseCallback implements ChipClusters.ThreadBorderRouterManagementCluster.DatasetResponseCallback, DelegatedClusterCallback {
+ private ClusterCommandCallback callback;
+ @Override
+ public void setCallbackDelegate(ClusterCommandCallback callback) {
+ this.callback = callback;
+ }
+
+ @Override
+ public void onSuccess(byte[] dataset) {
+ Map responseValues = new LinkedHashMap<>();
+
+ CommandResponseInfo datasetResponseValue = new CommandResponseInfo("dataset", "byte[]");
+ responseValues.put(datasetResponseValue, dataset);
+ callback.onSuccess(responseValues);
+ }
+
+ @Override
+ public void onError(Exception error) {
+ callback.onFailure(error);
+ }
+ }
+ public static class DelegatedThreadBorderRouterManagementClusterActiveDatasetTimestampAttributeCallback implements ChipClusters.ThreadBorderRouterManagementCluster.ActiveDatasetTimestampAttributeCallback, DelegatedClusterCallback {
+ private ClusterCommandCallback callback;
+ @Override
+ public void setCallbackDelegate(ClusterCommandCallback callback) {
+ this.callback = callback;
+ }
+
+ @Override
+ public void onSuccess(@Nullable Long value) {
+ Map responseValues = new LinkedHashMap<>();
+ CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Long");
+ responseValues.put(commandResponseInfo, value);
+ callback.onSuccess(responseValues);
+ }
+
+ @Override
+ public void onError(Exception ex) {
+ callback.onFailure(ex);
+ }
+ }
+
+ public static class DelegatedThreadBorderRouterManagementClusterGeneratedCommandListAttributeCallback implements ChipClusters.ThreadBorderRouterManagementCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback {
+ private ClusterCommandCallback callback;
+ @Override
+ public void setCallbackDelegate(ClusterCommandCallback callback) {
+ this.callback = callback;
+ }
+
+ @Override
+ public void onSuccess(List valueList) {
+ Map responseValues = new LinkedHashMap<>();
+ CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List");
+ responseValues.put(commandResponseInfo, valueList);
+ callback.onSuccess(responseValues);
+ }
+
+ @Override
+ public void onError(Exception ex) {
+ callback.onFailure(ex);
+ }
+ }
+
+ public static class DelegatedThreadBorderRouterManagementClusterAcceptedCommandListAttributeCallback implements ChipClusters.ThreadBorderRouterManagementCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback {
+ private ClusterCommandCallback callback;
+ @Override
+ public void setCallbackDelegate(ClusterCommandCallback callback) {
+ this.callback = callback;
+ }
+
+ @Override
+ public void onSuccess(List valueList) {
+ Map responseValues = new LinkedHashMap<>();
+ CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List");
+ responseValues.put(commandResponseInfo, valueList);
+ callback.onSuccess(responseValues);
+ }
+
+ @Override
+ public void onError(Exception ex) {
+ callback.onFailure(ex);
+ }
+ }
+
+ public static class DelegatedThreadBorderRouterManagementClusterEventListAttributeCallback implements ChipClusters.ThreadBorderRouterManagementCluster.EventListAttributeCallback, DelegatedClusterCallback {
+ private ClusterCommandCallback callback;
+ @Override
+ public void setCallbackDelegate(ClusterCommandCallback callback) {
+ this.callback = callback;
+ }
+
+ @Override
+ public void onSuccess(List valueList) {
+ Map responseValues = new LinkedHashMap<>();
+ CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List");
+ responseValues.put(commandResponseInfo, valueList);
+ callback.onSuccess(responseValues);
+ }
+
+ @Override
+ public void onError(Exception ex) {
+ callback.onFailure(ex);
+ }
+ }
+
+ public static class DelegatedThreadBorderRouterManagementClusterAttributeListAttributeCallback implements ChipClusters.ThreadBorderRouterManagementCluster.AttributeListAttributeCallback, DelegatedClusterCallback {
+ private ClusterCommandCallback callback;
+ @Override
+ public void setCallbackDelegate(ClusterCommandCallback callback) {
+ this.callback = callback;
+ }
+
+ @Override
+ public void onSuccess(List valueList) {
+ Map responseValues = new LinkedHashMap<>();
+ CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List");
+ responseValues.put(commandResponseInfo, valueList);
+ callback.onSuccess(responseValues);
+ }
+
+ @Override
+ public void onError(Exception ex) {
+ callback.onFailure(ex);
+ }
+ }
+
+
public static class DelegatedThreadNetworkDirectoryClusterOperationalDatasetResponseCallback implements ChipClusters.ThreadNetworkDirectoryCluster.OperationalDatasetResponseCallback, DelegatedClusterCallback {
private ClusterCommandCallback callback;
@Override
@@ -21456,6 +21583,10 @@ public Map initializeClusterMap() {
(ptr, endpointId) -> new ChipClusters.WiFiNetworkManagementCluster(ptr, endpointId), new HashMap<>());
clusterMap.put("wiFiNetworkManagement", wiFiNetworkManagementClusterInfo);
+ ClusterInfo threadBorderRouterManagementClusterInfo = new ClusterInfo(
+ (ptr, endpointId) -> new ChipClusters.ThreadBorderRouterManagementCluster(ptr, endpointId), new HashMap<>());
+ clusterMap.put("threadBorderRouterManagement", threadBorderRouterManagementClusterInfo);
+
ClusterInfo threadNetworkDirectoryClusterInfo = new ClusterInfo(
(ptr, endpointId) -> new ChipClusters.ThreadNetworkDirectoryCluster(ptr, endpointId), new HashMap<>());
clusterMap.put("threadNetworkDirectory", threadNetworkDirectoryClusterInfo);
@@ -21637,6 +21768,7 @@ public void combineCommand(Map destination, Map> getCommandMap() {
commandMap.put("wiFiNetworkManagement", wiFiNetworkManagementClusterInteractionInfoMap);
+ Map threadBorderRouterManagementClusterInteractionInfoMap = new LinkedHashMap<>();
+
+ Map threadBorderRouterManagementgetActiveDatasetRequestCommandParams = new LinkedHashMap();
+ InteractionInfo threadBorderRouterManagementgetActiveDatasetRequestInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.ThreadBorderRouterManagementCluster) cluster)
+ .getActiveDatasetRequest((ChipClusters.ThreadBorderRouterManagementCluster.DatasetResponseCallback) callback
+ );
+ },
+ () -> new DelegatedThreadBorderRouterManagementClusterDatasetResponseCallback(),
+ threadBorderRouterManagementgetActiveDatasetRequestCommandParams
+ );
+ threadBorderRouterManagementClusterInteractionInfoMap.put("getActiveDatasetRequest", threadBorderRouterManagementgetActiveDatasetRequestInteractionInfo);
+
+ Map threadBorderRouterManagementgetPendingDatasetRequestCommandParams = new LinkedHashMap();
+ InteractionInfo threadBorderRouterManagementgetPendingDatasetRequestInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.ThreadBorderRouterManagementCluster) cluster)
+ .getPendingDatasetRequest((ChipClusters.ThreadBorderRouterManagementCluster.DatasetResponseCallback) callback
+ );
+ },
+ () -> new DelegatedThreadBorderRouterManagementClusterDatasetResponseCallback(),
+ threadBorderRouterManagementgetPendingDatasetRequestCommandParams
+ );
+ threadBorderRouterManagementClusterInteractionInfoMap.put("getPendingDatasetRequest", threadBorderRouterManagementgetPendingDatasetRequestInteractionInfo);
+
+ Map threadBorderRouterManagementsetActiveDatasetRequestCommandParams = new LinkedHashMap();
+
+ CommandParameterInfo threadBorderRouterManagementsetActiveDatasetRequestactiveDatasetCommandParameterInfo = new CommandParameterInfo("activeDataset", byte[].class, byte[].class);
+ threadBorderRouterManagementsetActiveDatasetRequestCommandParams.put("activeDataset",threadBorderRouterManagementsetActiveDatasetRequestactiveDatasetCommandParameterInfo);
+
+ CommandParameterInfo threadBorderRouterManagementsetActiveDatasetRequestbreadcrumbCommandParameterInfo = new CommandParameterInfo("breadcrumb", Optional.class, Long.class);
+ threadBorderRouterManagementsetActiveDatasetRequestCommandParams.put("breadcrumb",threadBorderRouterManagementsetActiveDatasetRequestbreadcrumbCommandParameterInfo);
+ InteractionInfo threadBorderRouterManagementsetActiveDatasetRequestInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.ThreadBorderRouterManagementCluster) cluster)
+ .setActiveDatasetRequest((DefaultClusterCallback) callback
+ , (byte[])
+ commandArguments.get("activeDataset")
+ , (Optional)
+ commandArguments.get("breadcrumb")
+ );
+ },
+ () -> new DelegatedDefaultClusterCallback(),
+ threadBorderRouterManagementsetActiveDatasetRequestCommandParams
+ );
+ threadBorderRouterManagementClusterInteractionInfoMap.put("setActiveDatasetRequest", threadBorderRouterManagementsetActiveDatasetRequestInteractionInfo);
+
+ Map threadBorderRouterManagementsetPendingDatasetRequestCommandParams = new LinkedHashMap();
+
+ CommandParameterInfo threadBorderRouterManagementsetPendingDatasetRequestpendingDatasetCommandParameterInfo = new CommandParameterInfo("pendingDataset", byte[].class, byte[].class);
+ threadBorderRouterManagementsetPendingDatasetRequestCommandParams.put("pendingDataset",threadBorderRouterManagementsetPendingDatasetRequestpendingDatasetCommandParameterInfo);
+ InteractionInfo threadBorderRouterManagementsetPendingDatasetRequestInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.ThreadBorderRouterManagementCluster) cluster)
+ .setPendingDatasetRequest((DefaultClusterCallback) callback
+ , (byte[])
+ commandArguments.get("pendingDataset")
+ );
+ },
+ () -> new DelegatedDefaultClusterCallback(),
+ threadBorderRouterManagementsetPendingDatasetRequestCommandParams
+ );
+ threadBorderRouterManagementClusterInteractionInfoMap.put("setPendingDatasetRequest", threadBorderRouterManagementsetPendingDatasetRequestInteractionInfo);
+
+ commandMap.put("threadBorderRouterManagement", threadBorderRouterManagementClusterInteractionInfoMap);
+
Map threadNetworkDirectoryClusterInteractionInfoMap = new LinkedHashMap<>();
Map threadNetworkDirectoryaddNetworkCommandParams = new LinkedHashMap();
diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java
index c607d8deca891a..8f038db5ff3664 100644
--- a/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java
+++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java
@@ -16610,6 +16610,131 @@ private static Map readWiFiNetworkManagementInteraction
return result;
}
+ private static Map readThreadBorderRouterManagementInteractionInfo() {
+ Map result = new LinkedHashMap<>();Map readThreadBorderRouterManagementBorderRouterNameCommandParams = new LinkedHashMap();
+ InteractionInfo readThreadBorderRouterManagementBorderRouterNameAttributeInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.ThreadBorderRouterManagementCluster) cluster).readBorderRouterNameAttribute(
+ (ChipClusters.CharStringAttributeCallback) callback
+ );
+ },
+ () -> new ClusterInfoMapping.DelegatedCharStringAttributeCallback(),
+ readThreadBorderRouterManagementBorderRouterNameCommandParams
+ );
+ result.put("readBorderRouterNameAttribute", readThreadBorderRouterManagementBorderRouterNameAttributeInteractionInfo);
+ Map readThreadBorderRouterManagementBorderAgentIDCommandParams = new LinkedHashMap();
+ InteractionInfo readThreadBorderRouterManagementBorderAgentIDAttributeInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.ThreadBorderRouterManagementCluster) cluster).readBorderAgentIDAttribute(
+ (ChipClusters.OctetStringAttributeCallback) callback
+ );
+ },
+ () -> new ClusterInfoMapping.DelegatedOctetStringAttributeCallback(),
+ readThreadBorderRouterManagementBorderAgentIDCommandParams
+ );
+ result.put("readBorderAgentIDAttribute", readThreadBorderRouterManagementBorderAgentIDAttributeInteractionInfo);
+ Map readThreadBorderRouterManagementThreadVersionCommandParams = new LinkedHashMap();
+ InteractionInfo readThreadBorderRouterManagementThreadVersionAttributeInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.ThreadBorderRouterManagementCluster) cluster).readThreadVersionAttribute(
+ (ChipClusters.IntegerAttributeCallback) callback
+ );
+ },
+ () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(),
+ readThreadBorderRouterManagementThreadVersionCommandParams
+ );
+ result.put("readThreadVersionAttribute", readThreadBorderRouterManagementThreadVersionAttributeInteractionInfo);
+ Map readThreadBorderRouterManagementInterfaceEnabledCommandParams = new LinkedHashMap();
+ InteractionInfo readThreadBorderRouterManagementInterfaceEnabledAttributeInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.ThreadBorderRouterManagementCluster) cluster).readInterfaceEnabledAttribute(
+ (ChipClusters.BooleanAttributeCallback) callback
+ );
+ },
+ () -> new ClusterInfoMapping.DelegatedBooleanAttributeCallback(),
+ readThreadBorderRouterManagementInterfaceEnabledCommandParams
+ );
+ result.put("readInterfaceEnabledAttribute", readThreadBorderRouterManagementInterfaceEnabledAttributeInteractionInfo);
+ Map readThreadBorderRouterManagementActiveDatasetTimestampCommandParams = new LinkedHashMap();
+ InteractionInfo readThreadBorderRouterManagementActiveDatasetTimestampAttributeInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.ThreadBorderRouterManagementCluster) cluster).readActiveDatasetTimestampAttribute(
+ (ChipClusters.ThreadBorderRouterManagementCluster.ActiveDatasetTimestampAttributeCallback) callback
+ );
+ },
+ () -> new ClusterInfoMapping.DelegatedThreadBorderRouterManagementClusterActiveDatasetTimestampAttributeCallback(),
+ readThreadBorderRouterManagementActiveDatasetTimestampCommandParams
+ );
+ result.put("readActiveDatasetTimestampAttribute", readThreadBorderRouterManagementActiveDatasetTimestampAttributeInteractionInfo);
+ Map readThreadBorderRouterManagementGeneratedCommandListCommandParams = new LinkedHashMap();
+ InteractionInfo readThreadBorderRouterManagementGeneratedCommandListAttributeInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.ThreadBorderRouterManagementCluster) cluster).readGeneratedCommandListAttribute(
+ (ChipClusters.ThreadBorderRouterManagementCluster.GeneratedCommandListAttributeCallback) callback
+ );
+ },
+ () -> new ClusterInfoMapping.DelegatedThreadBorderRouterManagementClusterGeneratedCommandListAttributeCallback(),
+ readThreadBorderRouterManagementGeneratedCommandListCommandParams
+ );
+ result.put("readGeneratedCommandListAttribute", readThreadBorderRouterManagementGeneratedCommandListAttributeInteractionInfo);
+ Map readThreadBorderRouterManagementAcceptedCommandListCommandParams = new LinkedHashMap();
+ InteractionInfo readThreadBorderRouterManagementAcceptedCommandListAttributeInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.ThreadBorderRouterManagementCluster) cluster).readAcceptedCommandListAttribute(
+ (ChipClusters.ThreadBorderRouterManagementCluster.AcceptedCommandListAttributeCallback) callback
+ );
+ },
+ () -> new ClusterInfoMapping.DelegatedThreadBorderRouterManagementClusterAcceptedCommandListAttributeCallback(),
+ readThreadBorderRouterManagementAcceptedCommandListCommandParams
+ );
+ result.put("readAcceptedCommandListAttribute", readThreadBorderRouterManagementAcceptedCommandListAttributeInteractionInfo);
+ Map readThreadBorderRouterManagementEventListCommandParams = new LinkedHashMap();
+ InteractionInfo readThreadBorderRouterManagementEventListAttributeInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.ThreadBorderRouterManagementCluster) cluster).readEventListAttribute(
+ (ChipClusters.ThreadBorderRouterManagementCluster.EventListAttributeCallback) callback
+ );
+ },
+ () -> new ClusterInfoMapping.DelegatedThreadBorderRouterManagementClusterEventListAttributeCallback(),
+ readThreadBorderRouterManagementEventListCommandParams
+ );
+ result.put("readEventListAttribute", readThreadBorderRouterManagementEventListAttributeInteractionInfo);
+ Map readThreadBorderRouterManagementAttributeListCommandParams = new LinkedHashMap();
+ InteractionInfo readThreadBorderRouterManagementAttributeListAttributeInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.ThreadBorderRouterManagementCluster) cluster).readAttributeListAttribute(
+ (ChipClusters.ThreadBorderRouterManagementCluster.AttributeListAttributeCallback) callback
+ );
+ },
+ () -> new ClusterInfoMapping.DelegatedThreadBorderRouterManagementClusterAttributeListAttributeCallback(),
+ readThreadBorderRouterManagementAttributeListCommandParams
+ );
+ result.put("readAttributeListAttribute", readThreadBorderRouterManagementAttributeListAttributeInteractionInfo);
+ Map readThreadBorderRouterManagementFeatureMapCommandParams = new LinkedHashMap();
+ InteractionInfo readThreadBorderRouterManagementFeatureMapAttributeInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.ThreadBorderRouterManagementCluster) cluster).readFeatureMapAttribute(
+ (ChipClusters.LongAttributeCallback) callback
+ );
+ },
+ () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(),
+ readThreadBorderRouterManagementFeatureMapCommandParams
+ );
+ result.put("readFeatureMapAttribute", readThreadBorderRouterManagementFeatureMapAttributeInteractionInfo);
+ Map readThreadBorderRouterManagementClusterRevisionCommandParams = new LinkedHashMap();
+ InteractionInfo readThreadBorderRouterManagementClusterRevisionAttributeInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.ThreadBorderRouterManagementCluster) cluster).readClusterRevisionAttribute(
+ (ChipClusters.IntegerAttributeCallback) callback
+ );
+ },
+ () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(),
+ readThreadBorderRouterManagementClusterRevisionCommandParams
+ );
+ result.put("readClusterRevisionAttribute", readThreadBorderRouterManagementClusterRevisionAttributeInteractionInfo);
+
+ return result;
+ }
private static Map readThreadNetworkDirectoryInteractionInfo() {
Map result = new LinkedHashMap<>();Map readThreadNetworkDirectoryPreferredExtendedPanIDCommandParams = new LinkedHashMap();
InteractionInfo readThreadNetworkDirectoryPreferredExtendedPanIDAttributeInteractionInfo = new InteractionInfo(
@@ -20773,6 +20898,7 @@ public Map> getReadAttributeMap() {
put("totalVolatileOrganicCompoundsConcentrationMeasurement", readTotalVolatileOrganicCompoundsConcentrationMeasurementInteractionInfo());
put("radonConcentrationMeasurement", readRadonConcentrationMeasurementInteractionInfo());
put("wiFiNetworkManagement", readWiFiNetworkManagementInteractionInfo());
+ put("threadBorderRouterManagement", readThreadBorderRouterManagementInteractionInfo());
put("threadNetworkDirectory", readThreadNetworkDirectoryInteractionInfo());
put("wakeOnLan", readWakeOnLanInteractionInfo());
put("channel", readChannelInteractionInfo());
diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterWriteMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterWriteMapping.java
index 61b492fde61abd..948e665b63da72 100644
--- a/src/controller/java/generated/java/chip/devicecontroller/ClusterWriteMapping.java
+++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterWriteMapping.java
@@ -3638,6 +3638,8 @@ public Map> getWriteAttributeMap() {
writeAttributeMap.put("radonConcentrationMeasurement", writeRadonConcentrationMeasurementInteractionInfo);
Map writeWiFiNetworkManagementInteractionInfo = new LinkedHashMap<>();
writeAttributeMap.put("wiFiNetworkManagement", writeWiFiNetworkManagementInteractionInfo);
+ Map writeThreadBorderRouterManagementInteractionInfo = new LinkedHashMap<>();
+ writeAttributeMap.put("threadBorderRouterManagement", writeThreadBorderRouterManagementInteractionInfo);
Map writeThreadNetworkDirectoryInteractionInfo = new LinkedHashMap<>();
Map writeThreadNetworkDirectoryPreferredExtendedPanIDCommandParams = new LinkedHashMap();
CommandParameterInfo threadNetworkDirectorypreferredExtendedPanIDCommandParameterInfo =
diff --git a/src/controller/java/generated/java/matter/controller/cluster/clusters/ThreadBorderRouterManagementCluster.kt b/src/controller/java/generated/java/matter/controller/cluster/clusters/ThreadBorderRouterManagementCluster.kt
new file mode 100644
index 00000000000000..fbcfe857b52e8c
--- /dev/null
+++ b/src/controller/java/generated/java/matter/controller/cluster/clusters/ThreadBorderRouterManagementCluster.kt
@@ -0,0 +1,1210 @@
+/*
+ *
+ * Copyright (c) 2023 Project CHIP Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package matter.controller.cluster.clusters
+
+import java.time.Duration
+import java.util.logging.Level
+import java.util.logging.Logger
+import kotlinx.coroutines.flow.Flow
+import kotlinx.coroutines.flow.transform
+import matter.controller.BooleanSubscriptionState
+import matter.controller.ByteArraySubscriptionState
+import matter.controller.InvokeRequest
+import matter.controller.InvokeResponse
+import matter.controller.MatterController
+import matter.controller.ReadData
+import matter.controller.ReadRequest
+import matter.controller.StringSubscriptionState
+import matter.controller.SubscribeRequest
+import matter.controller.SubscriptionState
+import matter.controller.UIntSubscriptionState
+import matter.controller.UShortSubscriptionState
+import matter.controller.cluster.structs.*
+import matter.controller.model.AttributePath
+import matter.controller.model.CommandPath
+import matter.tlv.AnonymousTag
+import matter.tlv.ContextSpecificTag
+import matter.tlv.TlvReader
+import matter.tlv.TlvWriter
+
+class ThreadBorderRouterManagementCluster(
+ private val controller: MatterController,
+ private val endpointId: UShort
+) {
+ class DatasetResponse(val dataset: ByteArray)
+
+ class ActiveDatasetTimestampAttribute(val value: ULong?)
+
+ sealed class ActiveDatasetTimestampAttributeSubscriptionState {
+ data class Success(val value: ULong?) : ActiveDatasetTimestampAttributeSubscriptionState()
+
+ data class Error(val exception: Exception) : ActiveDatasetTimestampAttributeSubscriptionState()
+
+ object SubscriptionEstablished : ActiveDatasetTimestampAttributeSubscriptionState()
+ }
+
+ class GeneratedCommandListAttribute(val value: List)
+
+ sealed class GeneratedCommandListAttributeSubscriptionState {
+ data class Success(val value: List) : GeneratedCommandListAttributeSubscriptionState()
+
+ data class Error(val exception: Exception) : GeneratedCommandListAttributeSubscriptionState()
+
+ object SubscriptionEstablished : GeneratedCommandListAttributeSubscriptionState()
+ }
+
+ class AcceptedCommandListAttribute(val value: List)
+
+ sealed class AcceptedCommandListAttributeSubscriptionState {
+ data class Success(val value: List) : AcceptedCommandListAttributeSubscriptionState()
+
+ data class Error(val exception: Exception) : AcceptedCommandListAttributeSubscriptionState()
+
+ object SubscriptionEstablished : AcceptedCommandListAttributeSubscriptionState()
+ }
+
+ class EventListAttribute(val value: List)
+
+ sealed class EventListAttributeSubscriptionState {
+ data class Success(val value: List) : EventListAttributeSubscriptionState()
+
+ data class Error(val exception: Exception) : EventListAttributeSubscriptionState()
+
+ object SubscriptionEstablished : EventListAttributeSubscriptionState()
+ }
+
+ class AttributeListAttribute(val value: List)
+
+ sealed class AttributeListAttributeSubscriptionState {
+ data class Success(val value: List) : AttributeListAttributeSubscriptionState()
+
+ data class Error(val exception: Exception) : AttributeListAttributeSubscriptionState()
+
+ object SubscriptionEstablished : AttributeListAttributeSubscriptionState()
+ }
+
+ suspend fun getActiveDatasetRequest(timedInvokeTimeout: Duration? = null): DatasetResponse {
+ val commandId: UInt = 0u
+
+ val tlvWriter = TlvWriter()
+ tlvWriter.startStructure(AnonymousTag)
+ tlvWriter.endStructure()
+
+ val request: InvokeRequest =
+ InvokeRequest(
+ CommandPath(endpointId, clusterId = CLUSTER_ID, commandId),
+ tlvPayload = tlvWriter.getEncoded(),
+ timedRequest = timedInvokeTimeout
+ )
+
+ val response: InvokeResponse = controller.invoke(request)
+ logger.log(Level.FINE, "Invoke command succeeded: ${response}")
+
+ val tlvReader = TlvReader(response.payload)
+ tlvReader.enterStructure(AnonymousTag)
+ val TAG_DATASET: Int = 0
+ var dataset_decoded: ByteArray? = null
+
+ while (!tlvReader.isEndOfContainer()) {
+ val tag = tlvReader.peekElement().tag
+
+ if (tag == ContextSpecificTag(TAG_DATASET)) {
+ dataset_decoded = tlvReader.getByteArray(tag)
+ } else {
+ tlvReader.skipElement()
+ }
+ }
+
+ if (dataset_decoded == null) {
+ throw IllegalStateException("dataset not found in TLV")
+ }
+
+ tlvReader.exitContainer()
+
+ return DatasetResponse(dataset_decoded)
+ }
+
+ suspend fun getPendingDatasetRequest(timedInvokeTimeout: Duration? = null): DatasetResponse {
+ val commandId: UInt = 1u
+
+ val tlvWriter = TlvWriter()
+ tlvWriter.startStructure(AnonymousTag)
+ tlvWriter.endStructure()
+
+ val request: InvokeRequest =
+ InvokeRequest(
+ CommandPath(endpointId, clusterId = CLUSTER_ID, commandId),
+ tlvPayload = tlvWriter.getEncoded(),
+ timedRequest = timedInvokeTimeout
+ )
+
+ val response: InvokeResponse = controller.invoke(request)
+ logger.log(Level.FINE, "Invoke command succeeded: ${response}")
+
+ val tlvReader = TlvReader(response.payload)
+ tlvReader.enterStructure(AnonymousTag)
+ val TAG_DATASET: Int = 0
+ var dataset_decoded: ByteArray? = null
+
+ while (!tlvReader.isEndOfContainer()) {
+ val tag = tlvReader.peekElement().tag
+
+ if (tag == ContextSpecificTag(TAG_DATASET)) {
+ dataset_decoded = tlvReader.getByteArray(tag)
+ } else {
+ tlvReader.skipElement()
+ }
+ }
+
+ if (dataset_decoded == null) {
+ throw IllegalStateException("dataset not found in TLV")
+ }
+
+ tlvReader.exitContainer()
+
+ return DatasetResponse(dataset_decoded)
+ }
+
+ suspend fun setActiveDatasetRequest(
+ activeDataset: ByteArray,
+ breadcrumb: ULong?,
+ timedInvokeTimeout: Duration? = null
+ ) {
+ val commandId: UInt = 4u
+
+ val tlvWriter = TlvWriter()
+ tlvWriter.startStructure(AnonymousTag)
+
+ val TAG_ACTIVE_DATASET_REQ: Int = 0
+ tlvWriter.put(ContextSpecificTag(TAG_ACTIVE_DATASET_REQ), activeDataset)
+
+ val TAG_BREADCRUMB_REQ: Int = 1
+ breadcrumb?.let { tlvWriter.put(ContextSpecificTag(TAG_BREADCRUMB_REQ), breadcrumb) }
+ tlvWriter.endStructure()
+
+ val request: InvokeRequest =
+ InvokeRequest(
+ CommandPath(endpointId, clusterId = CLUSTER_ID, commandId),
+ tlvPayload = tlvWriter.getEncoded(),
+ timedRequest = timedInvokeTimeout
+ )
+
+ val response: InvokeResponse = controller.invoke(request)
+ logger.log(Level.FINE, "Invoke command succeeded: ${response}")
+ }
+
+ suspend fun setPendingDatasetRequest(
+ pendingDataset: ByteArray,
+ timedInvokeTimeout: Duration? = null
+ ) {
+ val commandId: UInt = 5u
+
+ val tlvWriter = TlvWriter()
+ tlvWriter.startStructure(AnonymousTag)
+
+ val TAG_PENDING_DATASET_REQ: Int = 0
+ tlvWriter.put(ContextSpecificTag(TAG_PENDING_DATASET_REQ), pendingDataset)
+ tlvWriter.endStructure()
+
+ val request: InvokeRequest =
+ InvokeRequest(
+ CommandPath(endpointId, clusterId = CLUSTER_ID, commandId),
+ tlvPayload = tlvWriter.getEncoded(),
+ timedRequest = timedInvokeTimeout
+ )
+
+ val response: InvokeResponse = controller.invoke(request)
+ logger.log(Level.FINE, "Invoke command succeeded: ${response}")
+ }
+
+ suspend fun readBorderRouterNameAttribute(): String {
+ val ATTRIBUTE_ID: UInt = 0u
+
+ val attributePath =
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+
+ val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath))
+
+ val response = controller.read(readRequest)
+
+ if (response.successes.isEmpty()) {
+ logger.log(Level.WARNING, "Read command failed")
+ throw IllegalStateException("Read command failed with failures: ${response.failures}")
+ }
+
+ logger.log(Level.FINE, "Read command succeeded")
+
+ val attributeData =
+ response.successes.filterIsInstance().firstOrNull {
+ it.path.attributeId == ATTRIBUTE_ID
+ }
+
+ requireNotNull(attributeData) { "Borderroutername attribute not found in response" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: String = tlvReader.getString(AnonymousTag)
+
+ return decodedValue
+ }
+
+ suspend fun subscribeBorderRouterNameAttribute(
+ minInterval: Int,
+ maxInterval: Int
+ ): Flow {
+ val ATTRIBUTE_ID: UInt = 0u
+ val attributePaths =
+ listOf(
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+ )
+
+ val subscribeRequest: SubscribeRequest =
+ SubscribeRequest(
+ eventPaths = emptyList(),
+ attributePaths = attributePaths,
+ minInterval = Duration.ofSeconds(minInterval.toLong()),
+ maxInterval = Duration.ofSeconds(maxInterval.toLong())
+ )
+
+ return controller.subscribe(subscribeRequest).transform { subscriptionState ->
+ when (subscriptionState) {
+ is SubscriptionState.SubscriptionErrorNotification -> {
+ emit(
+ StringSubscriptionState.Error(
+ Exception(
+ "Subscription terminated with error code: ${subscriptionState.terminationCause}"
+ )
+ )
+ )
+ }
+ is SubscriptionState.NodeStateUpdate -> {
+ val attributeData =
+ subscriptionState.updateState.successes
+ .filterIsInstance()
+ .firstOrNull { it.path.attributeId == ATTRIBUTE_ID }
+
+ requireNotNull(attributeData) {
+ "Borderroutername attribute not found in Node State update"
+ }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: String = tlvReader.getString(AnonymousTag)
+
+ emit(StringSubscriptionState.Success(decodedValue))
+ }
+ SubscriptionState.SubscriptionEstablished -> {
+ emit(StringSubscriptionState.SubscriptionEstablished)
+ }
+ }
+ }
+ }
+
+ suspend fun readBorderAgentIDAttribute(): ByteArray {
+ val ATTRIBUTE_ID: UInt = 1u
+
+ val attributePath =
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+
+ val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath))
+
+ val response = controller.read(readRequest)
+
+ if (response.successes.isEmpty()) {
+ logger.log(Level.WARNING, "Read command failed")
+ throw IllegalStateException("Read command failed with failures: ${response.failures}")
+ }
+
+ logger.log(Level.FINE, "Read command succeeded")
+
+ val attributeData =
+ response.successes.filterIsInstance().firstOrNull {
+ it.path.attributeId == ATTRIBUTE_ID
+ }
+
+ requireNotNull(attributeData) { "Borderagentid attribute not found in response" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: ByteArray = tlvReader.getByteArray(AnonymousTag)
+
+ return decodedValue
+ }
+
+ suspend fun subscribeBorderAgentIDAttribute(
+ minInterval: Int,
+ maxInterval: Int
+ ): Flow {
+ val ATTRIBUTE_ID: UInt = 1u
+ val attributePaths =
+ listOf(
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+ )
+
+ val subscribeRequest: SubscribeRequest =
+ SubscribeRequest(
+ eventPaths = emptyList(),
+ attributePaths = attributePaths,
+ minInterval = Duration.ofSeconds(minInterval.toLong()),
+ maxInterval = Duration.ofSeconds(maxInterval.toLong())
+ )
+
+ return controller.subscribe(subscribeRequest).transform { subscriptionState ->
+ when (subscriptionState) {
+ is SubscriptionState.SubscriptionErrorNotification -> {
+ emit(
+ ByteArraySubscriptionState.Error(
+ Exception(
+ "Subscription terminated with error code: ${subscriptionState.terminationCause}"
+ )
+ )
+ )
+ }
+ is SubscriptionState.NodeStateUpdate -> {
+ val attributeData =
+ subscriptionState.updateState.successes
+ .filterIsInstance()
+ .firstOrNull { it.path.attributeId == ATTRIBUTE_ID }
+
+ requireNotNull(attributeData) { "Borderagentid attribute not found in Node State update" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: ByteArray = tlvReader.getByteArray(AnonymousTag)
+
+ emit(ByteArraySubscriptionState.Success(decodedValue))
+ }
+ SubscriptionState.SubscriptionEstablished -> {
+ emit(ByteArraySubscriptionState.SubscriptionEstablished)
+ }
+ }
+ }
+ }
+
+ suspend fun readThreadVersionAttribute(): UShort {
+ val ATTRIBUTE_ID: UInt = 2u
+
+ val attributePath =
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+
+ val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath))
+
+ val response = controller.read(readRequest)
+
+ if (response.successes.isEmpty()) {
+ logger.log(Level.WARNING, "Read command failed")
+ throw IllegalStateException("Read command failed with failures: ${response.failures}")
+ }
+
+ logger.log(Level.FINE, "Read command succeeded")
+
+ val attributeData =
+ response.successes.filterIsInstance().firstOrNull {
+ it.path.attributeId == ATTRIBUTE_ID
+ }
+
+ requireNotNull(attributeData) { "Threadversion attribute not found in response" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: UShort = tlvReader.getUShort(AnonymousTag)
+
+ return decodedValue
+ }
+
+ suspend fun subscribeThreadVersionAttribute(
+ minInterval: Int,
+ maxInterval: Int
+ ): Flow {
+ val ATTRIBUTE_ID: UInt = 2u
+ val attributePaths =
+ listOf(
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+ )
+
+ val subscribeRequest: SubscribeRequest =
+ SubscribeRequest(
+ eventPaths = emptyList(),
+ attributePaths = attributePaths,
+ minInterval = Duration.ofSeconds(minInterval.toLong()),
+ maxInterval = Duration.ofSeconds(maxInterval.toLong())
+ )
+
+ return controller.subscribe(subscribeRequest).transform { subscriptionState ->
+ when (subscriptionState) {
+ is SubscriptionState.SubscriptionErrorNotification -> {
+ emit(
+ UShortSubscriptionState.Error(
+ Exception(
+ "Subscription terminated with error code: ${subscriptionState.terminationCause}"
+ )
+ )
+ )
+ }
+ is SubscriptionState.NodeStateUpdate -> {
+ val attributeData =
+ subscriptionState.updateState.successes
+ .filterIsInstance()
+ .firstOrNull { it.path.attributeId == ATTRIBUTE_ID }
+
+ requireNotNull(attributeData) { "Threadversion attribute not found in Node State update" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: UShort = tlvReader.getUShort(AnonymousTag)
+
+ emit(UShortSubscriptionState.Success(decodedValue))
+ }
+ SubscriptionState.SubscriptionEstablished -> {
+ emit(UShortSubscriptionState.SubscriptionEstablished)
+ }
+ }
+ }
+ }
+
+ suspend fun readInterfaceEnabledAttribute(): Boolean {
+ val ATTRIBUTE_ID: UInt = 3u
+
+ val attributePath =
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+
+ val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath))
+
+ val response = controller.read(readRequest)
+
+ if (response.successes.isEmpty()) {
+ logger.log(Level.WARNING, "Read command failed")
+ throw IllegalStateException("Read command failed with failures: ${response.failures}")
+ }
+
+ logger.log(Level.FINE, "Read command succeeded")
+
+ val attributeData =
+ response.successes.filterIsInstance().firstOrNull {
+ it.path.attributeId == ATTRIBUTE_ID
+ }
+
+ requireNotNull(attributeData) { "Interfaceenabled attribute not found in response" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: Boolean = tlvReader.getBoolean(AnonymousTag)
+
+ return decodedValue
+ }
+
+ suspend fun subscribeInterfaceEnabledAttribute(
+ minInterval: Int,
+ maxInterval: Int
+ ): Flow {
+ val ATTRIBUTE_ID: UInt = 3u
+ val attributePaths =
+ listOf(
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+ )
+
+ val subscribeRequest: SubscribeRequest =
+ SubscribeRequest(
+ eventPaths = emptyList(),
+ attributePaths = attributePaths,
+ minInterval = Duration.ofSeconds(minInterval.toLong()),
+ maxInterval = Duration.ofSeconds(maxInterval.toLong())
+ )
+
+ return controller.subscribe(subscribeRequest).transform { subscriptionState ->
+ when (subscriptionState) {
+ is SubscriptionState.SubscriptionErrorNotification -> {
+ emit(
+ BooleanSubscriptionState.Error(
+ Exception(
+ "Subscription terminated with error code: ${subscriptionState.terminationCause}"
+ )
+ )
+ )
+ }
+ is SubscriptionState.NodeStateUpdate -> {
+ val attributeData =
+ subscriptionState.updateState.successes
+ .filterIsInstance()
+ .firstOrNull { it.path.attributeId == ATTRIBUTE_ID }
+
+ requireNotNull(attributeData) {
+ "Interfaceenabled attribute not found in Node State update"
+ }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: Boolean = tlvReader.getBoolean(AnonymousTag)
+
+ emit(BooleanSubscriptionState.Success(decodedValue))
+ }
+ SubscriptionState.SubscriptionEstablished -> {
+ emit(BooleanSubscriptionState.SubscriptionEstablished)
+ }
+ }
+ }
+ }
+
+ suspend fun readActiveDatasetTimestampAttribute(): ActiveDatasetTimestampAttribute {
+ val ATTRIBUTE_ID: UInt = 5u
+
+ val attributePath =
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+
+ val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath))
+
+ val response = controller.read(readRequest)
+
+ if (response.successes.isEmpty()) {
+ logger.log(Level.WARNING, "Read command failed")
+ throw IllegalStateException("Read command failed with failures: ${response.failures}")
+ }
+
+ logger.log(Level.FINE, "Read command succeeded")
+
+ val attributeData =
+ response.successes.filterIsInstance().firstOrNull {
+ it.path.attributeId == ATTRIBUTE_ID
+ }
+
+ requireNotNull(attributeData) { "Activedatasettimestamp attribute not found in response" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: ULong? =
+ if (!tlvReader.isNull()) {
+ tlvReader.getULong(AnonymousTag)
+ } else {
+ tlvReader.getNull(AnonymousTag)
+ null
+ }
+
+ return ActiveDatasetTimestampAttribute(decodedValue)
+ }
+
+ suspend fun subscribeActiveDatasetTimestampAttribute(
+ minInterval: Int,
+ maxInterval: Int
+ ): Flow {
+ val ATTRIBUTE_ID: UInt = 5u
+ val attributePaths =
+ listOf(
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+ )
+
+ val subscribeRequest: SubscribeRequest =
+ SubscribeRequest(
+ eventPaths = emptyList(),
+ attributePaths = attributePaths,
+ minInterval = Duration.ofSeconds(minInterval.toLong()),
+ maxInterval = Duration.ofSeconds(maxInterval.toLong())
+ )
+
+ return controller.subscribe(subscribeRequest).transform { subscriptionState ->
+ when (subscriptionState) {
+ is SubscriptionState.SubscriptionErrorNotification -> {
+ emit(
+ ActiveDatasetTimestampAttributeSubscriptionState.Error(
+ Exception(
+ "Subscription terminated with error code: ${subscriptionState.terminationCause}"
+ )
+ )
+ )
+ }
+ is SubscriptionState.NodeStateUpdate -> {
+ val attributeData =
+ subscriptionState.updateState.successes
+ .filterIsInstance()
+ .firstOrNull { it.path.attributeId == ATTRIBUTE_ID }
+
+ requireNotNull(attributeData) {
+ "Activedatasettimestamp attribute not found in Node State update"
+ }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: ULong? =
+ if (!tlvReader.isNull()) {
+ tlvReader.getULong(AnonymousTag)
+ } else {
+ tlvReader.getNull(AnonymousTag)
+ null
+ }
+
+ decodedValue?.let { emit(ActiveDatasetTimestampAttributeSubscriptionState.Success(it)) }
+ }
+ SubscriptionState.SubscriptionEstablished -> {
+ emit(ActiveDatasetTimestampAttributeSubscriptionState.SubscriptionEstablished)
+ }
+ }
+ }
+ }
+
+ suspend fun readGeneratedCommandListAttribute(): GeneratedCommandListAttribute {
+ val ATTRIBUTE_ID: UInt = 65528u
+
+ val attributePath =
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+
+ val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath))
+
+ val response = controller.read(readRequest)
+
+ if (response.successes.isEmpty()) {
+ logger.log(Level.WARNING, "Read command failed")
+ throw IllegalStateException("Read command failed with failures: ${response.failures}")
+ }
+
+ logger.log(Level.FINE, "Read command succeeded")
+
+ val attributeData =
+ response.successes.filterIsInstance().firstOrNull {
+ it.path.attributeId == ATTRIBUTE_ID
+ }
+
+ requireNotNull(attributeData) { "Generatedcommandlist attribute not found in response" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: List =
+ buildList {
+ tlvReader.enterArray(AnonymousTag)
+ while (!tlvReader.isEndOfContainer()) {
+ add(tlvReader.getUInt(AnonymousTag))
+ }
+ tlvReader.exitContainer()
+ }
+
+ return GeneratedCommandListAttribute(decodedValue)
+ }
+
+ suspend fun subscribeGeneratedCommandListAttribute(
+ minInterval: Int,
+ maxInterval: Int
+ ): Flow {
+ val ATTRIBUTE_ID: UInt = 65528u
+ val attributePaths =
+ listOf(
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+ )
+
+ val subscribeRequest: SubscribeRequest =
+ SubscribeRequest(
+ eventPaths = emptyList(),
+ attributePaths = attributePaths,
+ minInterval = Duration.ofSeconds(minInterval.toLong()),
+ maxInterval = Duration.ofSeconds(maxInterval.toLong())
+ )
+
+ return controller.subscribe(subscribeRequest).transform { subscriptionState ->
+ when (subscriptionState) {
+ is SubscriptionState.SubscriptionErrorNotification -> {
+ emit(
+ GeneratedCommandListAttributeSubscriptionState.Error(
+ Exception(
+ "Subscription terminated with error code: ${subscriptionState.terminationCause}"
+ )
+ )
+ )
+ }
+ is SubscriptionState.NodeStateUpdate -> {
+ val attributeData =
+ subscriptionState.updateState.successes
+ .filterIsInstance()
+ .firstOrNull { it.path.attributeId == ATTRIBUTE_ID }
+
+ requireNotNull(attributeData) {
+ "Generatedcommandlist attribute not found in Node State update"
+ }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: List =
+ buildList {
+ tlvReader.enterArray(AnonymousTag)
+ while (!tlvReader.isEndOfContainer()) {
+ add(tlvReader.getUInt(AnonymousTag))
+ }
+ tlvReader.exitContainer()
+ }
+
+ emit(GeneratedCommandListAttributeSubscriptionState.Success(decodedValue))
+ }
+ SubscriptionState.SubscriptionEstablished -> {
+ emit(GeneratedCommandListAttributeSubscriptionState.SubscriptionEstablished)
+ }
+ }
+ }
+ }
+
+ suspend fun readAcceptedCommandListAttribute(): AcceptedCommandListAttribute {
+ val ATTRIBUTE_ID: UInt = 65529u
+
+ val attributePath =
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+
+ val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath))
+
+ val response = controller.read(readRequest)
+
+ if (response.successes.isEmpty()) {
+ logger.log(Level.WARNING, "Read command failed")
+ throw IllegalStateException("Read command failed with failures: ${response.failures}")
+ }
+
+ logger.log(Level.FINE, "Read command succeeded")
+
+ val attributeData =
+ response.successes.filterIsInstance().firstOrNull {
+ it.path.attributeId == ATTRIBUTE_ID
+ }
+
+ requireNotNull(attributeData) { "Acceptedcommandlist attribute not found in response" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: List =
+ buildList {
+ tlvReader.enterArray(AnonymousTag)
+ while (!tlvReader.isEndOfContainer()) {
+ add(tlvReader.getUInt(AnonymousTag))
+ }
+ tlvReader.exitContainer()
+ }
+
+ return AcceptedCommandListAttribute(decodedValue)
+ }
+
+ suspend fun subscribeAcceptedCommandListAttribute(
+ minInterval: Int,
+ maxInterval: Int
+ ): Flow {
+ val ATTRIBUTE_ID: UInt = 65529u
+ val attributePaths =
+ listOf(
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+ )
+
+ val subscribeRequest: SubscribeRequest =
+ SubscribeRequest(
+ eventPaths = emptyList(),
+ attributePaths = attributePaths,
+ minInterval = Duration.ofSeconds(minInterval.toLong()),
+ maxInterval = Duration.ofSeconds(maxInterval.toLong())
+ )
+
+ return controller.subscribe(subscribeRequest).transform { subscriptionState ->
+ when (subscriptionState) {
+ is SubscriptionState.SubscriptionErrorNotification -> {
+ emit(
+ AcceptedCommandListAttributeSubscriptionState.Error(
+ Exception(
+ "Subscription terminated with error code: ${subscriptionState.terminationCause}"
+ )
+ )
+ )
+ }
+ is SubscriptionState.NodeStateUpdate -> {
+ val attributeData =
+ subscriptionState.updateState.successes
+ .filterIsInstance()
+ .firstOrNull { it.path.attributeId == ATTRIBUTE_ID }
+
+ requireNotNull(attributeData) {
+ "Acceptedcommandlist attribute not found in Node State update"
+ }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: List =
+ buildList {
+ tlvReader.enterArray(AnonymousTag)
+ while (!tlvReader.isEndOfContainer()) {
+ add(tlvReader.getUInt(AnonymousTag))
+ }
+ tlvReader.exitContainer()
+ }
+
+ emit(AcceptedCommandListAttributeSubscriptionState.Success(decodedValue))
+ }
+ SubscriptionState.SubscriptionEstablished -> {
+ emit(AcceptedCommandListAttributeSubscriptionState.SubscriptionEstablished)
+ }
+ }
+ }
+ }
+
+ suspend fun readEventListAttribute(): EventListAttribute {
+ val ATTRIBUTE_ID: UInt = 65530u
+
+ val attributePath =
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+
+ val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath))
+
+ val response = controller.read(readRequest)
+
+ if (response.successes.isEmpty()) {
+ logger.log(Level.WARNING, "Read command failed")
+ throw IllegalStateException("Read command failed with failures: ${response.failures}")
+ }
+
+ logger.log(Level.FINE, "Read command succeeded")
+
+ val attributeData =
+ response.successes.filterIsInstance().firstOrNull {
+ it.path.attributeId == ATTRIBUTE_ID
+ }
+
+ requireNotNull(attributeData) { "Eventlist attribute not found in response" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: List =
+ buildList {
+ tlvReader.enterArray(AnonymousTag)
+ while (!tlvReader.isEndOfContainer()) {
+ add(tlvReader.getUInt(AnonymousTag))
+ }
+ tlvReader.exitContainer()
+ }
+
+ return EventListAttribute(decodedValue)
+ }
+
+ suspend fun subscribeEventListAttribute(
+ minInterval: Int,
+ maxInterval: Int
+ ): Flow {
+ val ATTRIBUTE_ID: UInt = 65530u
+ val attributePaths =
+ listOf(
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+ )
+
+ val subscribeRequest: SubscribeRequest =
+ SubscribeRequest(
+ eventPaths = emptyList(),
+ attributePaths = attributePaths,
+ minInterval = Duration.ofSeconds(minInterval.toLong()),
+ maxInterval = Duration.ofSeconds(maxInterval.toLong())
+ )
+
+ return controller.subscribe(subscribeRequest).transform { subscriptionState ->
+ when (subscriptionState) {
+ is SubscriptionState.SubscriptionErrorNotification -> {
+ emit(
+ EventListAttributeSubscriptionState.Error(
+ Exception(
+ "Subscription terminated with error code: ${subscriptionState.terminationCause}"
+ )
+ )
+ )
+ }
+ is SubscriptionState.NodeStateUpdate -> {
+ val attributeData =
+ subscriptionState.updateState.successes
+ .filterIsInstance()
+ .firstOrNull { it.path.attributeId == ATTRIBUTE_ID }
+
+ requireNotNull(attributeData) { "Eventlist attribute not found in Node State update" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: List =
+ buildList {
+ tlvReader.enterArray(AnonymousTag)
+ while (!tlvReader.isEndOfContainer()) {
+ add(tlvReader.getUInt(AnonymousTag))
+ }
+ tlvReader.exitContainer()
+ }
+
+ emit(EventListAttributeSubscriptionState.Success(decodedValue))
+ }
+ SubscriptionState.SubscriptionEstablished -> {
+ emit(EventListAttributeSubscriptionState.SubscriptionEstablished)
+ }
+ }
+ }
+ }
+
+ suspend fun readAttributeListAttribute(): AttributeListAttribute {
+ val ATTRIBUTE_ID: UInt = 65531u
+
+ val attributePath =
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+
+ val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath))
+
+ val response = controller.read(readRequest)
+
+ if (response.successes.isEmpty()) {
+ logger.log(Level.WARNING, "Read command failed")
+ throw IllegalStateException("Read command failed with failures: ${response.failures}")
+ }
+
+ logger.log(Level.FINE, "Read command succeeded")
+
+ val attributeData =
+ response.successes.filterIsInstance().firstOrNull {
+ it.path.attributeId == ATTRIBUTE_ID
+ }
+
+ requireNotNull(attributeData) { "Attributelist attribute not found in response" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: List =
+ buildList {
+ tlvReader.enterArray(AnonymousTag)
+ while (!tlvReader.isEndOfContainer()) {
+ add(tlvReader.getUInt(AnonymousTag))
+ }
+ tlvReader.exitContainer()
+ }
+
+ return AttributeListAttribute(decodedValue)
+ }
+
+ suspend fun subscribeAttributeListAttribute(
+ minInterval: Int,
+ maxInterval: Int
+ ): Flow {
+ val ATTRIBUTE_ID: UInt = 65531u
+ val attributePaths =
+ listOf(
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+ )
+
+ val subscribeRequest: SubscribeRequest =
+ SubscribeRequest(
+ eventPaths = emptyList(),
+ attributePaths = attributePaths,
+ minInterval = Duration.ofSeconds(minInterval.toLong()),
+ maxInterval = Duration.ofSeconds(maxInterval.toLong())
+ )
+
+ return controller.subscribe(subscribeRequest).transform { subscriptionState ->
+ when (subscriptionState) {
+ is SubscriptionState.SubscriptionErrorNotification -> {
+ emit(
+ AttributeListAttributeSubscriptionState.Error(
+ Exception(
+ "Subscription terminated with error code: ${subscriptionState.terminationCause}"
+ )
+ )
+ )
+ }
+ is SubscriptionState.NodeStateUpdate -> {
+ val attributeData =
+ subscriptionState.updateState.successes
+ .filterIsInstance()
+ .firstOrNull { it.path.attributeId == ATTRIBUTE_ID }
+
+ requireNotNull(attributeData) { "Attributelist attribute not found in Node State update" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: List =
+ buildList {
+ tlvReader.enterArray(AnonymousTag)
+ while (!tlvReader.isEndOfContainer()) {
+ add(tlvReader.getUInt(AnonymousTag))
+ }
+ tlvReader.exitContainer()
+ }
+
+ emit(AttributeListAttributeSubscriptionState.Success(decodedValue))
+ }
+ SubscriptionState.SubscriptionEstablished -> {
+ emit(AttributeListAttributeSubscriptionState.SubscriptionEstablished)
+ }
+ }
+ }
+ }
+
+ suspend fun readFeatureMapAttribute(): UInt {
+ val ATTRIBUTE_ID: UInt = 65532u
+
+ val attributePath =
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+
+ val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath))
+
+ val response = controller.read(readRequest)
+
+ if (response.successes.isEmpty()) {
+ logger.log(Level.WARNING, "Read command failed")
+ throw IllegalStateException("Read command failed with failures: ${response.failures}")
+ }
+
+ logger.log(Level.FINE, "Read command succeeded")
+
+ val attributeData =
+ response.successes.filterIsInstance().firstOrNull {
+ it.path.attributeId == ATTRIBUTE_ID
+ }
+
+ requireNotNull(attributeData) { "Featuremap attribute not found in response" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: UInt = tlvReader.getUInt(AnonymousTag)
+
+ return decodedValue
+ }
+
+ suspend fun subscribeFeatureMapAttribute(
+ minInterval: Int,
+ maxInterval: Int
+ ): Flow {
+ val ATTRIBUTE_ID: UInt = 65532u
+ val attributePaths =
+ listOf(
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+ )
+
+ val subscribeRequest: SubscribeRequest =
+ SubscribeRequest(
+ eventPaths = emptyList(),
+ attributePaths = attributePaths,
+ minInterval = Duration.ofSeconds(minInterval.toLong()),
+ maxInterval = Duration.ofSeconds(maxInterval.toLong())
+ )
+
+ return controller.subscribe(subscribeRequest).transform { subscriptionState ->
+ when (subscriptionState) {
+ is SubscriptionState.SubscriptionErrorNotification -> {
+ emit(
+ UIntSubscriptionState.Error(
+ Exception(
+ "Subscription terminated with error code: ${subscriptionState.terminationCause}"
+ )
+ )
+ )
+ }
+ is SubscriptionState.NodeStateUpdate -> {
+ val attributeData =
+ subscriptionState.updateState.successes
+ .filterIsInstance()
+ .firstOrNull { it.path.attributeId == ATTRIBUTE_ID }
+
+ requireNotNull(attributeData) { "Featuremap attribute not found in Node State update" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: UInt = tlvReader.getUInt(AnonymousTag)
+
+ emit(UIntSubscriptionState.Success(decodedValue))
+ }
+ SubscriptionState.SubscriptionEstablished -> {
+ emit(UIntSubscriptionState.SubscriptionEstablished)
+ }
+ }
+ }
+ }
+
+ suspend fun readClusterRevisionAttribute(): UShort {
+ val ATTRIBUTE_ID: UInt = 65533u
+
+ val attributePath =
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+
+ val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath))
+
+ val response = controller.read(readRequest)
+
+ if (response.successes.isEmpty()) {
+ logger.log(Level.WARNING, "Read command failed")
+ throw IllegalStateException("Read command failed with failures: ${response.failures}")
+ }
+
+ logger.log(Level.FINE, "Read command succeeded")
+
+ val attributeData =
+ response.successes.filterIsInstance().firstOrNull {
+ it.path.attributeId == ATTRIBUTE_ID
+ }
+
+ requireNotNull(attributeData) { "Clusterrevision attribute not found in response" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: UShort = tlvReader.getUShort(AnonymousTag)
+
+ return decodedValue
+ }
+
+ suspend fun subscribeClusterRevisionAttribute(
+ minInterval: Int,
+ maxInterval: Int
+ ): Flow {
+ val ATTRIBUTE_ID: UInt = 65533u
+ val attributePaths =
+ listOf(
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+ )
+
+ val subscribeRequest: SubscribeRequest =
+ SubscribeRequest(
+ eventPaths = emptyList(),
+ attributePaths = attributePaths,
+ minInterval = Duration.ofSeconds(minInterval.toLong()),
+ maxInterval = Duration.ofSeconds(maxInterval.toLong())
+ )
+
+ return controller.subscribe(subscribeRequest).transform { subscriptionState ->
+ when (subscriptionState) {
+ is SubscriptionState.SubscriptionErrorNotification -> {
+ emit(
+ UShortSubscriptionState.Error(
+ Exception(
+ "Subscription terminated with error code: ${subscriptionState.terminationCause}"
+ )
+ )
+ )
+ }
+ is SubscriptionState.NodeStateUpdate -> {
+ val attributeData =
+ subscriptionState.updateState.successes
+ .filterIsInstance()
+ .firstOrNull { it.path.attributeId == ATTRIBUTE_ID }
+
+ requireNotNull(attributeData) {
+ "Clusterrevision attribute not found in Node State update"
+ }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: UShort = tlvReader.getUShort(AnonymousTag)
+
+ emit(UShortSubscriptionState.Success(decodedValue))
+ }
+ SubscriptionState.SubscriptionEstablished -> {
+ emit(UShortSubscriptionState.SubscriptionEstablished)
+ }
+ }
+ }
+ }
+
+ companion object {
+ private val logger = Logger.getLogger(ThreadBorderRouterManagementCluster::class.java.name)
+ const val CLUSTER_ID: UInt = 1106u
+ }
+}
diff --git a/src/controller/java/generated/java/matter/controller/cluster/files.gni b/src/controller/java/generated/java/matter/controller/cluster/files.gni
index f7670310f95cfd..6190897a954dac 100644
--- a/src/controller/java/generated/java/matter/controller/cluster/files.gni
+++ b/src/controller/java/generated/java/matter/controller/cluster/files.gni
@@ -332,6 +332,7 @@ matter_clusters_sources = [
"${chip_root}/src/controller/java/generated/java/matter/controller/cluster/clusters/TemperatureMeasurementCluster.kt",
"${chip_root}/src/controller/java/generated/java/matter/controller/cluster/clusters/ThermostatCluster.kt",
"${chip_root}/src/controller/java/generated/java/matter/controller/cluster/clusters/ThermostatUserInterfaceConfigurationCluster.kt",
+ "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/clusters/ThreadBorderRouterManagementCluster.kt",
"${chip_root}/src/controller/java/generated/java/matter/controller/cluster/clusters/ThreadNetworkDiagnosticsCluster.kt",
"${chip_root}/src/controller/java/generated/java/matter/controller/cluster/clusters/ThreadNetworkDirectoryCluster.kt",
"${chip_root}/src/controller/java/generated/java/matter/controller/cluster/clusters/TimeFormatLocalizationCluster.kt",
diff --git a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp
index 3b58043e65ee78..894be245953751 100644
--- a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp
+++ b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp
@@ -37320,6 +37320,230 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR
}
break;
}
+ case app::Clusters::ThreadBorderRouterManagement::Id: {
+ using namespace app::Clusters::ThreadBorderRouterManagement;
+ switch (aPath.mAttributeId)
+ {
+ case Attributes::BorderRouterName::Id: {
+ using TypeInfo = Attributes::BorderRouterName::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = app::DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR)
+ {
+ return nullptr;
+ }
+ jobject value;
+ LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue, value));
+ return value;
+ }
+ case Attributes::BorderAgentID::Id: {
+ using TypeInfo = Attributes::BorderAgentID::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = app::DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR)
+ {
+ return nullptr;
+ }
+ jobject value;
+ jbyteArray valueByteArray = env->NewByteArray(static_cast(cppValue.size()));
+ env->SetByteArrayRegion(valueByteArray, 0, static_cast(cppValue.size()),
+ reinterpret_cast(cppValue.data()));
+ value = valueByteArray;
+ return value;
+ }
+ case Attributes::ThreadVersion::Id: {
+ using TypeInfo = Attributes::ThreadVersion::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = app::DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR)
+ {
+ return nullptr;
+ }
+ jobject value;
+ std::string valueClassName = "java/lang/Integer";
+ std::string valueCtorSignature = "(I)V";
+ jint jnivalue = static_cast(cppValue);
+ chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue,
+ value);
+ return value;
+ }
+ case Attributes::InterfaceEnabled::Id: {
+ using TypeInfo = Attributes::InterfaceEnabled::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = app::DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR)
+ {
+ return nullptr;
+ }
+ jobject value;
+ std::string valueClassName = "java/lang/Boolean";
+ std::string valueCtorSignature = "(Z)V";
+ jboolean jnivalue = static_cast(cppValue);
+ chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(),
+ jnivalue, value);
+ return value;
+ }
+ case Attributes::ActiveDatasetTimestamp::Id: {
+ using TypeInfo = Attributes::ActiveDatasetTimestamp::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = app::DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR)
+ {
+ return nullptr;
+ }
+ jobject value;
+ if (cppValue.IsNull())
+ {
+ value = nullptr;
+ }
+ else
+ {
+ std::string valueClassName = "java/lang/Long";
+ std::string valueCtorSignature = "(J)V";
+ jlong jnivalue = static_cast(cppValue.Value());
+ chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(),
+ jnivalue, value);
+ }
+ return value;
+ }
+ case Attributes::GeneratedCommandList::Id: {
+ using TypeInfo = Attributes::GeneratedCommandList::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = app::DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR)
+ {
+ return nullptr;
+ }
+ jobject value;
+ chip::JniReferences::GetInstance().CreateArrayList(value);
+
+ auto iter_value_0 = cppValue.begin();
+ while (iter_value_0.Next())
+ {
+ auto & entry_0 = iter_value_0.GetValue();
+ jobject newElement_0;
+ std::string newElement_0ClassName = "java/lang/Long";
+ std::string newElement_0CtorSignature = "(J)V";
+ jlong jninewElement_0 = static_cast(entry_0);
+ chip::JniReferences::GetInstance().CreateBoxedObject(
+ newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0);
+ chip::JniReferences::GetInstance().AddToList(value, newElement_0);
+ }
+ return value;
+ }
+ case Attributes::AcceptedCommandList::Id: {
+ using TypeInfo = Attributes::AcceptedCommandList::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = app::DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR)
+ {
+ return nullptr;
+ }
+ jobject value;
+ chip::JniReferences::GetInstance().CreateArrayList(value);
+
+ auto iter_value_0 = cppValue.begin();
+ while (iter_value_0.Next())
+ {
+ auto & entry_0 = iter_value_0.GetValue();
+ jobject newElement_0;
+ std::string newElement_0ClassName = "java/lang/Long";
+ std::string newElement_0CtorSignature = "(J)V";
+ jlong jninewElement_0 = static_cast(entry_0);
+ chip::JniReferences::GetInstance().CreateBoxedObject(
+ newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0);
+ chip::JniReferences::GetInstance().AddToList(value, newElement_0);
+ }
+ return value;
+ }
+ case Attributes::EventList::Id: {
+ using TypeInfo = Attributes::EventList::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = app::DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR)
+ {
+ return nullptr;
+ }
+ jobject value;
+ chip::JniReferences::GetInstance().CreateArrayList(value);
+
+ auto iter_value_0 = cppValue.begin();
+ while (iter_value_0.Next())
+ {
+ auto & entry_0 = iter_value_0.GetValue();
+ jobject newElement_0;
+ std::string newElement_0ClassName = "java/lang/Long";
+ std::string newElement_0CtorSignature = "(J)V";
+ jlong jninewElement_0 = static_cast(entry_0);
+ chip::JniReferences::GetInstance().CreateBoxedObject(
+ newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0);
+ chip::JniReferences::GetInstance().AddToList(value, newElement_0);
+ }
+ return value;
+ }
+ case Attributes::AttributeList::Id: {
+ using TypeInfo = Attributes::AttributeList::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = app::DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR)
+ {
+ return nullptr;
+ }
+ jobject value;
+ chip::JniReferences::GetInstance().CreateArrayList(value);
+
+ auto iter_value_0 = cppValue.begin();
+ while (iter_value_0.Next())
+ {
+ auto & entry_0 = iter_value_0.GetValue();
+ jobject newElement_0;
+ std::string newElement_0ClassName = "java/lang/Long";
+ std::string newElement_0CtorSignature = "(J)V";
+ jlong jninewElement_0 = static_cast(entry_0);
+ chip::JniReferences::GetInstance().CreateBoxedObject(
+ newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0);
+ chip::JniReferences::GetInstance().AddToList(value, newElement_0);
+ }
+ return value;
+ }
+ case Attributes::FeatureMap::Id: {
+ using TypeInfo = Attributes::FeatureMap::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = app::DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR)
+ {
+ return nullptr;
+ }
+ jobject value;
+ std::string valueClassName = "java/lang/Long";
+ std::string valueCtorSignature = "(J)V";
+ jlong jnivalue = static_cast(cppValue);
+ chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(),
+ jnivalue, value);
+ return value;
+ }
+ case Attributes::ClusterRevision::Id: {
+ using TypeInfo = Attributes::ClusterRevision::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = app::DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR)
+ {
+ return nullptr;
+ }
+ jobject value;
+ std::string valueClassName = "java/lang/Integer";
+ std::string valueCtorSignature = "(I)V";
+ jint jnivalue = static_cast(cppValue);
+ chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue,
+ value);
+ return value;
+ }
+ default:
+ *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB;
+ break;
+ }
+ break;
+ }
case app::Clusters::ThreadNetworkDirectory::Id: {
using namespace app::Clusters::ThreadNetworkDirectory;
switch (aPath.mAttributeId)
diff --git a/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp b/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp
index ac55ed9125654e..0df7c762b20da8 100644
--- a/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp
+++ b/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp
@@ -7399,6 +7399,16 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader &
}
break;
}
+ case app::Clusters::ThreadBorderRouterManagement::Id: {
+ using namespace app::Clusters::ThreadBorderRouterManagement;
+ switch (aPath.mEventId)
+ {
+ default:
+ *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB;
+ break;
+ }
+ break;
+ }
case app::Clusters::ThreadNetworkDirectory::Id: {
using namespace app::Clusters::ThreadNetworkDirectory;
switch (aPath.mEventId)
diff --git a/src/controller/python/chip/clusters/CHIPClusters.py b/src/controller/python/chip/clusters/CHIPClusters.py
index 24b35747203355..33a1dd9b0cd55b 100644
--- a/src/controller/python/chip/clusters/CHIPClusters.py
+++ b/src/controller/python/chip/clusters/CHIPClusters.py
@@ -11591,6 +11591,107 @@ class ChipClusters:
},
},
}
+ _THREAD_BORDER_ROUTER_MANAGEMENT_CLUSTER_INFO = {
+ "clusterName": "ThreadBorderRouterManagement",
+ "clusterId": 0x00000452,
+ "commands": {
+ 0x00000000: {
+ "commandId": 0x00000000,
+ "commandName": "GetActiveDatasetRequest",
+ "args": {
+ },
+ },
+ 0x00000001: {
+ "commandId": 0x00000001,
+ "commandName": "GetPendingDatasetRequest",
+ "args": {
+ },
+ },
+ 0x00000004: {
+ "commandId": 0x00000004,
+ "commandName": "SetActiveDatasetRequest",
+ "args": {
+ "activeDataset": "bytes",
+ "breadcrumb": "int",
+ },
+ },
+ 0x00000005: {
+ "commandId": 0x00000005,
+ "commandName": "SetPendingDatasetRequest",
+ "args": {
+ "pendingDataset": "bytes",
+ },
+ },
+ },
+ "attributes": {
+ 0x00000000: {
+ "attributeName": "BorderRouterName",
+ "attributeId": 0x00000000,
+ "type": "str",
+ "reportable": True,
+ },
+ 0x00000001: {
+ "attributeName": "BorderAgentID",
+ "attributeId": 0x00000001,
+ "type": "bytes",
+ "reportable": True,
+ },
+ 0x00000002: {
+ "attributeName": "ThreadVersion",
+ "attributeId": 0x00000002,
+ "type": "int",
+ "reportable": True,
+ },
+ 0x00000003: {
+ "attributeName": "InterfaceEnabled",
+ "attributeId": 0x00000003,
+ "type": "bool",
+ "reportable": True,
+ },
+ 0x00000005: {
+ "attributeName": "ActiveDatasetTimestamp",
+ "attributeId": 0x00000005,
+ "type": "int",
+ "reportable": True,
+ },
+ 0x0000FFF8: {
+ "attributeName": "GeneratedCommandList",
+ "attributeId": 0x0000FFF8,
+ "type": "int",
+ "reportable": True,
+ },
+ 0x0000FFF9: {
+ "attributeName": "AcceptedCommandList",
+ "attributeId": 0x0000FFF9,
+ "type": "int",
+ "reportable": True,
+ },
+ 0x0000FFFA: {
+ "attributeName": "EventList",
+ "attributeId": 0x0000FFFA,
+ "type": "int",
+ "reportable": True,
+ },
+ 0x0000FFFB: {
+ "attributeName": "AttributeList",
+ "attributeId": 0x0000FFFB,
+ "type": "int",
+ "reportable": True,
+ },
+ 0x0000FFFC: {
+ "attributeName": "FeatureMap",
+ "attributeId": 0x0000FFFC,
+ "type": "int",
+ "reportable": True,
+ },
+ 0x0000FFFD: {
+ "attributeName": "ClusterRevision",
+ "attributeId": 0x0000FFFD,
+ "type": "int",
+ "reportable": True,
+ },
+ },
+ }
_THREAD_NETWORK_DIRECTORY_CLUSTER_INFO = {
"clusterName": "ThreadNetworkDirectory",
"clusterId": 0x00000453,
@@ -14779,6 +14880,7 @@ class ChipClusters:
0x0000042E: _TOTAL_VOLATILE_ORGANIC_COMPOUNDS_CONCENTRATION_MEASUREMENT_CLUSTER_INFO,
0x0000042F: _RADON_CONCENTRATION_MEASUREMENT_CLUSTER_INFO,
0x00000451: _WI_FI_NETWORK_MANAGEMENT_CLUSTER_INFO,
+ 0x00000452: _THREAD_BORDER_ROUTER_MANAGEMENT_CLUSTER_INFO,
0x00000453: _THREAD_NETWORK_DIRECTORY_CLUSTER_INFO,
0x00000503: _WAKE_ON_LAN_CLUSTER_INFO,
0x00000504: _CHANNEL_CLUSTER_INFO,
@@ -14902,6 +15004,7 @@ class ChipClusters:
"TotalVolatileOrganicCompoundsConcentrationMeasurement": _TOTAL_VOLATILE_ORGANIC_COMPOUNDS_CONCENTRATION_MEASUREMENT_CLUSTER_INFO,
"RadonConcentrationMeasurement": _RADON_CONCENTRATION_MEASUREMENT_CLUSTER_INFO,
"WiFiNetworkManagement": _WI_FI_NETWORK_MANAGEMENT_CLUSTER_INFO,
+ "ThreadBorderRouterManagement": _THREAD_BORDER_ROUTER_MANAGEMENT_CLUSTER_INFO,
"ThreadNetworkDirectory": _THREAD_NETWORK_DIRECTORY_CLUSTER_INFO,
"WakeOnLan": _WAKE_ON_LAN_CLUSTER_INFO,
"Channel": _CHANNEL_CLUSTER_INFO,
diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py
index 527bc943019cbb..b3239f3aa05a4b 100644
--- a/src/controller/python/chip/clusters/Objects.py
+++ b/src/controller/python/chip/clusters/Objects.py
@@ -40399,6 +40399,298 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor:
value: 'uint' = 0
+@dataclass
+class ThreadBorderRouterManagement(Cluster):
+ id: typing.ClassVar[int] = 0x00000452
+
+ @ChipUtility.classproperty
+ def descriptor(cls) -> ClusterObjectDescriptor:
+ return ClusterObjectDescriptor(
+ Fields=[
+ ClusterObjectFieldDescriptor(Label="borderRouterName", Tag=0x00000000, Type=str),
+ ClusterObjectFieldDescriptor(Label="borderAgentID", Tag=0x00000001, Type=bytes),
+ ClusterObjectFieldDescriptor(Label="threadVersion", Tag=0x00000002, Type=uint),
+ ClusterObjectFieldDescriptor(Label="interfaceEnabled", Tag=0x00000003, Type=bool),
+ ClusterObjectFieldDescriptor(Label="activeDatasetTimestamp", Tag=0x00000005, Type=typing.Union[Nullable, uint]),
+ ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]),
+ ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]),
+ ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]),
+ ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]),
+ ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint),
+ ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint),
+ ])
+
+ borderRouterName: 'str' = None
+ borderAgentID: 'bytes' = None
+ threadVersion: 'uint' = None
+ interfaceEnabled: 'bool' = None
+ activeDatasetTimestamp: 'typing.Union[Nullable, uint]' = None
+ generatedCommandList: 'typing.List[uint]' = None
+ acceptedCommandList: 'typing.List[uint]' = None
+ eventList: 'typing.List[uint]' = None
+ attributeList: 'typing.List[uint]' = None
+ featureMap: 'uint' = None
+ clusterRevision: 'uint' = None
+
+ class Bitmaps:
+ class Feature(IntFlag):
+ kPANChange = 0x1
+
+ class Commands:
+ @dataclass
+ class GetActiveDatasetRequest(ClusterCommand):
+ cluster_id: typing.ClassVar[int] = 0x00000452
+ command_id: typing.ClassVar[int] = 0x00000000
+ is_client: typing.ClassVar[bool] = True
+ response_type: typing.ClassVar[str] = 'DatasetResponse'
+
+ @ChipUtility.classproperty
+ def descriptor(cls) -> ClusterObjectDescriptor:
+ return ClusterObjectDescriptor(
+ Fields=[
+ ])
+
+ @dataclass
+ class GetPendingDatasetRequest(ClusterCommand):
+ cluster_id: typing.ClassVar[int] = 0x00000452
+ command_id: typing.ClassVar[int] = 0x00000001
+ is_client: typing.ClassVar[bool] = True
+ response_type: typing.ClassVar[str] = 'DatasetResponse'
+
+ @ChipUtility.classproperty
+ def descriptor(cls) -> ClusterObjectDescriptor:
+ return ClusterObjectDescriptor(
+ Fields=[
+ ])
+
+ @dataclass
+ class DatasetResponse(ClusterCommand):
+ cluster_id: typing.ClassVar[int] = 0x00000452
+ command_id: typing.ClassVar[int] = 0x00000003
+ is_client: typing.ClassVar[bool] = False
+ response_type: typing.ClassVar[str] = None
+
+ @ChipUtility.classproperty
+ def descriptor(cls) -> ClusterObjectDescriptor:
+ return ClusterObjectDescriptor(
+ Fields=[
+ ClusterObjectFieldDescriptor(Label="dataset", Tag=0, Type=bytes),
+ ])
+
+ dataset: 'bytes' = b""
+
+ @dataclass
+ class SetActiveDatasetRequest(ClusterCommand):
+ cluster_id: typing.ClassVar[int] = 0x00000452
+ command_id: typing.ClassVar[int] = 0x00000004
+ is_client: typing.ClassVar[bool] = True
+ response_type: typing.ClassVar[str] = None
+
+ @ChipUtility.classproperty
+ def descriptor(cls) -> ClusterObjectDescriptor:
+ return ClusterObjectDescriptor(
+ Fields=[
+ ClusterObjectFieldDescriptor(Label="activeDataset", Tag=0, Type=bytes),
+ ClusterObjectFieldDescriptor(Label="breadcrumb", Tag=1, Type=typing.Optional[uint]),
+ ])
+
+ activeDataset: 'bytes' = b""
+ breadcrumb: 'typing.Optional[uint]' = None
+
+ @dataclass
+ class SetPendingDatasetRequest(ClusterCommand):
+ cluster_id: typing.ClassVar[int] = 0x00000452
+ command_id: typing.ClassVar[int] = 0x00000005
+ is_client: typing.ClassVar[bool] = True
+ response_type: typing.ClassVar[str] = None
+
+ @ChipUtility.classproperty
+ def descriptor(cls) -> ClusterObjectDescriptor:
+ return ClusterObjectDescriptor(
+ Fields=[
+ ClusterObjectFieldDescriptor(Label="pendingDataset", Tag=0, Type=bytes),
+ ])
+
+ pendingDataset: 'bytes' = b""
+
+ class Attributes:
+ @dataclass
+ class BorderRouterName(ClusterAttributeDescriptor):
+ @ChipUtility.classproperty
+ def cluster_id(cls) -> int:
+ return 0x00000452
+
+ @ChipUtility.classproperty
+ def attribute_id(cls) -> int:
+ return 0x00000000
+
+ @ChipUtility.classproperty
+ def attribute_type(cls) -> ClusterObjectFieldDescriptor:
+ return ClusterObjectFieldDescriptor(Type=str)
+
+ value: 'str' = ""
+
+ @dataclass
+ class BorderAgentID(ClusterAttributeDescriptor):
+ @ChipUtility.classproperty
+ def cluster_id(cls) -> int:
+ return 0x00000452
+
+ @ChipUtility.classproperty
+ def attribute_id(cls) -> int:
+ return 0x00000001
+
+ @ChipUtility.classproperty
+ def attribute_type(cls) -> ClusterObjectFieldDescriptor:
+ return ClusterObjectFieldDescriptor(Type=bytes)
+
+ value: 'bytes' = b""
+
+ @dataclass
+ class ThreadVersion(ClusterAttributeDescriptor):
+ @ChipUtility.classproperty
+ def cluster_id(cls) -> int:
+ return 0x00000452
+
+ @ChipUtility.classproperty
+ def attribute_id(cls) -> int:
+ return 0x00000002
+
+ @ChipUtility.classproperty
+ def attribute_type(cls) -> ClusterObjectFieldDescriptor:
+ return ClusterObjectFieldDescriptor(Type=uint)
+
+ value: 'uint' = 0
+
+ @dataclass
+ class InterfaceEnabled(ClusterAttributeDescriptor):
+ @ChipUtility.classproperty
+ def cluster_id(cls) -> int:
+ return 0x00000452
+
+ @ChipUtility.classproperty
+ def attribute_id(cls) -> int:
+ return 0x00000003
+
+ @ChipUtility.classproperty
+ def attribute_type(cls) -> ClusterObjectFieldDescriptor:
+ return ClusterObjectFieldDescriptor(Type=bool)
+
+ value: 'bool' = False
+
+ @dataclass
+ class ActiveDatasetTimestamp(ClusterAttributeDescriptor):
+ @ChipUtility.classproperty
+ def cluster_id(cls) -> int:
+ return 0x00000452
+
+ @ChipUtility.classproperty
+ def attribute_id(cls) -> int:
+ return 0x00000005
+
+ @ChipUtility.classproperty
+ def attribute_type(cls) -> ClusterObjectFieldDescriptor:
+ return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, uint])
+
+ value: 'typing.Union[Nullable, uint]' = NullValue
+
+ @dataclass
+ class GeneratedCommandList(ClusterAttributeDescriptor):
+ @ChipUtility.classproperty
+ def cluster_id(cls) -> int:
+ return 0x00000452
+
+ @ChipUtility.classproperty
+ def attribute_id(cls) -> int:
+ return 0x0000FFF8
+
+ @ChipUtility.classproperty
+ def attribute_type(cls) -> ClusterObjectFieldDescriptor:
+ return ClusterObjectFieldDescriptor(Type=typing.List[uint])
+
+ value: 'typing.List[uint]' = field(default_factory=lambda: [])
+
+ @dataclass
+ class AcceptedCommandList(ClusterAttributeDescriptor):
+ @ChipUtility.classproperty
+ def cluster_id(cls) -> int:
+ return 0x00000452
+
+ @ChipUtility.classproperty
+ def attribute_id(cls) -> int:
+ return 0x0000FFF9
+
+ @ChipUtility.classproperty
+ def attribute_type(cls) -> ClusterObjectFieldDescriptor:
+ return ClusterObjectFieldDescriptor(Type=typing.List[uint])
+
+ value: 'typing.List[uint]' = field(default_factory=lambda: [])
+
+ @dataclass
+ class EventList(ClusterAttributeDescriptor):
+ @ChipUtility.classproperty
+ def cluster_id(cls) -> int:
+ return 0x00000452
+
+ @ChipUtility.classproperty
+ def attribute_id(cls) -> int:
+ return 0x0000FFFA
+
+ @ChipUtility.classproperty
+ def attribute_type(cls) -> ClusterObjectFieldDescriptor:
+ return ClusterObjectFieldDescriptor(Type=typing.List[uint])
+
+ value: 'typing.List[uint]' = field(default_factory=lambda: [])
+
+ @dataclass
+ class AttributeList(ClusterAttributeDescriptor):
+ @ChipUtility.classproperty
+ def cluster_id(cls) -> int:
+ return 0x00000452
+
+ @ChipUtility.classproperty
+ def attribute_id(cls) -> int:
+ return 0x0000FFFB
+
+ @ChipUtility.classproperty
+ def attribute_type(cls) -> ClusterObjectFieldDescriptor:
+ return ClusterObjectFieldDescriptor(Type=typing.List[uint])
+
+ value: 'typing.List[uint]' = field(default_factory=lambda: [])
+
+ @dataclass
+ class FeatureMap(ClusterAttributeDescriptor):
+ @ChipUtility.classproperty
+ def cluster_id(cls) -> int:
+ return 0x00000452
+
+ @ChipUtility.classproperty
+ def attribute_id(cls) -> int:
+ return 0x0000FFFC
+
+ @ChipUtility.classproperty
+ def attribute_type(cls) -> ClusterObjectFieldDescriptor:
+ return ClusterObjectFieldDescriptor(Type=uint)
+
+ value: 'uint' = 0
+
+ @dataclass
+ class ClusterRevision(ClusterAttributeDescriptor):
+ @ChipUtility.classproperty
+ def cluster_id(cls) -> int:
+ return 0x00000452
+
+ @ChipUtility.classproperty
+ def attribute_id(cls) -> int:
+ return 0x0000FFFD
+
+ @ChipUtility.classproperty
+ def attribute_type(cls) -> ClusterObjectFieldDescriptor:
+ return ClusterObjectFieldDescriptor(Type=uint)
+
+ value: 'uint' = 0
+
+
@dataclass
class ThreadNetworkDirectory(Cluster):
id: typing.ClassVar[int] = 0x00000453
diff --git a/src/controller/python/chip/clusters/__init__.py b/src/controller/python/chip/clusters/__init__.py
index 76a37b84abbc87..473e3f70a4f8d9 100644
--- a/src/controller/python/chip/clusters/__init__.py
+++ b/src/controller/python/chip/clusters/__init__.py
@@ -44,7 +44,7 @@
RefrigeratorAndTemperatureControlledCabinetMode, RelativeHumidityMeasurement, RvcCleanMode,
RvcOperationalState, RvcRunMode, ScenesManagement, SmokeCoAlarm, SoftwareDiagnostics, Switch, TargetNavigator,
TemperatureControl, TemperatureMeasurement, Thermostat, ThermostatUserInterfaceConfiguration,
- ThreadNetworkDiagnostics, TimeFormatLocalization, TimeSynchronization,
+ ThreadBorderRouterManagement, ThreadNetworkDiagnostics, TimeFormatLocalization, TimeSynchronization,
TotalVolatileOrganicCompoundsConcentrationMeasurement, UnitLocalization, UnitTesting, UserLabel,
ValveConfigurationAndControl, WakeOnLan, WiFiNetworkDiagnostics, WindowCovering)
@@ -67,6 +67,6 @@
RefrigeratorAlarm, RefrigeratorAndTemperatureControlledCabinetMode, RelativeHumidityMeasurement, RvcCleanMode,
RvcOperationalState, RvcRunMode, ScenesManagement, SmokeCoAlarm, SoftwareDiagnostics,
Switch, TargetNavigator, TemperatureControl, TemperatureMeasurement, Thermostat, ThermostatUserInterfaceConfiguration,
- ThreadNetworkDiagnostics, TimeFormatLocalization, TimeSynchronization,
+ ThreadBorderRouterManagement, ThreadNetworkDiagnostics, TimeFormatLocalization, TimeSynchronization,
TotalVolatileOrganicCompoundsConcentrationMeasurement, UnitLocalization,
UnitTesting, UserLabel, ValveConfigurationAndControl, WakeOnLan, WiFiNetworkDiagnostics, WindowCovering]
diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm
index d581289afd59f2..603647682805f6 100644
--- a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm
+++ b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm
@@ -5318,6 +5318,48 @@ static BOOL AttributeIsSpecifiedInWiFiNetworkManagementCluster(AttributeId aAttr
}
}
}
+static BOOL AttributeIsSpecifiedInThreadBorderRouterManagementCluster(AttributeId aAttributeId)
+{
+ using namespace Clusters::ThreadBorderRouterManagement;
+ switch (aAttributeId) {
+ case Attributes::BorderRouterName::Id: {
+ return YES;
+ }
+ case Attributes::BorderAgentID::Id: {
+ return YES;
+ }
+ case Attributes::ThreadVersion::Id: {
+ return YES;
+ }
+ case Attributes::InterfaceEnabled::Id: {
+ return YES;
+ }
+ case Attributes::ActiveDatasetTimestamp::Id: {
+ return YES;
+ }
+ case Attributes::GeneratedCommandList::Id: {
+ return YES;
+ }
+ case Attributes::AcceptedCommandList::Id: {
+ return YES;
+ }
+ case Attributes::EventList::Id: {
+ return YES;
+ }
+ case Attributes::AttributeList::Id: {
+ return YES;
+ }
+ case Attributes::FeatureMap::Id: {
+ return YES;
+ }
+ case Attributes::ClusterRevision::Id: {
+ return YES;
+ }
+ default: {
+ return NO;
+ }
+ }
+}
static BOOL AttributeIsSpecifiedInThreadNetworkDirectoryCluster(AttributeId aAttributeId)
{
using namespace Clusters::ThreadNetworkDirectory;
@@ -6873,6 +6915,9 @@ BOOL MTRAttributeIsSpecified(ClusterId aClusterId, AttributeId aAttributeId)
case Clusters::WiFiNetworkManagement::Id: {
return AttributeIsSpecifiedInWiFiNetworkManagementCluster(aAttributeId);
}
+ case Clusters::ThreadBorderRouterManagement::Id: {
+ return AttributeIsSpecifiedInThreadBorderRouterManagementCluster(aAttributeId);
+ }
case Clusters::ThreadNetworkDirectory::Id: {
return AttributeIsSpecifiedInThreadNetworkDirectoryCluster(aAttributeId);
}
diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm
index 9497069cb7e507..2b43b2818bc58c 100644
--- a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm
+++ b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm
@@ -15246,6 +15246,82 @@ static id _Nullable DecodeAttributeValueForWiFiNetworkManagementCluster(Attribut
*aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB;
return nil;
}
+static id _Nullable DecodeAttributeValueForThreadBorderRouterManagementCluster(AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError)
+{
+ using namespace Clusters::ThreadBorderRouterManagement;
+ switch (aAttributeId) {
+ case Attributes::BorderRouterName::Id: {
+ using TypeInfo = Attributes::BorderRouterName::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR) {
+ return nil;
+ }
+ NSString * _Nonnull value;
+ value = AsString(cppValue);
+ if (value == nil) {
+ CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT;
+ *aError = err;
+ return nil;
+ }
+ return value;
+ }
+ case Attributes::BorderAgentID::Id: {
+ using TypeInfo = Attributes::BorderAgentID::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR) {
+ return nil;
+ }
+ NSData * _Nonnull value;
+ value = AsData(cppValue);
+ return value;
+ }
+ case Attributes::ThreadVersion::Id: {
+ using TypeInfo = Attributes::ThreadVersion::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR) {
+ return nil;
+ }
+ NSNumber * _Nonnull value;
+ value = [NSNumber numberWithUnsignedShort:cppValue];
+ return value;
+ }
+ case Attributes::InterfaceEnabled::Id: {
+ using TypeInfo = Attributes::InterfaceEnabled::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR) {
+ return nil;
+ }
+ NSNumber * _Nonnull value;
+ value = [NSNumber numberWithBool:cppValue];
+ return value;
+ }
+ case Attributes::ActiveDatasetTimestamp::Id: {
+ using TypeInfo = Attributes::ActiveDatasetTimestamp::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR) {
+ return nil;
+ }
+ NSNumber * _Nullable value;
+ if (cppValue.IsNull()) {
+ value = nil;
+ } else {
+ value = [NSNumber numberWithUnsignedLongLong:cppValue.Value()];
+ }
+ return value;
+ }
+ default: {
+ break;
+ }
+ }
+
+ *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB;
+ return nil;
+}
static id _Nullable DecodeAttributeValueForThreadNetworkDirectoryCluster(AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError)
{
using namespace Clusters::ThreadNetworkDirectory;
@@ -19695,6 +19771,9 @@ id _Nullable MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::T
case Clusters::WiFiNetworkManagement::Id: {
return DecodeAttributeValueForWiFiNetworkManagementCluster(aPath.mAttributeId, aReader, aError);
}
+ case Clusters::ThreadBorderRouterManagement::Id: {
+ return DecodeAttributeValueForThreadBorderRouterManagementCluster(aPath.mAttributeId, aReader, aError);
+ }
case Clusters::ThreadNetworkDirectory::Id: {
return DecodeAttributeValueForThreadNetworkDirectoryCluster(aPath.mAttributeId, aReader, aError);
}
diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h
index c5e73b22368081..85beedb2171243 100644
--- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h
+++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h
@@ -13065,6 +13065,126 @@ MTR_PROVISIONALLY_AVAILABLE
@end
+/**
+ * Cluster Thread Border Router Management
+ *
+ * Manage the Thread network of Thread Border Router
+ */
+MTR_PROVISIONALLY_AVAILABLE
+@interface MTRBaseClusterThreadBorderRouterManagement : MTRGenericBaseCluster
+
+/**
+ * Command GetActiveDatasetRequest
+ *
+ * Command to request the active operational dataset of the Thread network to which the border router is connected. This command must be sent over a valid CASE session
+ */
+- (void)getActiveDatasetRequestWithParams:(MTRThreadBorderRouterManagementClusterGetActiveDatasetRequestParams * _Nullable)params completion:(void (^)(MTRThreadBorderRouterManagementClusterDatasetResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+- (void)getActiveDatasetRequestWithCompletion:(void (^)(MTRThreadBorderRouterManagementClusterDatasetResponseParams * _Nullable data, NSError * _Nullable error))completion
+ MTR_PROVISIONALLY_AVAILABLE;
+/**
+ * Command GetPendingDatasetRequest
+ *
+ * Command to request the pending dataset of the Thread network to which the border router is connected. This command must be sent over a valid CASE session
+ */
+- (void)getPendingDatasetRequestWithParams:(MTRThreadBorderRouterManagementClusterGetPendingDatasetRequestParams * _Nullable)params completion:(void (^)(MTRThreadBorderRouterManagementClusterDatasetResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+- (void)getPendingDatasetRequestWithCompletion:(void (^)(MTRThreadBorderRouterManagementClusterDatasetResponseParams * _Nullable data, NSError * _Nullable error))completion
+ MTR_PROVISIONALLY_AVAILABLE;
+/**
+ * Command SetActiveDatasetRequest
+ *
+ * Command to set or update the active Dataset of the Thread network to which the Border Router is connected.
+ */
+- (void)setActiveDatasetRequestWithParams:(MTRThreadBorderRouterManagementClusterSetActiveDatasetRequestParams *)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE;
+/**
+ * Command SetPendingDatasetRequest
+ *
+ * Command set or update the pending Dataset of the Thread network to which the Border Router is connected.
+ */
+- (void)setPendingDatasetRequestWithParams:(MTRThreadBorderRouterManagementClusterSetPendingDatasetRequestParams *)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE;
+
+- (void)readAttributeBorderRouterNameWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+- (void)subscribeAttributeBorderRouterNameWithParams:(MTRSubscribeParams *)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE;
++ (void)readAttributeBorderRouterNameWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+
+- (void)readAttributeBorderAgentIDWithCompletion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+- (void)subscribeAttributeBorderAgentIDWithParams:(MTRSubscribeParams *)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE;
++ (void)readAttributeBorderAgentIDWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+
+- (void)readAttributeThreadVersionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+- (void)subscribeAttributeThreadVersionWithParams:(MTRSubscribeParams *)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE;
++ (void)readAttributeThreadVersionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+
+- (void)readAttributeInterfaceEnabledWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+- (void)subscribeAttributeInterfaceEnabledWithParams:(MTRSubscribeParams *)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE;
++ (void)readAttributeInterfaceEnabledWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+
+- (void)readAttributeActiveDatasetTimestampWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+- (void)subscribeAttributeActiveDatasetTimestampWithParams:(MTRSubscribeParams *)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE;
++ (void)readAttributeActiveDatasetTimestampWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+
+- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE;
++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+
+- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE;
++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+
+- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE;
++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+
+- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE;
++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+
+- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE;
++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+
+- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE;
++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+
+- (instancetype)init NS_UNAVAILABLE;
++ (instancetype)new NS_UNAVAILABLE;
+
+@end
+
+@interface MTRBaseClusterThreadBorderRouterManagement (Availability)
+
+/**
+ * For all instance methods (reads, writes, commands) that take a completion,
+ * the completion will be called on the provided queue.
+ */
+- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device
+ endpointID:(NSNumber *)endpointID
+ queue:(dispatch_queue_t)queue MTR_PROVISIONALLY_AVAILABLE;
+
+@end
+
/**
* Cluster Thread Network Directory
*
@@ -19659,6 +19779,10 @@ typedef NS_OPTIONS(uint32_t, MTRRadonConcentrationMeasurementFeature) {
MTRRadonConcentrationMeasurementFeatureAverageMeasurement MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x20,
} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6));
+typedef NS_OPTIONS(uint32_t, MTRThreadBorderRouterManagementFeature) {
+ MTRThreadBorderRouterManagementFeaturePANChange MTR_PROVISIONALLY_AVAILABLE = 0x1,
+} MTR_PROVISIONALLY_AVAILABLE;
+
typedef NS_ENUM(uint8_t, MTRChannelType) {
MTRChannelTypeSatellite MTR_PROVISIONALLY_AVAILABLE = 0x00,
MTRChannelTypeCable MTR_PROVISIONALLY_AVAILABLE = 0x01,
diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm
index 1df39709657551..4cf69c6b4c4bde 100644
--- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm
+++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm
@@ -93179,6 +93179,511 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC
@end
+@implementation MTRBaseClusterThreadBorderRouterManagement
+
+- (void)getActiveDatasetRequestWithCompletion:(void (^)(MTRThreadBorderRouterManagementClusterDatasetResponseParams * _Nullable data, NSError * _Nullable error))completion
+{
+ [self getActiveDatasetRequestWithParams:nil completion:completion];
+}
+- (void)getActiveDatasetRequestWithParams:(MTRThreadBorderRouterManagementClusterGetActiveDatasetRequestParams * _Nullable)params completion:(void (^)(MTRThreadBorderRouterManagementClusterDatasetResponseParams * _Nullable data, NSError * _Nullable error))completion
+{
+ if (params == nil) {
+ params = [[MTRThreadBorderRouterManagementClusterGetActiveDatasetRequestParams
+ alloc] init];
+ }
+
+ auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) {
+ completion(response, error);
+ };
+
+ auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs;
+
+ using RequestType = ThreadBorderRouterManagement::Commands::GetActiveDatasetRequest::Type;
+ [self.device _invokeKnownCommandWithEndpointID:self.endpointID
+ clusterID:@(RequestType::GetClusterId())
+ commandID:@(RequestType::GetCommandId())
+ commandPayload:params
+ timedInvokeTimeout:timedInvokeTimeoutMs
+ serverSideProcessingTimeout:params.serverSideProcessingTimeout
+ responseClass:MTRThreadBorderRouterManagementClusterDatasetResponseParams.class
+ queue:self.callbackQueue
+ completion:responseHandler];
+}
+- (void)getPendingDatasetRequestWithCompletion:(void (^)(MTRThreadBorderRouterManagementClusterDatasetResponseParams * _Nullable data, NSError * _Nullable error))completion
+{
+ [self getPendingDatasetRequestWithParams:nil completion:completion];
+}
+- (void)getPendingDatasetRequestWithParams:(MTRThreadBorderRouterManagementClusterGetPendingDatasetRequestParams * _Nullable)params completion:(void (^)(MTRThreadBorderRouterManagementClusterDatasetResponseParams * _Nullable data, NSError * _Nullable error))completion
+{
+ if (params == nil) {
+ params = [[MTRThreadBorderRouterManagementClusterGetPendingDatasetRequestParams
+ alloc] init];
+ }
+
+ auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) {
+ completion(response, error);
+ };
+
+ auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs;
+
+ using RequestType = ThreadBorderRouterManagement::Commands::GetPendingDatasetRequest::Type;
+ [self.device _invokeKnownCommandWithEndpointID:self.endpointID
+ clusterID:@(RequestType::GetClusterId())
+ commandID:@(RequestType::GetCommandId())
+ commandPayload:params
+ timedInvokeTimeout:timedInvokeTimeoutMs
+ serverSideProcessingTimeout:params.serverSideProcessingTimeout
+ responseClass:MTRThreadBorderRouterManagementClusterDatasetResponseParams.class
+ queue:self.callbackQueue
+ completion:responseHandler];
+}
+- (void)setActiveDatasetRequestWithParams:(MTRThreadBorderRouterManagementClusterSetActiveDatasetRequestParams *)params completion:(MTRStatusCompletion)completion
+{
+ if (params == nil) {
+ params = [[MTRThreadBorderRouterManagementClusterSetActiveDatasetRequestParams
+ alloc] init];
+ }
+
+ auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) {
+ completion(error);
+ };
+
+ auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs;
+
+ using RequestType = ThreadBorderRouterManagement::Commands::SetActiveDatasetRequest::Type;
+ [self.device _invokeKnownCommandWithEndpointID:self.endpointID
+ clusterID:@(RequestType::GetClusterId())
+ commandID:@(RequestType::GetCommandId())
+ commandPayload:params
+ timedInvokeTimeout:timedInvokeTimeoutMs
+ serverSideProcessingTimeout:params.serverSideProcessingTimeout
+ responseClass:nil
+ queue:self.callbackQueue
+ completion:responseHandler];
+}
+- (void)setPendingDatasetRequestWithParams:(MTRThreadBorderRouterManagementClusterSetPendingDatasetRequestParams *)params completion:(MTRStatusCompletion)completion
+{
+ if (params == nil) {
+ params = [[MTRThreadBorderRouterManagementClusterSetPendingDatasetRequestParams
+ alloc] init];
+ }
+
+ auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) {
+ completion(error);
+ };
+
+ auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs;
+
+ using RequestType = ThreadBorderRouterManagement::Commands::SetPendingDatasetRequest::Type;
+ [self.device _invokeKnownCommandWithEndpointID:self.endpointID
+ clusterID:@(RequestType::GetClusterId())
+ commandID:@(RequestType::GetCommandId())
+ commandPayload:params
+ timedInvokeTimeout:timedInvokeTimeoutMs
+ serverSideProcessingTimeout:params.serverSideProcessingTimeout
+ responseClass:nil
+ queue:self.callbackQueue
+ completion:responseHandler];
+}
+
+- (void)readAttributeBorderRouterNameWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = ThreadBorderRouterManagement::Attributes::BorderRouterName::TypeInfo;
+ [self.device _readKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:nil
+ queue:self.callbackQueue
+ completion:completion];
+}
+
+- (void)subscribeAttributeBorderRouterNameWithParams:(MTRSubscribeParams * _Nonnull)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler
+{
+ using TypeInfo = ThreadBorderRouterManagement::Attributes::BorderRouterName::TypeInfo;
+ [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:params
+ queue:self.callbackQueue
+ reportHandler:reportHandler
+ subscriptionEstablished:subscriptionEstablished];
+}
+
++ (void)readAttributeBorderRouterNameWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = ThreadBorderRouterManagement::Attributes::BorderRouterName::TypeInfo;
+ [clusterStateCacheContainer
+ _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue])
+ clusterID:TypeInfo::GetClusterId()
+ attributeID:TypeInfo::GetAttributeId()
+ queue:queue
+ completion:completion];
+}
+
+- (void)readAttributeBorderAgentIDWithCompletion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = ThreadBorderRouterManagement::Attributes::BorderAgentID::TypeInfo;
+ [self.device _readKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:nil
+ queue:self.callbackQueue
+ completion:completion];
+}
+
+- (void)subscribeAttributeBorderAgentIDWithParams:(MTRSubscribeParams * _Nonnull)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler
+{
+ using TypeInfo = ThreadBorderRouterManagement::Attributes::BorderAgentID::TypeInfo;
+ [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:params
+ queue:self.callbackQueue
+ reportHandler:reportHandler
+ subscriptionEstablished:subscriptionEstablished];
+}
+
++ (void)readAttributeBorderAgentIDWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = ThreadBorderRouterManagement::Attributes::BorderAgentID::TypeInfo;
+ [clusterStateCacheContainer
+ _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue])
+ clusterID:TypeInfo::GetClusterId()
+ attributeID:TypeInfo::GetAttributeId()
+ queue:queue
+ completion:completion];
+}
+
+- (void)readAttributeThreadVersionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = ThreadBorderRouterManagement::Attributes::ThreadVersion::TypeInfo;
+ [self.device _readKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:nil
+ queue:self.callbackQueue
+ completion:completion];
+}
+
+- (void)subscribeAttributeThreadVersionWithParams:(MTRSubscribeParams * _Nonnull)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler
+{
+ using TypeInfo = ThreadBorderRouterManagement::Attributes::ThreadVersion::TypeInfo;
+ [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:params
+ queue:self.callbackQueue
+ reportHandler:reportHandler
+ subscriptionEstablished:subscriptionEstablished];
+}
+
++ (void)readAttributeThreadVersionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = ThreadBorderRouterManagement::Attributes::ThreadVersion::TypeInfo;
+ [clusterStateCacheContainer
+ _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue])
+ clusterID:TypeInfo::GetClusterId()
+ attributeID:TypeInfo::GetAttributeId()
+ queue:queue
+ completion:completion];
+}
+
+- (void)readAttributeInterfaceEnabledWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = ThreadBorderRouterManagement::Attributes::InterfaceEnabled::TypeInfo;
+ [self.device _readKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:nil
+ queue:self.callbackQueue
+ completion:completion];
+}
+
+- (void)subscribeAttributeInterfaceEnabledWithParams:(MTRSubscribeParams * _Nonnull)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler
+{
+ using TypeInfo = ThreadBorderRouterManagement::Attributes::InterfaceEnabled::TypeInfo;
+ [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:params
+ queue:self.callbackQueue
+ reportHandler:reportHandler
+ subscriptionEstablished:subscriptionEstablished];
+}
+
++ (void)readAttributeInterfaceEnabledWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = ThreadBorderRouterManagement::Attributes::InterfaceEnabled::TypeInfo;
+ [clusterStateCacheContainer
+ _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue])
+ clusterID:TypeInfo::GetClusterId()
+ attributeID:TypeInfo::GetAttributeId()
+ queue:queue
+ completion:completion];
+}
+
+- (void)readAttributeActiveDatasetTimestampWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = ThreadBorderRouterManagement::Attributes::ActiveDatasetTimestamp::TypeInfo;
+ [self.device _readKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:nil
+ queue:self.callbackQueue
+ completion:completion];
+}
+
+- (void)subscribeAttributeActiveDatasetTimestampWithParams:(MTRSubscribeParams * _Nonnull)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler
+{
+ using TypeInfo = ThreadBorderRouterManagement::Attributes::ActiveDatasetTimestamp::TypeInfo;
+ [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:params
+ queue:self.callbackQueue
+ reportHandler:reportHandler
+ subscriptionEstablished:subscriptionEstablished];
+}
+
++ (void)readAttributeActiveDatasetTimestampWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = ThreadBorderRouterManagement::Attributes::ActiveDatasetTimestamp::TypeInfo;
+ [clusterStateCacheContainer
+ _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue])
+ clusterID:TypeInfo::GetClusterId()
+ attributeID:TypeInfo::GetAttributeId()
+ queue:queue
+ completion:completion];
+}
+
+- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = ThreadBorderRouterManagement::Attributes::GeneratedCommandList::TypeInfo;
+ [self.device _readKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:nil
+ queue:self.callbackQueue
+ completion:completion];
+}
+
+- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler
+{
+ using TypeInfo = ThreadBorderRouterManagement::Attributes::GeneratedCommandList::TypeInfo;
+ [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:params
+ queue:self.callbackQueue
+ reportHandler:reportHandler
+ subscriptionEstablished:subscriptionEstablished];
+}
+
++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = ThreadBorderRouterManagement::Attributes::GeneratedCommandList::TypeInfo;
+ [clusterStateCacheContainer
+ _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue])
+ clusterID:TypeInfo::GetClusterId()
+ attributeID:TypeInfo::GetAttributeId()
+ queue:queue
+ completion:completion];
+}
+
+- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = ThreadBorderRouterManagement::Attributes::AcceptedCommandList::TypeInfo;
+ [self.device _readKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:nil
+ queue:self.callbackQueue
+ completion:completion];
+}
+
+- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler
+{
+ using TypeInfo = ThreadBorderRouterManagement::Attributes::AcceptedCommandList::TypeInfo;
+ [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:params
+ queue:self.callbackQueue
+ reportHandler:reportHandler
+ subscriptionEstablished:subscriptionEstablished];
+}
+
++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = ThreadBorderRouterManagement::Attributes::AcceptedCommandList::TypeInfo;
+ [clusterStateCacheContainer
+ _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue])
+ clusterID:TypeInfo::GetClusterId()
+ attributeID:TypeInfo::GetAttributeId()
+ queue:queue
+ completion:completion];
+}
+
+- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = ThreadBorderRouterManagement::Attributes::EventList::TypeInfo;
+ [self.device _readKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:nil
+ queue:self.callbackQueue
+ completion:completion];
+}
+
+- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler
+{
+ using TypeInfo = ThreadBorderRouterManagement::Attributes::EventList::TypeInfo;
+ [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:params
+ queue:self.callbackQueue
+ reportHandler:reportHandler
+ subscriptionEstablished:subscriptionEstablished];
+}
+
++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = ThreadBorderRouterManagement::Attributes::EventList::TypeInfo;
+ [clusterStateCacheContainer
+ _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue])
+ clusterID:TypeInfo::GetClusterId()
+ attributeID:TypeInfo::GetAttributeId()
+ queue:queue
+ completion:completion];
+}
+
+- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = ThreadBorderRouterManagement::Attributes::AttributeList::TypeInfo;
+ [self.device _readKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:nil
+ queue:self.callbackQueue
+ completion:completion];
+}
+
+- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler
+{
+ using TypeInfo = ThreadBorderRouterManagement::Attributes::AttributeList::TypeInfo;
+ [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:params
+ queue:self.callbackQueue
+ reportHandler:reportHandler
+ subscriptionEstablished:subscriptionEstablished];
+}
+
++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = ThreadBorderRouterManagement::Attributes::AttributeList::TypeInfo;
+ [clusterStateCacheContainer
+ _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue])
+ clusterID:TypeInfo::GetClusterId()
+ attributeID:TypeInfo::GetAttributeId()
+ queue:queue
+ completion:completion];
+}
+
+- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = ThreadBorderRouterManagement::Attributes::FeatureMap::TypeInfo;
+ [self.device _readKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:nil
+ queue:self.callbackQueue
+ completion:completion];
+}
+
+- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler
+{
+ using TypeInfo = ThreadBorderRouterManagement::Attributes::FeatureMap::TypeInfo;
+ [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:params
+ queue:self.callbackQueue
+ reportHandler:reportHandler
+ subscriptionEstablished:subscriptionEstablished];
+}
+
++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = ThreadBorderRouterManagement::Attributes::FeatureMap::TypeInfo;
+ [clusterStateCacheContainer
+ _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue])
+ clusterID:TypeInfo::GetClusterId()
+ attributeID:TypeInfo::GetAttributeId()
+ queue:queue
+ completion:completion];
+}
+
+- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = ThreadBorderRouterManagement::Attributes::ClusterRevision::TypeInfo;
+ [self.device _readKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:nil
+ queue:self.callbackQueue
+ completion:completion];
+}
+
+- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler
+{
+ using TypeInfo = ThreadBorderRouterManagement::Attributes::ClusterRevision::TypeInfo;
+ [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:params
+ queue:self.callbackQueue
+ reportHandler:reportHandler
+ subscriptionEstablished:subscriptionEstablished];
+}
+
++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = ThreadBorderRouterManagement::Attributes::ClusterRevision::TypeInfo;
+ [clusterStateCacheContainer
+ _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue])
+ clusterID:TypeInfo::GetClusterId()
+ attributeID:TypeInfo::GetAttributeId()
+ queue:queue
+ completion:completion];
+}
+
+@end
+
@implementation MTRBaseClusterThreadNetworkDirectory
- (void)addNetworkWithParams:(MTRThreadNetworkDirectoryClusterAddNetworkParams *)params completion:(MTRStatusCompletion)completion
diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h b/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h
index d609ce5c84179c..da9c24e4c35beb 100644
--- a/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h
+++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h
@@ -185,6 +185,7 @@ typedef NS_ENUM(uint32_t, MTRClusterIDType) {
MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x0000042E,
MTRClusterIDTypeRadonConcentrationMeasurementID MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x0000042F,
MTRClusterIDTypeWiFiNetworkManagementID MTR_PROVISIONALLY_AVAILABLE = 0x00000451,
+ MTRClusterIDTypeThreadBorderRouterManagementID MTR_PROVISIONALLY_AVAILABLE = 0x00000452,
MTRClusterIDTypeThreadNetworkDirectoryID MTR_PROVISIONALLY_AVAILABLE = 0x00000453,
MTRClusterIDTypeWakeOnLANID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000503,
MTRClusterIDTypeChannelID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000504,
@@ -4372,6 +4373,19 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) {
MTRAttributeIDTypeClusterWiFiNetworkManagementAttributeFeatureMapID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeFeatureMapID,
MTRAttributeIDTypeClusterWiFiNetworkManagementAttributeClusterRevisionID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeClusterRevisionID,
+ // Cluster ThreadBorderRouterManagement attributes
+ MTRAttributeIDTypeClusterThreadBorderRouterManagementAttributeBorderRouterNameID MTR_PROVISIONALLY_AVAILABLE = 0x00000000,
+ MTRAttributeIDTypeClusterThreadBorderRouterManagementAttributeBorderAgentIDID MTR_PROVISIONALLY_AVAILABLE = 0x00000001,
+ MTRAttributeIDTypeClusterThreadBorderRouterManagementAttributeThreadVersionID MTR_PROVISIONALLY_AVAILABLE = 0x00000002,
+ MTRAttributeIDTypeClusterThreadBorderRouterManagementAttributeInterfaceEnabledID MTR_PROVISIONALLY_AVAILABLE = 0x00000003,
+ MTRAttributeIDTypeClusterThreadBorderRouterManagementAttributeActiveDatasetTimestampID MTR_PROVISIONALLY_AVAILABLE = 0x00000005,
+ MTRAttributeIDTypeClusterThreadBorderRouterManagementAttributeGeneratedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID,
+ MTRAttributeIDTypeClusterThreadBorderRouterManagementAttributeAcceptedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID,
+ MTRAttributeIDTypeClusterThreadBorderRouterManagementAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID,
+ MTRAttributeIDTypeClusterThreadBorderRouterManagementAttributeAttributeListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAttributeListID,
+ MTRAttributeIDTypeClusterThreadBorderRouterManagementAttributeFeatureMapID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeFeatureMapID,
+ MTRAttributeIDTypeClusterThreadBorderRouterManagementAttributeClusterRevisionID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeClusterRevisionID,
+
// Cluster ThreadNetworkDirectory attributes
MTRAttributeIDTypeClusterThreadNetworkDirectoryAttributePreferredExtendedPanIDID MTR_PROVISIONALLY_AVAILABLE = 0x00000000,
MTRAttributeIDTypeClusterThreadNetworkDirectoryAttributeThreadNetworksID MTR_PROVISIONALLY_AVAILABLE = 0x00000001,
@@ -6601,6 +6615,13 @@ typedef NS_ENUM(uint32_t, MTRCommandIDType) {
MTRCommandIDTypeClusterWiFiNetworkManagementCommandNetworkPassphraseRequestID MTR_PROVISIONALLY_AVAILABLE = 0x00000000,
MTRCommandIDTypeClusterWiFiNetworkManagementCommandNetworkPassphraseResponseID MTR_PROVISIONALLY_AVAILABLE = 0x00000001,
+ // Cluster ThreadBorderRouterManagement commands
+ MTRCommandIDTypeClusterThreadBorderRouterManagementCommandGetActiveDatasetRequestID MTR_PROVISIONALLY_AVAILABLE = 0x00000000,
+ MTRCommandIDTypeClusterThreadBorderRouterManagementCommandGetPendingDatasetRequestID MTR_PROVISIONALLY_AVAILABLE = 0x00000001,
+ MTRCommandIDTypeClusterThreadBorderRouterManagementCommandDatasetResponseID MTR_PROVISIONALLY_AVAILABLE = 0x00000003,
+ MTRCommandIDTypeClusterThreadBorderRouterManagementCommandSetActiveDatasetRequestID MTR_PROVISIONALLY_AVAILABLE = 0x00000004,
+ MTRCommandIDTypeClusterThreadBorderRouterManagementCommandSetPendingDatasetRequestID MTR_PROVISIONALLY_AVAILABLE = 0x00000005,
+
// Cluster ThreadNetworkDirectory commands
MTRCommandIDTypeClusterThreadNetworkDirectoryCommandAddNetworkID MTR_PROVISIONALLY_AVAILABLE = 0x00000000,
MTRCommandIDTypeClusterThreadNetworkDirectoryCommandRemoveNetworkID MTR_PROVISIONALLY_AVAILABLE = 0x00000001,
diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusterNames.mm b/src/darwin/Framework/CHIP/zap-generated/MTRClusterNames.mm
index 2306fdd1c7d92d..5ca3b9058c217a 100644
--- a/src/darwin/Framework/CHIP/zap-generated/MTRClusterNames.mm
+++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusterNames.mm
@@ -321,6 +321,9 @@
case MTRClusterIDTypeWiFiNetworkManagementID:
result = @"WiFiNetworkManagement";
break;
+ case MTRClusterIDTypeThreadBorderRouterManagementID:
+ result = @"ThreadBorderRouterManagement";
+ break;
case MTRClusterIDTypeThreadNetworkDirectoryID:
result = @"ThreadNetworkDirectory";
break;
@@ -7256,6 +7259,60 @@
break;
}
+ case MTRClusterIDTypeThreadBorderRouterManagementID:
+
+ switch (attributeID) {
+
+ // Cluster ThreadBorderRouterManagement attributes
+ case MTRAttributeIDTypeClusterThreadBorderRouterManagementAttributeBorderRouterNameID:
+ result = @"BorderRouterName";
+ break;
+
+ case MTRAttributeIDTypeClusterThreadBorderRouterManagementAttributeBorderAgentIDID:
+ result = @"BorderAgentID";
+ break;
+
+ case MTRAttributeIDTypeClusterThreadBorderRouterManagementAttributeThreadVersionID:
+ result = @"ThreadVersion";
+ break;
+
+ case MTRAttributeIDTypeClusterThreadBorderRouterManagementAttributeInterfaceEnabledID:
+ result = @"InterfaceEnabled";
+ break;
+
+ case MTRAttributeIDTypeClusterThreadBorderRouterManagementAttributeActiveDatasetTimestampID:
+ result = @"ActiveDatasetTimestamp";
+ break;
+
+ case MTRAttributeIDTypeClusterThreadBorderRouterManagementAttributeGeneratedCommandListID:
+ result = @"GeneratedCommandList";
+ break;
+
+ case MTRAttributeIDTypeClusterThreadBorderRouterManagementAttributeAcceptedCommandListID:
+ result = @"AcceptedCommandList";
+ break;
+
+ case MTRAttributeIDTypeClusterThreadBorderRouterManagementAttributeEventListID:
+ result = @"EventList";
+ break;
+
+ case MTRAttributeIDTypeClusterThreadBorderRouterManagementAttributeAttributeListID:
+ result = @"AttributeList";
+ break;
+
+ case MTRAttributeIDTypeClusterThreadBorderRouterManagementAttributeFeatureMapID:
+ result = @"FeatureMap";
+ break;
+
+ case MTRAttributeIDTypeClusterThreadBorderRouterManagementAttributeClusterRevisionID:
+ result = @"ClusterRevision";
+ break;
+
+ default:
+ result = [NSString stringWithFormat:@"", attributeID];
+ break;
+ }
+
case MTRClusterIDTypeThreadNetworkDirectoryID:
switch (attributeID) {
diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h
index 29249e35e5a360..a2c7508b683c3a 100644
--- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h
+++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h
@@ -6035,6 +6035,61 @@ MTR_PROVISIONALLY_AVAILABLE
@end
+/**
+ * Cluster Thread Border Router Management
+ * Manage the Thread network of Thread Border Router
+ */
+MTR_PROVISIONALLY_AVAILABLE
+@interface MTRClusterThreadBorderRouterManagement : MTRGenericCluster
+
+- (void)getActiveDatasetRequestWithParams:(MTRThreadBorderRouterManagementClusterGetActiveDatasetRequestParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRThreadBorderRouterManagementClusterDatasetResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+- (void)getActiveDatasetRequestWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRThreadBorderRouterManagementClusterDatasetResponseParams * _Nullable data, NSError * _Nullable error))completion
+ MTR_PROVISIONALLY_AVAILABLE;
+- (void)getPendingDatasetRequestWithParams:(MTRThreadBorderRouterManagementClusterGetPendingDatasetRequestParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRThreadBorderRouterManagementClusterDatasetResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+- (void)getPendingDatasetRequestWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRThreadBorderRouterManagementClusterDatasetResponseParams * _Nullable data, NSError * _Nullable error))completion
+ MTR_PROVISIONALLY_AVAILABLE;
+- (void)setActiveDatasetRequestWithParams:(MTRThreadBorderRouterManagementClusterSetActiveDatasetRequestParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE;
+- (void)setPendingDatasetRequestWithParams:(MTRThreadBorderRouterManagementClusterSetPendingDatasetRequestParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE;
+
+- (NSDictionary * _Nullable)readAttributeBorderRouterNameWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE;
+
+- (NSDictionary * _Nullable)readAttributeBorderAgentIDWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE;
+
+- (NSDictionary * _Nullable)readAttributeThreadVersionWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE;
+
+- (NSDictionary * _Nullable)readAttributeInterfaceEnabledWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE;
+
+- (NSDictionary * _Nullable)readAttributeActiveDatasetTimestampWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE;
+
+- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE;
+
+- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE;
+
+- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE;
+
+- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE;
+
+- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE;
+
+- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE;
+
+- (instancetype)init NS_UNAVAILABLE;
++ (instancetype)new NS_UNAVAILABLE;
+
+@end
+
+@interface MTRClusterThreadBorderRouterManagement (Availability)
+
+/**
+ * For all instance methods that take a completion (i.e. command invocations),
+ * the completion will be called on the provided queue.
+ */
+- (instancetype _Nullable)initWithDevice:(MTRDevice *)device
+ endpointID:(NSNumber *)endpointID
+ queue:(dispatch_queue_t)queue MTR_PROVISIONALLY_AVAILABLE;
+
+@end
+
/**
* Cluster Thread Network Directory
* Manages the names and credentials of Thread networks visible to the user.
diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm
index c950d5e4f0f1b8..953df0cde7fa90 100644
--- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm
+++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm
@@ -16838,6 +16838,181 @@ - (void)networkPassphraseRequestWithParams:(MTRWiFiNetworkManagementClusterNetwo
@end
+@implementation MTRClusterThreadBorderRouterManagement
+
+- (void)getActiveDatasetRequestWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(void (^)(MTRThreadBorderRouterManagementClusterDatasetResponseParams * _Nullable data, NSError * _Nullable error))completion
+{
+ [self getActiveDatasetRequestWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion];
+}
+- (void)getActiveDatasetRequestWithParams:(MTRThreadBorderRouterManagementClusterGetActiveDatasetRequestParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRThreadBorderRouterManagementClusterDatasetResponseParams * _Nullable data, NSError * _Nullable error))completion
+{
+ if (params == nil) {
+ params = [[MTRThreadBorderRouterManagementClusterGetActiveDatasetRequestParams
+ alloc] init];
+ }
+
+ auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) {
+ completion(response, error);
+ };
+
+ auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs;
+
+ using RequestType = ThreadBorderRouterManagement::Commands::GetActiveDatasetRequest::Type;
+ [self.device _invokeKnownCommandWithEndpointID:self.endpointID
+ clusterID:@(RequestType::GetClusterId())
+ commandID:@(RequestType::GetCommandId())
+ commandPayload:params
+ expectedValues:expectedValues
+ expectedValueInterval:expectedValueIntervalMs
+ timedInvokeTimeout:timedInvokeTimeoutMs
+ serverSideProcessingTimeout:params.serverSideProcessingTimeout
+ responseClass:MTRThreadBorderRouterManagementClusterDatasetResponseParams.class
+ queue:self.callbackQueue
+ completion:responseHandler];
+}
+
+- (void)getPendingDatasetRequestWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(void (^)(MTRThreadBorderRouterManagementClusterDatasetResponseParams * _Nullable data, NSError * _Nullable error))completion
+{
+ [self getPendingDatasetRequestWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion];
+}
+- (void)getPendingDatasetRequestWithParams:(MTRThreadBorderRouterManagementClusterGetPendingDatasetRequestParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRThreadBorderRouterManagementClusterDatasetResponseParams * _Nullable data, NSError * _Nullable error))completion
+{
+ if (params == nil) {
+ params = [[MTRThreadBorderRouterManagementClusterGetPendingDatasetRequestParams
+ alloc] init];
+ }
+
+ auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) {
+ completion(response, error);
+ };
+
+ auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs;
+
+ using RequestType = ThreadBorderRouterManagement::Commands::GetPendingDatasetRequest::Type;
+ [self.device _invokeKnownCommandWithEndpointID:self.endpointID
+ clusterID:@(RequestType::GetClusterId())
+ commandID:@(RequestType::GetCommandId())
+ commandPayload:params
+ expectedValues:expectedValues
+ expectedValueInterval:expectedValueIntervalMs
+ timedInvokeTimeout:timedInvokeTimeoutMs
+ serverSideProcessingTimeout:params.serverSideProcessingTimeout
+ responseClass:MTRThreadBorderRouterManagementClusterDatasetResponseParams.class
+ queue:self.callbackQueue
+ completion:responseHandler];
+}
+
+- (void)setActiveDatasetRequestWithParams:(MTRThreadBorderRouterManagementClusterSetActiveDatasetRequestParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion
+{
+ if (params == nil) {
+ params = [[MTRThreadBorderRouterManagementClusterSetActiveDatasetRequestParams
+ alloc] init];
+ }
+
+ auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) {
+ completion(error);
+ };
+
+ auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs;
+
+ using RequestType = ThreadBorderRouterManagement::Commands::SetActiveDatasetRequest::Type;
+ [self.device _invokeKnownCommandWithEndpointID:self.endpointID
+ clusterID:@(RequestType::GetClusterId())
+ commandID:@(RequestType::GetCommandId())
+ commandPayload:params
+ expectedValues:expectedValues
+ expectedValueInterval:expectedValueIntervalMs
+ timedInvokeTimeout:timedInvokeTimeoutMs
+ serverSideProcessingTimeout:params.serverSideProcessingTimeout
+ responseClass:nil
+ queue:self.callbackQueue
+ completion:responseHandler];
+}
+
+- (void)setPendingDatasetRequestWithParams:(MTRThreadBorderRouterManagementClusterSetPendingDatasetRequestParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion
+{
+ if (params == nil) {
+ params = [[MTRThreadBorderRouterManagementClusterSetPendingDatasetRequestParams
+ alloc] init];
+ }
+
+ auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) {
+ completion(error);
+ };
+
+ auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs;
+
+ using RequestType = ThreadBorderRouterManagement::Commands::SetPendingDatasetRequest::Type;
+ [self.device _invokeKnownCommandWithEndpointID:self.endpointID
+ clusterID:@(RequestType::GetClusterId())
+ commandID:@(RequestType::GetCommandId())
+ commandPayload:params
+ expectedValues:expectedValues
+ expectedValueInterval:expectedValueIntervalMs
+ timedInvokeTimeout:timedInvokeTimeoutMs
+ serverSideProcessingTimeout:params.serverSideProcessingTimeout
+ responseClass:nil
+ queue:self.callbackQueue
+ completion:responseHandler];
+}
+
+- (NSDictionary * _Nullable)readAttributeBorderRouterNameWithParams:(MTRReadParams * _Nullable)params
+{
+ return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThreadBorderRouterManagementID) attributeID:@(MTRAttributeIDTypeClusterThreadBorderRouterManagementAttributeBorderRouterNameID) params:params];
+}
+
+- (NSDictionary * _Nullable)readAttributeBorderAgentIDWithParams:(MTRReadParams * _Nullable)params
+{
+ return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThreadBorderRouterManagementID) attributeID:@(MTRAttributeIDTypeClusterThreadBorderRouterManagementAttributeBorderAgentIDID) params:params];
+}
+
+- (NSDictionary * _Nullable)readAttributeThreadVersionWithParams:(MTRReadParams * _Nullable)params
+{
+ return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThreadBorderRouterManagementID) attributeID:@(MTRAttributeIDTypeClusterThreadBorderRouterManagementAttributeThreadVersionID) params:params];
+}
+
+- (NSDictionary * _Nullable)readAttributeInterfaceEnabledWithParams:(MTRReadParams * _Nullable)params
+{
+ return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThreadBorderRouterManagementID) attributeID:@(MTRAttributeIDTypeClusterThreadBorderRouterManagementAttributeInterfaceEnabledID) params:params];
+}
+
+- (NSDictionary * _Nullable)readAttributeActiveDatasetTimestampWithParams:(MTRReadParams * _Nullable)params
+{
+ return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThreadBorderRouterManagementID) attributeID:@(MTRAttributeIDTypeClusterThreadBorderRouterManagementAttributeActiveDatasetTimestampID) params:params];
+}
+
+- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params
+{
+ return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThreadBorderRouterManagementID) attributeID:@(MTRAttributeIDTypeClusterThreadBorderRouterManagementAttributeGeneratedCommandListID) params:params];
+}
+
+- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params
+{
+ return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThreadBorderRouterManagementID) attributeID:@(MTRAttributeIDTypeClusterThreadBorderRouterManagementAttributeAcceptedCommandListID) params:params];
+}
+
+- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params
+{
+ return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThreadBorderRouterManagementID) attributeID:@(MTRAttributeIDTypeClusterThreadBorderRouterManagementAttributeEventListID) params:params];
+}
+
+- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params
+{
+ return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThreadBorderRouterManagementID) attributeID:@(MTRAttributeIDTypeClusterThreadBorderRouterManagementAttributeAttributeListID) params:params];
+}
+
+- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params
+{
+ return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThreadBorderRouterManagementID) attributeID:@(MTRAttributeIDTypeClusterThreadBorderRouterManagementAttributeFeatureMapID) params:params];
+}
+
+- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params
+{
+ return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThreadBorderRouterManagementID) attributeID:@(MTRAttributeIDTypeClusterThreadBorderRouterManagementAttributeClusterRevisionID) params:params];
+}
+
+@end
+
@implementation MTRClusterThreadNetworkDirectory
- (void)addNetworkWithParams:(MTRThreadNetworkDirectoryClusterAddNetworkParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion
diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h
index 0017193f50a673..18ad1d61b98664 100644
--- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h
+++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h
@@ -8559,6 +8559,143 @@ MTR_PROVISIONALLY_AVAILABLE
error:(NSError * __autoreleasing *)error MTR_PROVISIONALLY_AVAILABLE;
@end
+MTR_PROVISIONALLY_AVAILABLE
+@interface MTRThreadBorderRouterManagementClusterGetActiveDatasetRequestParams : NSObject
+/**
+ * Controls whether the command is a timed command (using Timed Invoke).
+ *
+ * If nil (the default value), a regular invoke is done for commands that do
+ * not require a timed invoke and a timed invoke with some default timed request
+ * timeout is done for commands that require a timed invoke.
+ *
+ * If not nil, a timed invoke is done, with the provided value used as the timed
+ * request timeout. The value should be chosen small enough to provide the
+ * desired security properties but large enough that it will allow a round-trip
+ * from the sever to the client (for the status response and actual invoke
+ * request) within the timeout window.
+ *
+ */
+@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs;
+
+/**
+ * Controls how much time, in seconds, we will allow for the server to process the command.
+ *
+ * The command will then time out if that much time, plus an allowance for retransmits due to network failures, passes.
+ *
+ * If nil, the framework will try to select an appropriate timeout value itself.
+ */
+@property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout;
+@end
+
+MTR_PROVISIONALLY_AVAILABLE
+@interface MTRThreadBorderRouterManagementClusterGetPendingDatasetRequestParams : NSObject
+/**
+ * Controls whether the command is a timed command (using Timed Invoke).
+ *
+ * If nil (the default value), a regular invoke is done for commands that do
+ * not require a timed invoke and a timed invoke with some default timed request
+ * timeout is done for commands that require a timed invoke.
+ *
+ * If not nil, a timed invoke is done, with the provided value used as the timed
+ * request timeout. The value should be chosen small enough to provide the
+ * desired security properties but large enough that it will allow a round-trip
+ * from the sever to the client (for the status response and actual invoke
+ * request) within the timeout window.
+ *
+ */
+@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs;
+
+/**
+ * Controls how much time, in seconds, we will allow for the server to process the command.
+ *
+ * The command will then time out if that much time, plus an allowance for retransmits due to network failures, passes.
+ *
+ * If nil, the framework will try to select an appropriate timeout value itself.
+ */
+@property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout;
+@end
+
+MTR_PROVISIONALLY_AVAILABLE
+@interface MTRThreadBorderRouterManagementClusterDatasetResponseParams : NSObject
+
+@property (nonatomic, copy) NSData * _Nonnull dataset MTR_PROVISIONALLY_AVAILABLE;
+
+/**
+ * Initialize an MTRThreadBorderRouterManagementClusterDatasetResponseParams with a response-value dictionary
+ * of the sort that MTRDeviceResponseHandler would receive.
+ *
+ * Will return nil and hand out an error if the response-value dictionary is not
+ * a command data response or is not the right command response.
+ *
+ * Will return nil and hand out an error if the data response does not match the known
+ * schema for this command.
+ */
+- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue
+ error:(NSError * __autoreleasing *)error MTR_PROVISIONALLY_AVAILABLE;
+@end
+
+MTR_PROVISIONALLY_AVAILABLE
+@interface MTRThreadBorderRouterManagementClusterSetActiveDatasetRequestParams : NSObject
+
+@property (nonatomic, copy) NSData * _Nonnull activeDataset MTR_PROVISIONALLY_AVAILABLE;
+
+@property (nonatomic, copy) NSNumber * _Nullable breadcrumb MTR_PROVISIONALLY_AVAILABLE;
+/**
+ * Controls whether the command is a timed command (using Timed Invoke).
+ *
+ * If nil (the default value), a regular invoke is done for commands that do
+ * not require a timed invoke and a timed invoke with some default timed request
+ * timeout is done for commands that require a timed invoke.
+ *
+ * If not nil, a timed invoke is done, with the provided value used as the timed
+ * request timeout. The value should be chosen small enough to provide the
+ * desired security properties but large enough that it will allow a round-trip
+ * from the sever to the client (for the status response and actual invoke
+ * request) within the timeout window.
+ *
+ */
+@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs;
+
+/**
+ * Controls how much time, in seconds, we will allow for the server to process the command.
+ *
+ * The command will then time out if that much time, plus an allowance for retransmits due to network failures, passes.
+ *
+ * If nil, the framework will try to select an appropriate timeout value itself.
+ */
+@property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout;
+@end
+
+MTR_PROVISIONALLY_AVAILABLE
+@interface MTRThreadBorderRouterManagementClusterSetPendingDatasetRequestParams : NSObject
+
+@property (nonatomic, copy) NSData * _Nonnull pendingDataset MTR_PROVISIONALLY_AVAILABLE;
+/**
+ * Controls whether the command is a timed command (using Timed Invoke).
+ *
+ * If nil (the default value), a regular invoke is done for commands that do
+ * not require a timed invoke and a timed invoke with some default timed request
+ * timeout is done for commands that require a timed invoke.
+ *
+ * If not nil, a timed invoke is done, with the provided value used as the timed
+ * request timeout. The value should be chosen small enough to provide the
+ * desired security properties but large enough that it will allow a round-trip
+ * from the sever to the client (for the status response and actual invoke
+ * request) within the timeout window.
+ *
+ */
+@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs;
+
+/**
+ * Controls how much time, in seconds, we will allow for the server to process the command.
+ *
+ * The command will then time out if that much time, plus an allowance for retransmits due to network failures, passes.
+ *
+ * If nil, the framework will try to select an appropriate timeout value itself.
+ */
+@property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout;
+@end
+
MTR_PROVISIONALLY_AVAILABLE
@interface MTRThreadNetworkDirectoryClusterAddNetworkParams : NSObject
diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm
index 689b7382ab3fb5..6b5e97c4ce308a 100644
--- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm
+++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm
@@ -24120,6 +24120,398 @@ - (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::WiFiNetw
@end
+@implementation MTRThreadBorderRouterManagementClusterGetActiveDatasetRequestParams
+- (instancetype)init
+{
+ if (self = [super init]) {
+ _timedInvokeTimeoutMs = nil;
+ _serverSideProcessingTimeout = nil;
+ }
+ return self;
+}
+
+- (id)copyWithZone:(NSZone * _Nullable)zone;
+{
+ auto other = [[MTRThreadBorderRouterManagementClusterGetActiveDatasetRequestParams alloc] init];
+
+ other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs;
+ other.serverSideProcessingTimeout = self.serverSideProcessingTimeout;
+
+ return other;
+}
+
+- (NSString *)description
+{
+ NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])];
+ return descriptionString;
+}
+
+@end
+
+@implementation MTRThreadBorderRouterManagementClusterGetActiveDatasetRequestParams (InternalMethods)
+
+- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader
+{
+ chip::app::Clusters::ThreadBorderRouterManagement::Commands::GetActiveDatasetRequest::Type encodableStruct;
+ ListFreer listFreer;
+
+ auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0);
+ if (buffer.IsNull()) {
+ return CHIP_ERROR_NO_MEMORY;
+ }
+
+ chip::System::PacketBufferTLVWriter writer;
+ // Commands never need chained buffers, since they cannot be chunked.
+ writer.Init(std::move(buffer), /* useChainedBuffers = */ false);
+
+ ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::AnonymousTag(), encodableStruct));
+
+ ReturnErrorOnFailure(writer.Finalize(&buffer));
+
+ reader.Init(std::move(buffer));
+ return reader.Next(chip::TLV::kTLVType_Structure, chip::TLV::AnonymousTag());
+}
+
+- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error
+{
+ chip::System::PacketBufferTLVReader reader;
+ CHIP_ERROR err = [self _encodeToTLVReader:reader];
+ if (err != CHIP_NO_ERROR) {
+ if (error) {
+ *error = [MTRError errorForCHIPErrorCode:err];
+ }
+ return nil;
+ }
+
+ auto decodedObj = MTRDecodeDataValueDictionaryFromCHIPTLV(&reader);
+ if (decodedObj == nil) {
+ if (error) {
+ *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE];
+ }
+ }
+ return decodedObj;
+}
+@end
+
+@implementation MTRThreadBorderRouterManagementClusterGetPendingDatasetRequestParams
+- (instancetype)init
+{
+ if (self = [super init]) {
+ _timedInvokeTimeoutMs = nil;
+ _serverSideProcessingTimeout = nil;
+ }
+ return self;
+}
+
+- (id)copyWithZone:(NSZone * _Nullable)zone;
+{
+ auto other = [[MTRThreadBorderRouterManagementClusterGetPendingDatasetRequestParams alloc] init];
+
+ other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs;
+ other.serverSideProcessingTimeout = self.serverSideProcessingTimeout;
+
+ return other;
+}
+
+- (NSString *)description
+{
+ NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])];
+ return descriptionString;
+}
+
+@end
+
+@implementation MTRThreadBorderRouterManagementClusterGetPendingDatasetRequestParams (InternalMethods)
+
+- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader
+{
+ chip::app::Clusters::ThreadBorderRouterManagement::Commands::GetPendingDatasetRequest::Type encodableStruct;
+ ListFreer listFreer;
+
+ auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0);
+ if (buffer.IsNull()) {
+ return CHIP_ERROR_NO_MEMORY;
+ }
+
+ chip::System::PacketBufferTLVWriter writer;
+ // Commands never need chained buffers, since they cannot be chunked.
+ writer.Init(std::move(buffer), /* useChainedBuffers = */ false);
+
+ ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::AnonymousTag(), encodableStruct));
+
+ ReturnErrorOnFailure(writer.Finalize(&buffer));
+
+ reader.Init(std::move(buffer));
+ return reader.Next(chip::TLV::kTLVType_Structure, chip::TLV::AnonymousTag());
+}
+
+- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error
+{
+ chip::System::PacketBufferTLVReader reader;
+ CHIP_ERROR err = [self _encodeToTLVReader:reader];
+ if (err != CHIP_NO_ERROR) {
+ if (error) {
+ *error = [MTRError errorForCHIPErrorCode:err];
+ }
+ return nil;
+ }
+
+ auto decodedObj = MTRDecodeDataValueDictionaryFromCHIPTLV(&reader);
+ if (decodedObj == nil) {
+ if (error) {
+ *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE];
+ }
+ }
+ return decodedObj;
+}
+@end
+
+@implementation MTRThreadBorderRouterManagementClusterDatasetResponseParams
+- (instancetype)init
+{
+ if (self = [super init]) {
+
+ _dataset = [NSData data];
+ }
+ return self;
+}
+
+- (id)copyWithZone:(NSZone * _Nullable)zone;
+{
+ auto other = [[MTRThreadBorderRouterManagementClusterDatasetResponseParams alloc] init];
+
+ other.dataset = self.dataset;
+
+ return other;
+}
+
+- (NSString *)description
+{
+ NSString * descriptionString = [NSString stringWithFormat:@"<%@: dataset:%@; >", NSStringFromClass([self class]), [_dataset base64EncodedStringWithOptions:0]];
+ return descriptionString;
+}
+
+- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue
+ error:(NSError * __autoreleasing *)error
+{
+ if (!(self = [super init])) {
+ return nil;
+ }
+
+ using DecodableType = chip::app::Clusters::ThreadBorderRouterManagement::Commands::DatasetResponse::DecodableType;
+ chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue
+ clusterID:DecodableType::GetClusterId()
+ commandID:DecodableType::GetCommandId()
+ error:error];
+ if (buffer.IsNull()) {
+ return nil;
+ }
+
+ chip::TLV::TLVReader reader;
+ reader.Init(buffer->Start(), buffer->DataLength());
+
+ CHIP_ERROR err = reader.Next(chip::TLV::AnonymousTag());
+ if (err == CHIP_NO_ERROR) {
+ DecodableType decodedStruct;
+ err = chip::app::DataModel::Decode(reader, decodedStruct);
+ if (err == CHIP_NO_ERROR) {
+ err = [self _setFieldsFromDecodableStruct:decodedStruct];
+ if (err == CHIP_NO_ERROR) {
+ return self;
+ }
+ }
+ }
+
+ NSString * errorStr = [NSString stringWithFormat:@"Command payload decoding failed: %s", err.AsString()];
+ MTR_LOG_ERROR("%s", errorStr.UTF8String);
+ if (error != nil) {
+ NSDictionary * userInfo = @{ NSLocalizedFailureReasonErrorKey : NSLocalizedString(errorStr, nil) };
+ *error = [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeSchemaMismatch userInfo:userInfo];
+ }
+ return nil;
+}
+
+@end
+
+@implementation MTRThreadBorderRouterManagementClusterDatasetResponseParams (InternalMethods)
+
+- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::ThreadBorderRouterManagement::Commands::DatasetResponse::DecodableType &)decodableStruct
+{
+ {
+ self.dataset = AsData(decodableStruct.dataset);
+ }
+ return CHIP_NO_ERROR;
+}
+
+@end
+
+@implementation MTRThreadBorderRouterManagementClusterSetActiveDatasetRequestParams
+- (instancetype)init
+{
+ if (self = [super init]) {
+
+ _activeDataset = [NSData data];
+
+ _breadcrumb = nil;
+ _timedInvokeTimeoutMs = nil;
+ _serverSideProcessingTimeout = nil;
+ }
+ return self;
+}
+
+- (id)copyWithZone:(NSZone * _Nullable)zone;
+{
+ auto other = [[MTRThreadBorderRouterManagementClusterSetActiveDatasetRequestParams alloc] init];
+
+ other.activeDataset = self.activeDataset;
+ other.breadcrumb = self.breadcrumb;
+ other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs;
+ other.serverSideProcessingTimeout = self.serverSideProcessingTimeout;
+
+ return other;
+}
+
+- (NSString *)description
+{
+ NSString * descriptionString = [NSString stringWithFormat:@"<%@: activeDataset:%@; breadcrumb:%@; >", NSStringFromClass([self class]), [_activeDataset base64EncodedStringWithOptions:0], _breadcrumb];
+ return descriptionString;
+}
+
+@end
+
+@implementation MTRThreadBorderRouterManagementClusterSetActiveDatasetRequestParams (InternalMethods)
+
+- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader
+{
+ chip::app::Clusters::ThreadBorderRouterManagement::Commands::SetActiveDatasetRequest::Type encodableStruct;
+ ListFreer listFreer;
+ {
+ encodableStruct.activeDataset = AsByteSpan(self.activeDataset);
+ }
+ {
+ if (self.breadcrumb != nil) {
+ auto & definedValue_0 = encodableStruct.breadcrumb.Emplace();
+ definedValue_0 = self.breadcrumb.unsignedLongLongValue;
+ }
+ }
+
+ auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0);
+ if (buffer.IsNull()) {
+ return CHIP_ERROR_NO_MEMORY;
+ }
+
+ chip::System::PacketBufferTLVWriter writer;
+ // Commands never need chained buffers, since they cannot be chunked.
+ writer.Init(std::move(buffer), /* useChainedBuffers = */ false);
+
+ ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::AnonymousTag(), encodableStruct));
+
+ ReturnErrorOnFailure(writer.Finalize(&buffer));
+
+ reader.Init(std::move(buffer));
+ return reader.Next(chip::TLV::kTLVType_Structure, chip::TLV::AnonymousTag());
+}
+
+- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error
+{
+ chip::System::PacketBufferTLVReader reader;
+ CHIP_ERROR err = [self _encodeToTLVReader:reader];
+ if (err != CHIP_NO_ERROR) {
+ if (error) {
+ *error = [MTRError errorForCHIPErrorCode:err];
+ }
+ return nil;
+ }
+
+ auto decodedObj = MTRDecodeDataValueDictionaryFromCHIPTLV(&reader);
+ if (decodedObj == nil) {
+ if (error) {
+ *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE];
+ }
+ }
+ return decodedObj;
+}
+@end
+
+@implementation MTRThreadBorderRouterManagementClusterSetPendingDatasetRequestParams
+- (instancetype)init
+{
+ if (self = [super init]) {
+
+ _pendingDataset = [NSData data];
+ _timedInvokeTimeoutMs = nil;
+ _serverSideProcessingTimeout = nil;
+ }
+ return self;
+}
+
+- (id)copyWithZone:(NSZone * _Nullable)zone;
+{
+ auto other = [[MTRThreadBorderRouterManagementClusterSetPendingDatasetRequestParams alloc] init];
+
+ other.pendingDataset = self.pendingDataset;
+ other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs;
+ other.serverSideProcessingTimeout = self.serverSideProcessingTimeout;
+
+ return other;
+}
+
+- (NSString *)description
+{
+ NSString * descriptionString = [NSString stringWithFormat:@"<%@: pendingDataset:%@; >", NSStringFromClass([self class]), [_pendingDataset base64EncodedStringWithOptions:0]];
+ return descriptionString;
+}
+
+@end
+
+@implementation MTRThreadBorderRouterManagementClusterSetPendingDatasetRequestParams (InternalMethods)
+
+- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader
+{
+ chip::app::Clusters::ThreadBorderRouterManagement::Commands::SetPendingDatasetRequest::Type encodableStruct;
+ ListFreer listFreer;
+ {
+ encodableStruct.pendingDataset = AsByteSpan(self.pendingDataset);
+ }
+
+ auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0);
+ if (buffer.IsNull()) {
+ return CHIP_ERROR_NO_MEMORY;
+ }
+
+ chip::System::PacketBufferTLVWriter writer;
+ // Commands never need chained buffers, since they cannot be chunked.
+ writer.Init(std::move(buffer), /* useChainedBuffers = */ false);
+
+ ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::AnonymousTag(), encodableStruct));
+
+ ReturnErrorOnFailure(writer.Finalize(&buffer));
+
+ reader.Init(std::move(buffer));
+ return reader.Next(chip::TLV::kTLVType_Structure, chip::TLV::AnonymousTag());
+}
+
+- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error
+{
+ chip::System::PacketBufferTLVReader reader;
+ CHIP_ERROR err = [self _encodeToTLVReader:reader];
+ if (err != CHIP_NO_ERROR) {
+ if (error) {
+ *error = [MTRError errorForCHIPErrorCode:err];
+ }
+ return nil;
+ }
+
+ auto decodedObj = MTRDecodeDataValueDictionaryFromCHIPTLV(&reader);
+ if (decodedObj == nil) {
+ if (error) {
+ *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE];
+ }
+ }
+ return decodedObj;
+}
+@end
+
@implementation MTRThreadNetworkDirectoryClusterAddNetworkParams
- (instancetype)init
{
diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloads_Internal.h b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloads_Internal.h
index 5794e71a896729..36938c35dd5637 100644
--- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloads_Internal.h
+++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloads_Internal.h
@@ -1582,6 +1582,36 @@ NS_ASSUME_NONNULL_BEGIN
@end
+@interface MTRThreadBorderRouterManagementClusterGetActiveDatasetRequestParams (InternalMethods)
+
+- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error;
+
+@end
+
+@interface MTRThreadBorderRouterManagementClusterGetPendingDatasetRequestParams (InternalMethods)
+
+- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error;
+
+@end
+
+@interface MTRThreadBorderRouterManagementClusterDatasetResponseParams (InternalMethods)
+
+- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::ThreadBorderRouterManagement::Commands::DatasetResponse::DecodableType &)decodableStruct;
+
+@end
+
+@interface MTRThreadBorderRouterManagementClusterSetActiveDatasetRequestParams (InternalMethods)
+
+- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error;
+
+@end
+
+@interface MTRThreadBorderRouterManagementClusterSetPendingDatasetRequestParams (InternalMethods)
+
+- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error;
+
+@end
+
@interface MTRThreadNetworkDirectoryClusterAddNetworkParams (InternalMethods)
- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error;
diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandTimedCheck.mm b/src/darwin/Framework/CHIP/zap-generated/MTRCommandTimedCheck.mm
index ee4d2c1386bff0..f49e574232b544 100644
--- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandTimedCheck.mm
+++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandTimedCheck.mm
@@ -965,6 +965,15 @@ static BOOL CommandNeedsTimedInvokeInWiFiNetworkManagementCluster(AttributeId aA
}
}
}
+static BOOL CommandNeedsTimedInvokeInThreadBorderRouterManagementCluster(AttributeId aAttributeId)
+{
+ using namespace Clusters::ThreadBorderRouterManagement;
+ switch (aAttributeId) {
+ default: {
+ return NO;
+ }
+ }
+}
static BOOL CommandNeedsTimedInvokeInThreadNetworkDirectoryCluster(AttributeId aAttributeId)
{
using namespace Clusters::ThreadNetworkDirectory;
@@ -1449,6 +1458,9 @@ BOOL MTRCommandNeedsTimedInvoke(NSNumber * _Nonnull aClusterID, NSNumber * _Nonn
case Clusters::WiFiNetworkManagement::Id: {
return CommandNeedsTimedInvokeInWiFiNetworkManagementCluster(commandID);
}
+ case Clusters::ThreadBorderRouterManagement::Id: {
+ return CommandNeedsTimedInvokeInThreadBorderRouterManagementCluster(commandID);
+ }
case Clusters::ThreadNetworkDirectory::Id: {
return CommandNeedsTimedInvokeInThreadNetworkDirectoryCluster(commandID);
}
diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRDeviceTypeMetadata.mm b/src/darwin/Framework/CHIP/zap-generated/MTRDeviceTypeMetadata.mm
index 06042f32f9f1d8..e134bb52088d4b 100644
--- a/src/darwin/Framework/CHIP/zap-generated/MTRDeviceTypeMetadata.mm
+++ b/src/darwin/Framework/CHIP/zap-generated/MTRDeviceTypeMetadata.mm
@@ -97,6 +97,7 @@
{ 0x00000510, DeviceTypeClass::Utility, "Matter Electrical Sensor" },
{ 0x00000840, DeviceTypeClass::Simple, "Matter Control Bridge" },
{ 0x00000850, DeviceTypeClass::Simple, "Matter On/Off Sensor" },
+ { 0x00000091, DeviceTypeClass::Simple, "Matter Thread Border Router" },
};
static_assert(ExtractVendorFromMEI(0xFFF10001) != 0, "Must have class defined for \"Matter Orphan Clusters\" if it's a standard device type");
diff --git a/src/darwin/Framework/CHIP/zap-generated/MTREventTLVValueDecoder.mm b/src/darwin/Framework/CHIP/zap-generated/MTREventTLVValueDecoder.mm
index 69c23e1451e9b7..db48844fca89ee 100644
--- a/src/darwin/Framework/CHIP/zap-generated/MTREventTLVValueDecoder.mm
+++ b/src/darwin/Framework/CHIP/zap-generated/MTREventTLVValueDecoder.mm
@@ -4047,6 +4047,18 @@ static id _Nullable DecodeEventPayloadForWiFiNetworkManagementCluster(EventId aE
*aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB;
return nil;
}
+static id _Nullable DecodeEventPayloadForThreadBorderRouterManagementCluster(EventId aEventId, TLV::TLVReader & aReader, CHIP_ERROR * aError)
+{
+ using namespace Clusters::ThreadBorderRouterManagement;
+ switch (aEventId) {
+ default: {
+ break;
+ }
+ }
+
+ *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB;
+ return nil;
+}
static id _Nullable DecodeEventPayloadForThreadNetworkDirectoryCluster(EventId aEventId, TLV::TLVReader & aReader, CHIP_ERROR * aError)
{
using namespace Clusters::ThreadNetworkDirectory;
@@ -4880,6 +4892,9 @@ id _Nullable MTRDecodeEventPayload(const ConcreteEventPath & aPath, TLV::TLVRead
case Clusters::WiFiNetworkManagement::Id: {
return DecodeEventPayloadForWiFiNetworkManagementCluster(aPath.mEventId, aReader, aError);
}
+ case Clusters::ThreadBorderRouterManagement::Id: {
+ return DecodeEventPayloadForThreadBorderRouterManagementCluster(aPath.mEventId, aReader, aError);
+ }
case Clusters::ThreadNetworkDirectory::Id: {
return DecodeEventPayloadForThreadNetworkDirectoryCluster(aPath.mEventId, aReader, aError);
}
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 84233e5ad954d4..9a952b67e21b17 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
@@ -34669,6 +34669,386 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu
} // namespace Attributes
} // namespace WiFiNetworkManagement
+namespace ThreadBorderRouterManagement {
+namespace Attributes {
+
+namespace BorderRouterName {
+
+Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::MutableCharSpan & value)
+{
+ uint8_t zclString[63 + 1];
+ Protocols::InteractionModel::Status status =
+ emberAfReadAttribute(endpoint, Clusters::ThreadBorderRouterManagement::Id, Id, zclString, sizeof(zclString));
+ VerifyOrReturnError(Protocols::InteractionModel::Status::Success == status, status);
+ size_t length = emberAfStringLength(zclString);
+ if (length == NumericAttributeTraits::kNullValue)
+ {
+ return Protocols::InteractionModel::Status::ConstraintError;
+ }
+
+ VerifyOrReturnError(value.size() == 63, Protocols::InteractionModel::Status::InvalidDataType);
+ memcpy(value.data(), &zclString[1], 63);
+ value.reduce_size(length);
+ return status;
+}
+
+Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty)
+{
+
+ static_assert(63 < NumericAttributeTraits::kNullValue, "value.size() might be too big");
+ VerifyOrReturnError(value.size() <= 63, Protocols::InteractionModel::Status::ConstraintError);
+ uint8_t zclString[63 + 1];
+ auto length = static_cast(value.size());
+ Encoding::Put8(zclString, length);
+ memcpy(&zclString[1], value.data(), value.size());
+ return emberAfWriteAttribute(endpoint, Clusters::ThreadBorderRouterManagement::Id, Id, zclString,
+ ZCL_CHAR_STRING_ATTRIBUTE_TYPE, markDirty);
+}
+
+Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value)
+{
+
+ static_assert(63 < NumericAttributeTraits::kNullValue, "value.size() might be too big");
+ VerifyOrReturnError(value.size() <= 63, Protocols::InteractionModel::Status::ConstraintError);
+ uint8_t zclString[63 + 1];
+ auto length = static_cast(value.size());
+ Encoding::Put8(zclString, length);
+ memcpy(&zclString[1], value.data(), value.size());
+ return emberAfWriteAttribute(endpoint, Clusters::ThreadBorderRouterManagement::Id, Id, zclString,
+ ZCL_CHAR_STRING_ATTRIBUTE_TYPE);
+}
+
+} // namespace BorderRouterName
+
+namespace BorderAgentID {
+
+Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::MutableByteSpan & value)
+{
+ uint8_t zclString[254 + 1];
+ Protocols::InteractionModel::Status status =
+ emberAfReadAttribute(endpoint, Clusters::ThreadBorderRouterManagement::Id, Id, zclString, sizeof(zclString));
+ VerifyOrReturnError(Protocols::InteractionModel::Status::Success == status, status);
+ size_t length = emberAfStringLength(zclString);
+ if (length == NumericAttributeTraits::kNullValue)
+ {
+ return Protocols::InteractionModel::Status::ConstraintError;
+ }
+
+ VerifyOrReturnError(value.size() == 254, Protocols::InteractionModel::Status::InvalidDataType);
+ memcpy(value.data(), &zclString[1], 254);
+ value.reduce_size(length);
+ return status;
+}
+
+Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::ByteSpan value, MarkAttributeDirty markDirty)
+{
+
+ static_assert(254 < NumericAttributeTraits::kNullValue, "value.size() might be too big");
+ VerifyOrReturnError(value.size() <= 254, Protocols::InteractionModel::Status::ConstraintError);
+ uint8_t zclString[254 + 1];
+ auto length = static_cast(value.size());
+ Encoding::Put8(zclString, length);
+ memcpy(&zclString[1], value.data(), value.size());
+ return emberAfWriteAttribute(endpoint, Clusters::ThreadBorderRouterManagement::Id, Id, zclString,
+ ZCL_OCTET_STRING_ATTRIBUTE_TYPE, markDirty);
+}
+
+Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::ByteSpan value)
+{
+
+ static_assert(254 < NumericAttributeTraits::kNullValue, "value.size() might be too big");
+ VerifyOrReturnError(value.size() <= 254, Protocols::InteractionModel::Status::ConstraintError);
+ uint8_t zclString[254 + 1];
+ auto length = static_cast(value.size());
+ Encoding::Put8(zclString, length);
+ memcpy(&zclString[1], value.data(), value.size());
+ return emberAfWriteAttribute(endpoint, Clusters::ThreadBorderRouterManagement::Id, Id, zclString,
+ ZCL_OCTET_STRING_ATTRIBUTE_TYPE);
+}
+
+} // namespace BorderAgentID
+
+namespace ThreadVersion {
+
+Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value)
+{
+ using Traits = NumericAttributeTraits;
+ Traits::StorageType temp;
+ uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp);
+ Protocols::InteractionModel::Status status =
+ emberAfReadAttribute(endpoint, Clusters::ThreadBorderRouterManagement::Id, Id, readable, sizeof(temp));
+ VerifyOrReturnError(Protocols::InteractionModel::Status::Success == status, status);
+ if (!Traits::CanRepresentValue(/* isNullable = */ false, temp))
+ {
+ return Protocols::InteractionModel::Status::ConstraintError;
+ }
+ *value = Traits::StorageToWorking(temp);
+ return status;
+}
+
+Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty)
+{
+ using Traits = NumericAttributeTraits;
+ if (!Traits::CanRepresentValue(/* isNullable = */ false, value))
+ {
+ return Protocols::InteractionModel::Status::ConstraintError;
+ }
+ Traits::StorageType storageValue;
+ Traits::WorkingToStorage(value, storageValue);
+ uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue);
+ return emberAfWriteAttribute(endpoint, Clusters::ThreadBorderRouterManagement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE,
+ markDirty);
+}
+
+Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value)
+{
+ using Traits = NumericAttributeTraits;
+ if (!Traits::CanRepresentValue(/* isNullable = */ false, value))
+ {
+ return Protocols::InteractionModel::Status::ConstraintError;
+ }
+ Traits::StorageType storageValue;
+ Traits::WorkingToStorage(value, storageValue);
+ uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue);
+ return emberAfWriteAttribute(endpoint, Clusters::ThreadBorderRouterManagement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE);
+}
+
+} // namespace ThreadVersion
+
+namespace InterfaceEnabled {
+
+Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value)
+{
+ using Traits = NumericAttributeTraits;
+ Traits::StorageType temp;
+ uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp);
+ Protocols::InteractionModel::Status status =
+ emberAfReadAttribute(endpoint, Clusters::ThreadBorderRouterManagement::Id, Id, readable, sizeof(temp));
+ VerifyOrReturnError(Protocols::InteractionModel::Status::Success == status, status);
+ if (!Traits::CanRepresentValue(/* isNullable = */ false, temp))
+ {
+ return Protocols::InteractionModel::Status::ConstraintError;
+ }
+ *value = Traits::StorageToWorking(temp);
+ return status;
+}
+
+Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty)
+{
+ using Traits = NumericAttributeTraits;
+ if (!Traits::CanRepresentValue(/* isNullable = */ false, value))
+ {
+ return Protocols::InteractionModel::Status::ConstraintError;
+ }
+ Traits::StorageType storageValue;
+ Traits::WorkingToStorage(value, storageValue);
+ uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue);
+ return emberAfWriteAttribute(endpoint, Clusters::ThreadBorderRouterManagement::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE,
+ markDirty);
+}
+
+Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value)
+{
+ using Traits = NumericAttributeTraits;
+ if (!Traits::CanRepresentValue(/* isNullable = */ false, value))
+ {
+ return Protocols::InteractionModel::Status::ConstraintError;
+ }
+ Traits::StorageType storageValue;
+ Traits::WorkingToStorage(value, storageValue);
+ uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue);
+ return emberAfWriteAttribute(endpoint, Clusters::ThreadBorderRouterManagement::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE);
+}
+
+} // namespace InterfaceEnabled
+
+namespace ActiveDatasetTimestamp {
+
+Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value)
+{
+ using Traits = NumericAttributeTraits;
+ Traits::StorageType temp;
+ uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp);
+ Protocols::InteractionModel::Status status =
+ emberAfReadAttribute(endpoint, Clusters::ThreadBorderRouterManagement::Id, Id, readable, sizeof(temp));
+ VerifyOrReturnError(Protocols::InteractionModel::Status::Success == status, status);
+ if (Traits::IsNullValue(temp))
+ {
+ value.SetNull();
+ }
+ else
+ {
+ value.SetNonNull() = Traits::StorageToWorking(temp);
+ }
+ return status;
+}
+
+Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t value, MarkAttributeDirty markDirty)
+{
+ using Traits = NumericAttributeTraits;
+ if (!Traits::CanRepresentValue(/* isNullable = */ true, value))
+ {
+ return Protocols::InteractionModel::Status::ConstraintError;
+ }
+ Traits::StorageType storageValue;
+ Traits::WorkingToStorage(value, storageValue);
+ uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue);
+ return emberAfWriteAttribute(endpoint, Clusters::ThreadBorderRouterManagement::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE,
+ markDirty);
+}
+
+Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t value)
+{
+ using Traits = NumericAttributeTraits;
+ if (!Traits::CanRepresentValue(/* isNullable = */ true, value))
+ {
+ return Protocols::InteractionModel::Status::ConstraintError;
+ }
+ Traits::StorageType storageValue;
+ Traits::WorkingToStorage(value, storageValue);
+ uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue);
+ return emberAfWriteAttribute(endpoint, Clusters::ThreadBorderRouterManagement::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE);
+}
+
+Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty)
+{
+ using Traits = NumericAttributeTraits;
+ Traits::StorageType value;
+ Traits::SetNull(value);
+ uint8_t * writable = Traits::ToAttributeStoreRepresentation(value);
+ return emberAfWriteAttribute(endpoint, Clusters::ThreadBorderRouterManagement::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE,
+ markDirty);
+}
+
+Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint)
+{
+ using Traits = NumericAttributeTraits;
+ Traits::StorageType value;
+ Traits::SetNull(value);
+ uint8_t * writable = Traits::ToAttributeStoreRepresentation(value);
+ return emberAfWriteAttribute(endpoint, Clusters::ThreadBorderRouterManagement::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE);
+}
+
+Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value,
+ MarkAttributeDirty markDirty)
+{
+ if (value.IsNull())
+ {
+ return SetNull(endpoint, markDirty);
+ }
+
+ return Set(endpoint, value.Value(), markDirty);
+}
+
+Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value)
+{
+ if (value.IsNull())
+ {
+ return SetNull(endpoint);
+ }
+
+ return Set(endpoint, value.Value());
+}
+
+} // namespace ActiveDatasetTimestamp
+
+namespace FeatureMap {
+
+Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value)
+{
+ using Traits = NumericAttributeTraits;
+ Traits::StorageType temp;
+ uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp);
+ Protocols::InteractionModel::Status status =
+ emberAfReadAttribute(endpoint, Clusters::ThreadBorderRouterManagement::Id, Id, readable, sizeof(temp));
+ VerifyOrReturnError(Protocols::InteractionModel::Status::Success == status, status);
+ if (!Traits::CanRepresentValue(/* isNullable = */ false, temp))
+ {
+ return Protocols::InteractionModel::Status::ConstraintError;
+ }
+ *value = Traits::StorageToWorking(temp);
+ return status;
+}
+
+Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty)
+{
+ using Traits = NumericAttributeTraits;
+ if (!Traits::CanRepresentValue(/* isNullable = */ false, value))
+ {
+ return Protocols::InteractionModel::Status::ConstraintError;
+ }
+ Traits::StorageType storageValue;
+ Traits::WorkingToStorage(value, storageValue);
+ uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue);
+ return emberAfWriteAttribute(endpoint, Clusters::ThreadBorderRouterManagement::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE,
+ markDirty);
+}
+
+Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value)
+{
+ using Traits = NumericAttributeTraits