From f2700cb75f5dac093a32952166378b194ed0ffb8 Mon Sep 17 00:00:00 2001 From: Paul Zander Date: Mon, 22 Nov 2021 12:39:29 +0100 Subject: [PATCH 1/4] Update Basic Information cluster --- .../all-clusters-common/all-clusters-app.zap | 23 ++- .../bridge-app/bridge-common/bridge-app.zap | 4 +- .../lighting-common/lighting-app.zap | 21 ++- examples/lock-app/lock-common/lock-app.zap | 4 +- .../ota-provider-common/ota-provider-app.zap | 2 +- .../ota-requestor-app.zap | 2 +- .../placeholder/linux/apps/app1/config.zap | 4 +- .../placeholder/linux/apps/app2/config.zap | 4 +- examples/pump-app/pump-common/pump-app.zap | 4 +- .../pump-controller-app.zap | 4 +- .../esp32/main/temperature-measurement.zap | 4 +- .../thermostat-common/thermostat.zap | 21 ++- examples/tv-app/tv-common/tv-app.zap | 17 +- .../tv-casting-common/tv-casting-app.zap | 23 ++- examples/window-app/common/window-app.zap | 6 +- .../clusterclient/BasicClientFragment.kt | 38 ++--- .../main/res/layout/basic_client_fragment.xml | 12 +- .../app/src/main/res/values/strings.xml | 2 +- .../suites/certification/Test_TC_DM_1_1.yaml | 13 +- .../Test_TC_DM_1_3_Simulated.yaml | 8 +- .../chip/basic-information-cluster.xml | 4 +- .../data_model/controller-clusters.zap | 19 ++- .../java/zap-generated/CHIPClusters-JNI.cpp | 12 +- .../zap-generated/CHIPClustersRead-JNI.cpp | 35 ++++- .../chip/devicecontroller/ChipClusters.java | 31 ++-- .../devicecontroller/ClusterReadMapping.java | 22 ++- .../devicecontroller/ClusterWriteMapping.java | 14 +- .../python/chip/clusters/CHIPClusters.cpp | 17 +- .../python/chip/clusters/CHIPClusters.py | 34 ++-- .../python/chip/clusters/Objects.py | 18 ++- .../python/test/test_scripts/base.py | 4 +- .../test/test_scripts/cluster_objects.py | 4 +- .../CHIP/zap-generated/CHIPClustersObjc.h | 10 +- .../CHIP/zap-generated/CHIPClustersObjc.mm | 23 ++- .../CHIP/zap-generated/CHIPTestClustersObjc.h | 1 + .../zap-generated/CHIPTestClustersObjc.mm | 13 ++ .../Framework/CHIPTests/CHIPClustersTests.m | 32 +++- .../zap-generated/endpoint_config.h | 145 +++++++++--------- .../app-common/zap-generated/attribute-id.h | 3 +- .../zap-generated/attributes/Accessors.cpp | 34 +++- .../zap-generated/attributes/Accessors.h | 9 +- .../zap-generated/cluster-objects.h | 17 +- .../app-common/zap-generated/ids/Attributes.h | 8 +- .../zap-generated/endpoint_config.h | 2 +- .../zap-generated/cluster/Commands.h | 78 +++++++--- .../zap-generated/reporting/Commands.h | 6 +- .../chip-tool/zap-generated/test/Commands.h | 56 +++++-- .../zap-generated/CHIPClusters.cpp | 24 ++- .../zap-generated/CHIPClusters.h | 9 +- .../zap-generated/tests/CHIPClustersTest.cpp | 10 ++ .../zap-generated/tests/CHIPClustersTest.h | 2 + .../zap-generated/endpoint_config.h | 59 +++---- .../lock-app/zap-generated/endpoint_config.h | 2 +- .../app1/zap-generated/endpoint_config.h | 4 +- .../app1/zap-generated/test/Commands.h | 27 +++- .../app2/zap-generated/endpoint_config.h | 4 +- .../app2/zap-generated/test/Commands.h | 27 +++- .../pump-app/zap-generated/endpoint_config.h | 2 +- .../zap-generated/endpoint_config.h | 2 +- .../zap-generated/endpoint_config.h | 2 +- .../zap-generated/endpoint_config.h | 61 ++++---- .../tv-app/zap-generated/endpoint_config.h | 101 ++++++------ .../zap-generated/endpoint_config.h | 121 +++++++-------- .../zap-generated/endpoint_config.h | 2 +- 64 files changed, 874 insertions(+), 452 deletions(-) diff --git a/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap b/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap index b0cae7778e022d..8ddede44e499fe 100644 --- a/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap +++ b/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap @@ -1015,7 +1015,7 @@ "reportableChange": 0 }, { - "name": "UserLabel", + "name": "NodeLabel", "code": 5, "mfgCode": null, "side": "server", @@ -1209,6 +1209,21 @@ "maxInterval": 65344, "reportableChange": 0 }, + { + "name": "UniqueId", + "code": 18, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, @@ -8281,7 +8296,7 @@ "reportableChange": 0 }, { - "name": "UserLabel", + "name": "NodeLabel", "code": 5, "mfgCode": null, "side": "server", @@ -9147,7 +9162,7 @@ "reportableChange": 0 }, { - "name": "UserLabel", + "name": "NodeLabel", "code": 5, "mfgCode": null, "side": "server", @@ -17396,7 +17411,7 @@ "reportableChange": 0 }, { - "name": "UserLabel", + "name": "NodeLabel", "code": 5, "mfgCode": null, "side": "server", diff --git a/examples/bridge-app/bridge-common/bridge-app.zap b/examples/bridge-app/bridge-common/bridge-app.zap index 78330a70bd0690..b4b3219c82600f 100644 --- a/examples/bridge-app/bridge-common/bridge-app.zap +++ b/examples/bridge-app/bridge-common/bridge-app.zap @@ -284,7 +284,7 @@ "reportableChange": 0 }, { - "name": "UserLabel", + "name": "NodeLabel", "code": 5, "mfgCode": null, "side": "server", @@ -3905,7 +3905,7 @@ "reportableChange": 0 }, { - "name": "UserLabel", + "name": "NodeLabel", "code": 5, "mfgCode": null, "side": "server", diff --git a/examples/lighting-app/lighting-common/lighting-app.zap b/examples/lighting-app/lighting-common/lighting-app.zap index 9f2bb1b57128c3..c2ffa57feff5ad 100644 --- a/examples/lighting-app/lighting-common/lighting-app.zap +++ b/examples/lighting-app/lighting-common/lighting-app.zap @@ -1065,7 +1065,7 @@ "reportableChange": 0 }, { - "name": "UserLabel", + "name": "NodeLabel", "code": 5, "mfgCode": null, "side": "server", @@ -1259,6 +1259,21 @@ "maxInterval": 65344, "reportableChange": 0 }, + { + "name": "UniqueId", + "code": 18, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, @@ -5059,7 +5074,7 @@ "reportableChange": 0 }, { - "name": "UserLabel", + "name": "NodeLabel", "code": 5, "mfgCode": null, "side": "server", @@ -6249,7 +6264,7 @@ "reportableChange": 0 }, { - "name": "UserLabel", + "name": "NodeLabel", "code": 5, "mfgCode": null, "side": "server", diff --git a/examples/lock-app/lock-common/lock-app.zap b/examples/lock-app/lock-common/lock-app.zap index 7e56b63e5792fe..55c5cb698e9c2a 100644 --- a/examples/lock-app/lock-common/lock-app.zap +++ b/examples/lock-app/lock-common/lock-app.zap @@ -1078,7 +1078,7 @@ "reportableChange": 0 }, { - "name": "UserLabel", + "name": "NodeLabel", "code": 5, "mfgCode": null, "side": "server", @@ -4879,7 +4879,7 @@ "reportableChange": 0 }, { - "name": "UserLabel", + "name": "NodeLabel", "code": 5, "mfgCode": null, "side": "server", diff --git a/examples/ota-provider-app/ota-provider-common/ota-provider-app.zap b/examples/ota-provider-app/ota-provider-common/ota-provider-app.zap index 0b71a6a9ee227d..e659bf498b068c 100644 --- a/examples/ota-provider-app/ota-provider-common/ota-provider-app.zap +++ b/examples/ota-provider-app/ota-provider-common/ota-provider-app.zap @@ -880,7 +880,7 @@ "reportableChange": 0 }, { - "name": "UserLabel", + "name": "NodeLabel", "code": 5, "mfgCode": null, "side": "server", diff --git a/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.zap b/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.zap index ea836ba2888185..c49ec04e1b4f58 100644 --- a/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.zap +++ b/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.zap @@ -880,7 +880,7 @@ "reportableChange": 0 }, { - "name": "UserLabel", + "name": "NodeLabel", "code": 5, "mfgCode": null, "side": "server", diff --git a/examples/placeholder/linux/apps/app1/config.zap b/examples/placeholder/linux/apps/app1/config.zap index f11cef71e2b8b8..2b6fdfb3150d9c 100644 --- a/examples/placeholder/linux/apps/app1/config.zap +++ b/examples/placeholder/linux/apps/app1/config.zap @@ -284,7 +284,7 @@ "reportableChange": 0 }, { - "name": "UserLabel", + "name": "NodeLabel", "code": 5, "mfgCode": null, "side": "server", @@ -1597,7 +1597,7 @@ "reportableChange": 0 }, { - "name": "UserLabel", + "name": "NodeLabel", "code": 5, "mfgCode": null, "side": "server", diff --git a/examples/placeholder/linux/apps/app2/config.zap b/examples/placeholder/linux/apps/app2/config.zap index 2d968de21f67d3..ec1a2cb4bf1e96 100644 --- a/examples/placeholder/linux/apps/app2/config.zap +++ b/examples/placeholder/linux/apps/app2/config.zap @@ -284,7 +284,7 @@ "reportableChange": 0 }, { - "name": "UserLabel", + "name": "NodeLabel", "code": 5, "mfgCode": null, "side": "server", @@ -1597,7 +1597,7 @@ "reportableChange": 0 }, { - "name": "UserLabel", + "name": "NodeLabel", "code": 5, "mfgCode": null, "side": "server", diff --git a/examples/pump-app/pump-common/pump-app.zap b/examples/pump-app/pump-common/pump-app.zap index 296153e326f25e..9b43d961102020 100644 --- a/examples/pump-app/pump-common/pump-app.zap +++ b/examples/pump-app/pump-common/pump-app.zap @@ -992,7 +992,7 @@ "reportableChange": 0 }, { - "name": "UserLabel", + "name": "NodeLabel", "code": 5, "mfgCode": null, "side": "server", @@ -5000,7 +5000,7 @@ "reportableChange": 0 }, { - "name": "UserLabel", + "name": "NodeLabel", "code": 5, "mfgCode": null, "side": "server", diff --git a/examples/pump-controller-app/pump-controller-common/pump-controller-app.zap b/examples/pump-controller-app/pump-controller-common/pump-controller-app.zap index 6b15b519c14dd0..348583d9d65462 100644 --- a/examples/pump-controller-app/pump-controller-common/pump-controller-app.zap +++ b/examples/pump-controller-app/pump-controller-common/pump-controller-app.zap @@ -992,7 +992,7 @@ "reportableChange": 0 }, { - "name": "UserLabel", + "name": "NodeLabel", "code": 5, "mfgCode": null, "side": "server", @@ -5000,7 +5000,7 @@ "reportableChange": 0 }, { - "name": "UserLabel", + "name": "NodeLabel", "code": 5, "mfgCode": null, "side": "server", diff --git a/examples/temperature-measurement-app/esp32/main/temperature-measurement.zap b/examples/temperature-measurement-app/esp32/main/temperature-measurement.zap index 4ac628cdbe06f8..7f94045b1a9b81 100644 --- a/examples/temperature-measurement-app/esp32/main/temperature-measurement.zap +++ b/examples/temperature-measurement-app/esp32/main/temperature-measurement.zap @@ -686,7 +686,7 @@ "reportableChange": 0 }, { - "name": "UserLabel", + "name": "NodeLabel", "code": 5, "mfgCode": null, "side": "server", @@ -2834,7 +2834,7 @@ "reportableChange": 0 }, { - "name": "UserLabel", + "name": "NodeLabel", "code": 5, "mfgCode": null, "side": "server", diff --git a/examples/thermostat/thermostat-common/thermostat.zap b/examples/thermostat/thermostat-common/thermostat.zap index 8919f9048423f9..32e236689882ac 100644 --- a/examples/thermostat/thermostat-common/thermostat.zap +++ b/examples/thermostat/thermostat-common/thermostat.zap @@ -992,7 +992,7 @@ "reportableChange": 0 }, { - "name": "UserLabel", + "name": "NodeLabel", "code": 5, "mfgCode": null, "side": "server", @@ -1186,6 +1186,21 @@ "maxInterval": 65344, "reportableChange": 0 }, + { + "name": "UniqueId", + "code": 18, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, @@ -7722,7 +7737,7 @@ "reportableChange": 0 }, { - "name": "UserLabel", + "name": "NodeLabel", "code": 5, "mfgCode": null, "side": "server", @@ -8386,7 +8401,7 @@ "reportableChange": 0 }, { - "name": "UserLabel", + "name": "NodeLabel", "code": 5, "mfgCode": null, "side": "server", diff --git a/examples/tv-app/tv-common/tv-app.zap b/examples/tv-app/tv-common/tv-app.zap index 79b05f8ef8bb86..a45ca4c1c3386e 100644 --- a/examples/tv-app/tv-common/tv-app.zap +++ b/examples/tv-app/tv-common/tv-app.zap @@ -992,7 +992,7 @@ "reportableChange": 0 }, { - "name": "UserLabel", + "name": "NodeLabel", "code": 5, "mfgCode": null, "side": "server", @@ -1171,6 +1171,21 @@ "maxInterval": 65344, "reportableChange": 0 }, + { + "name": "UniqueId", + "code": 18, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, diff --git a/examples/tv-casting-app/tv-casting-common/tv-casting-app.zap b/examples/tv-casting-app/tv-casting-common/tv-casting-app.zap index 35504c270207fe..9d49c163384076 100644 --- a/examples/tv-casting-app/tv-casting-common/tv-casting-app.zap +++ b/examples/tv-casting-app/tv-casting-common/tv-casting-app.zap @@ -992,7 +992,7 @@ "reportableChange": 0 }, { - "name": "UserLabel", + "name": "NodeLabel", "code": 5, "mfgCode": null, "side": "server", @@ -1186,6 +1186,21 @@ "maxInterval": 65344, "reportableChange": 0 }, + { + "name": "UniqueId", + "code": 18, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, @@ -7722,7 +7737,7 @@ "reportableChange": 0 }, { - "name": "UserLabel", + "name": "NodeLabel", "code": 5, "mfgCode": null, "side": "server", @@ -8386,7 +8401,7 @@ "reportableChange": 0 }, { - "name": "UserLabel", + "name": "NodeLabel", "code": 5, "mfgCode": null, "side": "server", @@ -14570,7 +14585,7 @@ "reportableChange": 0 }, { - "name": "UserLabel", + "name": "NodeLabel", "code": 5, "mfgCode": null, "side": "server", diff --git a/examples/window-app/common/window-app.zap b/examples/window-app/common/window-app.zap index 0394b9cccac22e..ed4b90da2f4d95 100644 --- a/examples/window-app/common/window-app.zap +++ b/examples/window-app/common/window-app.zap @@ -759,7 +759,7 @@ "reportableChange": 0 }, { - "name": "UserLabel", + "name": "NodeLabel", "code": 5, "mfgCode": null, "side": "server", @@ -4173,7 +4173,7 @@ "reportableChange": 0 }, { - "name": "UserLabel", + "name": "NodeLabel", "code": 5, "mfgCode": null, "side": "server", @@ -6553,7 +6553,7 @@ "reportableChange": 0 }, { - "name": "UserLabel", + "name": "NodeLabel", "code": 5, "mfgCode": null, "side": "server", diff --git a/src/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/clusterclient/BasicClientFragment.kt b/src/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/clusterclient/BasicClientFragment.kt index 50d591a5e8f850..1be86202170969 100644 --- a/src/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/clusterclient/BasicClientFragment.kt +++ b/src/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/clusterclient/BasicClientFragment.kt @@ -18,12 +18,12 @@ import com.google.chip.chiptool.R import kotlinx.android.synthetic.main.basic_client_fragment.attributeNameSpinner import kotlinx.android.synthetic.main.basic_client_fragment.basicClusterCommandStatus import kotlinx.android.synthetic.main.basic_client_fragment.locationEd -import kotlinx.android.synthetic.main.basic_client_fragment.userLabelEd +import kotlinx.android.synthetic.main.basic_client_fragment.nodeLabelEd import kotlinx.android.synthetic.main.basic_client_fragment.view.attributeNameSpinner import kotlinx.android.synthetic.main.basic_client_fragment.view.readAttributeBtn import kotlinx.android.synthetic.main.basic_client_fragment.view.writeLocalConfigDisabledSwitch import kotlinx.android.synthetic.main.basic_client_fragment.view.writeLocationBtn -import kotlinx.android.synthetic.main.basic_client_fragment.view.writeUserLabelBtn +import kotlinx.android.synthetic.main.basic_client_fragment.view.writeNodeLabelBtn import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.launch @@ -48,9 +48,9 @@ class BasicClientFragment : Fragment() { addressUpdateFragment = childFragmentManager.findFragmentById(R.id.addressUpdateFragment) as AddressUpdateFragment - writeUserLabelBtn.setOnClickListener { scope.launch { - sendWriteUserLabelAttribute() - userLabelEd.onEditorAction(EditorInfo.IME_ACTION_DONE) + writeNodeLabelBtn.setOnClickListener { scope.launch { + sendWriteNodeLabelAttribute() + nodeLabelEd.onEditorAction(EditorInfo.IME_ACTION_DONE) }} writeLocationBtn.setOnClickListener { scope.launch { sendWriteLocationAttribute() @@ -111,7 +111,7 @@ class BasicClientFragment : Fragment() { getString(R.string.basic_cluster_vendor_id_text) -> sendReadVendorIDAttribute() getString(R.string.basic_cluster_product_name_text) -> sendReadProductNameAttribute() getString(R.string.basic_cluster_product_id_text) -> sendReadProductIDAttribute() - getString(R.string.basic_cluster_user_label_text) -> sendReadUserLabelAttribute() + getString(R.string.basic_cluster_node_label_text) -> sendReadNodeLabelAttribute() getString(R.string.basic_cluster_location_text) -> sendReadLocationAttribute() getString(R.string.basic_cluster_hardware_version_text) -> sendReadHardwareVersionAttribute() getString(R.string.basic_cluster_hardware_version_string_text) -> sendReadHardwareVersionStringAttribute() @@ -134,7 +134,7 @@ class BasicClientFragment : Fragment() { ATTRIBUTES.add(getString(R.string.basic_cluster_vendor_id_text)) ATTRIBUTES.add(getString(R.string.basic_cluster_product_name_text)) ATTRIBUTES.add(getString(R.string.basic_cluster_product_id_text)) - ATTRIBUTES.add(getString(R.string.basic_cluster_user_label_text)) + ATTRIBUTES.add(getString(R.string.basic_cluster_node_label_text)) ATTRIBUTES.add(getString(R.string.basic_cluster_location_text)) ATTRIBUTES.add(getString(R.string.basic_cluster_hardware_version_text)) ATTRIBUTES.add(getString(R.string.basic_cluster_hardware_version_string_text)) @@ -220,31 +220,31 @@ class BasicClientFragment : Fragment() { }) } - private suspend fun sendReadUserLabelAttribute() { - getBasicClusterForDevice().readUserLabelAttribute(object : ChipClusters.CharStringAttributeCallback { + private suspend fun sendReadNodeLabelAttribute() { + getBasicClusterForDevice().readNodeLabelAttribute(object : ChipClusters.CharStringAttributeCallback { override fun onSuccess(value: String) { - Log.i(TAG,"[Read Success] UserLabel: $value") - showMessage("[Read Success] UserLabel: $value") + Log.i(TAG,"[Read Success] NodeLabel: $value") + showMessage("[Read Success] NodeLabel: $value") } override fun onError(ex: Exception) { - showMessage("Read UserLabel failure $ex") - Log.e(TAG, "Read UserLabel failure", ex) + showMessage("Read NodeLabel failure $ex") + Log.e(TAG, "Read NodeLabel failure", ex) } }) } - private suspend fun sendWriteUserLabelAttribute() { - getBasicClusterForDevice().writeUserLabelAttribute(object : ChipClusters.DefaultClusterCallback { + private suspend fun sendWriteNodeLabelAttribute() { + getBasicClusterForDevice().writeNodeLabelAttribute(object : ChipClusters.DefaultClusterCallback { override fun onSuccess() { - showMessage("Write UserLabel success") + showMessage("Write NodeLabel success") } override fun onError(ex: Exception) { - showMessage("Write UserLabel failure $ex") - Log.e(TAG, "Write UserLabel failure", ex) + showMessage("Write NodeLabel failure $ex") + Log.e(TAG, "Write NodeLabel failure", ex) } - }, userLabelEd.text.toString()) + }, nodeLabelEd.text.toString()) } private suspend fun sendReadLocationAttribute() { diff --git a/src/android/CHIPTool/app/src/main/res/layout/basic_client_fragment.xml b/src/android/CHIPTool/app/src/main/res/layout/basic_client_fragment.xml index faec00244b3be0..a0c9b7919cad22 100644 --- a/src/android/CHIPTool/app/src/main/res/layout/basic_client_fragment.xml +++ b/src/android/CHIPTool/app/src/main/res/layout/basic_client_fragment.xml @@ -12,7 +12,7 @@ android:layout_alignParentTop="true" />