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 5d4c6aea12ce51..9e5d6d2282acba 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, @@ -8266,7 +8281,7 @@ "reportableChange": 0 }, { - "name": "UserLabel", + "name": "NodeLabel", "code": 5, "mfgCode": null, "side": "server", @@ -9132,7 +9147,7 @@ "reportableChange": 0 }, { - "name": "UserLabel", + "name": "NodeLabel", "code": 5, "mfgCode": null, "side": "server", @@ -17381,7 +17396,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 02124c3937d132..ba75aab88e4e56 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", @@ -3890,7 +3890,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 cdc04a0e8af3ee..0c016c23b4961e 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, @@ -4966,7 +4981,7 @@ "reportableChange": 0 }, { - "name": "UserLabel", + "name": "NodeLabel", "code": 5, "mfgCode": null, "side": "server", @@ -6156,7 +6171,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 019dd840fcbcae..1603bc89022ddb 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", @@ -4864,7 +4864,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 ffafffc8b23946..4cec3f491fe99f 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 5e3a06f0d43843..23aa0b98eecc03 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 440df5b2ab0283..826e7f926e08cb 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 66eaeba1bde306..a29e420969c0da 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 e85c3834e2018d..548a272dbf2218 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", @@ -4985,7 +4985,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 bba6766a4a560d..70ce10f716be8a 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", @@ -4985,7 +4985,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 49e8e47faf2976..e045b57b08f6fa 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", @@ -2819,7 +2819,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 32352b3ae1c6dd..c36289e6adcfce 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, @@ -7707,7 +7722,7 @@ "reportableChange": 0 }, { - "name": "UserLabel", + "name": "NodeLabel", "code": 5, "mfgCode": null, "side": "server", @@ -8371,7 +8386,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 83f18932a7513a..583af576cdc5ac 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 bef667b934959d..f9021efd125584 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, @@ -7707,7 +7722,7 @@ "reportableChange": 0 }, { - "name": "UserLabel", + "name": "NodeLabel", "code": 5, "mfgCode": null, "side": "server", @@ -8371,7 +8386,7 @@ "reportableChange": 0 }, { - "name": "UserLabel", + "name": "NodeLabel", "code": 5, "mfgCode": null, "side": "server", @@ -14555,7 +14570,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 32be5ce737aa7c..6f9d867d39d13e 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", @@ -4135,7 +4135,7 @@ "reportableChange": 0 }, { - "name": "UserLabel", + "name": "NodeLabel", "code": 5, "mfgCode": null, "side": "server", @@ -6515,7 +6515,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" />