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..aa7de84bf23ce3 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/bridge-app/esp32/main/main.cpp b/examples/bridge-app/esp32/main/main.cpp index c83caa07ebcb5b..81f195230085cd 100644 --- a/examples/bridge-app/esp32/main/main.cpp +++ b/examples/bridge-app/esp32/main/main.cpp @@ -43,7 +43,7 @@ using namespace ::chip::Platform; static DeviceCallbacks AppCallback; -static const int kUserLabelSize = 32; +static const int kNodeLabelSize = 32; // Current ZCL implementation of Struct uses a max-size array of 254 bytes static const int kDescriptorAttributeArraySize = 254; static const int kFixedLabelAttributeArraySize = 254; @@ -87,7 +87,7 @@ DECLARE_DYNAMIC_ATTRIBUTE(ZCL_DEVICE_LIST_ATTRIBUTE_ID, ARRAY, kDescriptorAttrib // Declare Bridged Device Basic information cluster attributes DECLARE_DYNAMIC_ATTRIBUTE_LIST_BEGIN(bridgedDeviceBasicAttrs) -DECLARE_DYNAMIC_ATTRIBUTE(ZCL_USER_LABEL_ATTRIBUTE_ID, CHAR_STRING, kUserLabelSize, 0), /* UserLabel */ +DECLARE_DYNAMIC_ATTRIBUTE(ZCL_NODE_LABEL_ATTRIBUTE_ID, CHAR_STRING, kNodeLabelSize, 0), /* NodeLabel */ DECLARE_DYNAMIC_ATTRIBUTE(ZCL_REACHABLE_ATTRIBUTE_ID, BOOLEAN, 1, 0), /* Reachable */ DECLARE_DYNAMIC_ATTRIBUTE_LIST_END(); @@ -195,7 +195,7 @@ EmberAfStatus HandleReadBridgedDeviceBasicAttribute(Device * dev, chip::Attribut { *buffer = dev->IsReachable() ? 1 : 0; } - else if ((attributeId == ZCL_USER_LABEL_ATTRIBUTE_ID) && (maxReadLength == 32)) + else if ((attributeId == ZCL_NODE_LABEL_ATTRIBUTE_ID) && (maxReadLength == 32)) { ToZclCharString(buffer, dev->GetName(), static_cast(maxReadLength - 1)); } @@ -323,10 +323,10 @@ void HandleDeviceStatusChanged(Device * dev, Device::Changed_t itemChangedMask) if (itemChangedMask & Device::kChanged_Name) { - uint8_t zclName[kUserLabelSize]; - ToZclCharString(zclName, dev->GetName(), kUserLabelSize - 1); + uint8_t zclName[kNodeLabelSize + 1]; + ToZclCharString(zclName, dev->GetName(), kNodeLabelSize); MatterReportingAttributeChangeCallback(dev->GetEndpointId(), ZCL_BRIDGED_DEVICE_BASIC_CLUSTER_ID, - ZCL_USER_LABEL_ATTRIBUTE_ID, CLUSTER_MASK_SERVER, 0, ZCL_CHAR_STRING_ATTRIBUTE_TYPE, + ZCL_NODE_LABEL_ATTRIBUTE_ID, CLUSTER_MASK_SERVER, 0, ZCL_CHAR_STRING_ATTRIBUTE_TYPE, zclName); } if (itemChangedMask & Device::kChanged_Location) diff --git a/examples/bridge-app/linux/main.cpp b/examples/bridge-app/linux/main.cpp index 2339e88e2ba376..3f8ca3fceb3398 100644 --- a/examples/bridge-app/linux/main.cpp +++ b/examples/bridge-app/linux/main.cpp @@ -50,7 +50,7 @@ using namespace chip::Inet; using namespace chip::Transport; using namespace chip::DeviceLayer; -static const int kUserLabelSize = 32; +static const int kNodeLabelSize = 32; // Current ZCL implementation of Struct uses a max-size array of 254 bytes static const int kDescriptorAttributeArraySize = 254; static const int kFixedLabelAttributeArraySize = 254; @@ -107,7 +107,7 @@ DECLARE_DYNAMIC_ATTRIBUTE(ZCL_DEVICE_LIST_ATTRIBUTE_ID, ARRAY, kDescriptorAttrib // Declare Bridged Device Basic information cluster attributes DECLARE_DYNAMIC_ATTRIBUTE_LIST_BEGIN(bridgedDeviceBasicAttrs) -DECLARE_DYNAMIC_ATTRIBUTE(ZCL_USER_LABEL_ATTRIBUTE_ID, CHAR_STRING, kUserLabelSize, 0), /* UserLabel */ +DECLARE_DYNAMIC_ATTRIBUTE(ZCL_NODE_LABEL_ATTRIBUTE_ID, CHAR_STRING, kNodeLabelSize, 0), /* NodeLabel */ DECLARE_DYNAMIC_ATTRIBUTE(ZCL_REACHABLE_ATTRIBUTE_ID, BOOLEAN, 1, 0), /* Reachable */ DECLARE_DYNAMIC_ATTRIBUTE_LIST_END(); @@ -151,7 +151,7 @@ DECLARE_DYNAMIC_ATTRIBUTE(ZCL_DEVICE_LIST_ATTRIBUTE_ID, ARRAY, kDescriptorAttrib // Declare Bridged Device Basic information cluster attributes DECLARE_DYNAMIC_ATTRIBUTE_LIST_BEGIN(switchBridgedDeviceBasicAttrs) -DECLARE_DYNAMIC_ATTRIBUTE(ZCL_USER_LABEL_ATTRIBUTE_ID, CHAR_STRING, kUserLabelSize, 0), /* UserLabel */ +DECLARE_DYNAMIC_ATTRIBUTE(ZCL_NODE_LABEL_ATTRIBUTE_ID, CHAR_STRING, kNodeLabelSize, 0), /* NodeLabel */ DECLARE_DYNAMIC_ATTRIBUTE(ZCL_REACHABLE_ATTRIBUTE_ID, BOOLEAN, 1, 0), /* Reachable */ DECLARE_DYNAMIC_ATTRIBUTE_LIST_END(); @@ -267,11 +267,11 @@ void HandleDeviceStatusChanged(Device * dev, Device::Changed_t itemChangedMask) if (itemChangedMask & Device::kChanged_Name) { - uint8_t zclName[kUserLabelSize]; + uint8_t zclName[kNodeLabelSize]; MutableByteSpan zclNameSpan(zclName); MakeZclCharString(zclNameSpan, dev->GetName()); MatterReportingAttributeChangeCallback(dev->GetEndpointId(), ZCL_BRIDGED_DEVICE_BASIC_CLUSTER_ID, - ZCL_USER_LABEL_ATTRIBUTE_ID, CLUSTER_MASK_SERVER, 0, ZCL_CHAR_STRING_ATTRIBUTE_TYPE, + ZCL_NODE_LABEL_ATTRIBUTE_ID, CLUSTER_MASK_SERVER, 0, ZCL_CHAR_STRING_ATTRIBUTE_TYPE, zclNameSpan.data()); } @@ -342,7 +342,7 @@ EmberAfStatus HandleReadBridgedDeviceBasicAttribute(Device * dev, chip::Attribut { *buffer = dev->IsReachable() ? 1 : 0; } - else if ((attributeId == ZCL_USER_LABEL_ATTRIBUTE_ID) && (maxReadLength == 32)) + else if ((attributeId == ZCL_NODE_LABEL_ATTRIBUTE_ID) && (maxReadLength == 32)) { uint8_t bufferMemory[254]; MutableByteSpan zclString(bufferMemory); diff --git a/examples/lighting-app/lighting-common/lighting-app.zap b/examples/lighting-app/lighting-common/lighting-app.zap index 9f2bb1b57128c3..216bd550e3e032 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..6420220a1f5ea7 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..1c771734db40fb 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..8c693d0fe5aa79 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" />