XML Changes for Bridged Device Basic Information (#41963)
* XML changes
* Codegen
* Codegen
diff --git a/examples/placeholder/linux/apps/app1/config.matter b/examples/placeholder/linux/apps/app1/config.matter
index 598bc88..64382c8 100644
--- a/examples/placeholder/linux/apps/app1/config.matter
+++ b/examples/placeholder/linux/apps/app1/config.matter
@@ -2621,7 +2621,7 @@
collection of attributes that the Node MAY collect to aid in conveying information regarding the Bridged Device to a user,
such as the vendor name, the model name, or user-assigned name. */
cluster BridgedDeviceBasicInformation = 57 {
- revision 5;
+ revision 6;
enum ColorEnum : enum8 {
kBlack = 0;
@@ -2698,7 +2698,7 @@
readonly attribute optional char_string<64> productLabel = 14;
readonly attribute optional char_string<32> serialNumber = 15;
readonly attribute boolean reachable = 17;
- readonly attribute char_string<32> uniqueID = 18;
+ readonly attribute optional char_string<32> uniqueID = 18;
readonly attribute optional ProductAppearanceStruct productAppearance = 20;
readonly attribute optional int32u configurationVersion = 24;
readonly attribute command_id generatedCommandList[] = 65528;
diff --git a/examples/placeholder/linux/apps/app2/config.matter b/examples/placeholder/linux/apps/app2/config.matter
index ab2084d..314f707 100644
--- a/examples/placeholder/linux/apps/app2/config.matter
+++ b/examples/placeholder/linux/apps/app2/config.matter
@@ -2621,7 +2621,7 @@
collection of attributes that the Node MAY collect to aid in conveying information regarding the Bridged Device to a user,
such as the vendor name, the model name, or user-assigned name. */
cluster BridgedDeviceBasicInformation = 57 {
- revision 5;
+ revision 6;
enum ColorEnum : enum8 {
kBlack = 0;
@@ -2698,7 +2698,7 @@
readonly attribute optional char_string<64> productLabel = 14;
readonly attribute optional char_string<32> serialNumber = 15;
readonly attribute boolean reachable = 17;
- readonly attribute char_string<32> uniqueID = 18;
+ readonly attribute optional char_string<32> uniqueID = 18;
readonly attribute optional ProductAppearanceStruct productAppearance = 20;
readonly attribute optional int32u configurationVersion = 24;
readonly attribute command_id generatedCommandList[] = 65528;
diff --git a/src/app/zap-templates/zcl/data-model/chip/bridged-device-basic-information-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/bridged-device-basic-information-cluster.xml
index 1bd5522..9e49e33 100644
--- a/src/app/zap-templates/zcl/data-model/chip/bridged-device-basic-information-cluster.xml
+++ b/src/app/zap-templates/zcl/data-model/chip/bridged-device-basic-information-cluster.xml
@@ -17,8 +17,9 @@
<!--
XML generated by Alchemy; DO NOT EDIT.
Source: src/data_model/BridgedDeviceBasicInformationCluster.adoc
-Parameters:
-Git: 0.7-summer-2025-ncr-23-g816a9defd
+Parameters: zap attribute=improved-capabilities-tcr,cluster-rev-conformance sdk-root=../connectedhomeip/ spec-root=../connectedhomeip-spec/ ../connectedhomeip-spec/src/data_model/Interaction-Model.adoc ../connectedhomeip-spec/src/data_model/Data-Model.adoc ../connectedhomeip-spec/src/data_model/BridgedDeviceBasicInformationCluster.adoc
+Git: 1.5-base-64-ge13c53cfd
+Alchemy: v1.6.1
-->
<configurator xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../zcl.xsd">
<domain name="CHIP"/>
@@ -59,8 +60,8 @@
<struct name="ProductAppearanceStruct">
<cluster code="0x0039"/>
- <item fieldId="0" name="Finish" type="ProductFinishEnum" min="0x00" max="0x05"/>
- <item fieldId="1" name="PrimaryColor" type="ColorEnum" isNullable="true" min="0x00" max="0x14"/>
+ <item fieldId="0" name="Finish" type="ProductFinishEnum" max="0x05"/>
+ <item fieldId="1" name="PrimaryColor" type="ColorEnum" isNullable="true" max="0x14"/>
</struct>
<cluster>
@@ -74,10 +75,15 @@
<define>BRIDGED_DEVICE_BASIC_INFORMATION_CLUSTER</define>
<client tick="false" init="false">true</client>
<server tick="false" init="false">true</server>
- <globalAttribute side="either" code="0xFFFD" value="5"/>
+ <globalAttribute side="either" code="0xFFFD" value="6"/>
<features>
<feature bit="20" code="BIS" name="BridgedICDSupport" summary="Support bridged ICDs.">
- <optionalConform/>
+ <optionalConform>
+ <greaterOrEqualTerm>
+ <revision value="current"/>
+ <revision value="4"/>
+ </greaterOrEqualTerm>
+ </optionalConform>
</feature>
</features>
<attribute side="server" code="1" name="VendorName" define="VENDOR_NAME" type="char_string" length="32" optional="true">
@@ -124,14 +130,34 @@
<optionalConform/>
</attribute>
<attribute side="server" code="17" name="Reachable" define="REACHABLE" type="boolean" default="1"/>
- <attribute side="server" code="18" name="UniqueID" define="UNIQUE_ID" type="char_string" length="32"/>
+ <attribute side="server" code="18" name="UniqueID" define="UNIQUE_ID" type="char_string" length="32" optional="true">
+ <otherwiseConform>
+ <mandatoryConform>
+ <greaterOrEqualTerm>
+ <revision value="current"/>
+ <revision value="4"/>
+ </greaterOrEqualTerm>
+ </mandatoryConform>
+ <optionalConform/>
+ </otherwiseConform>
+ </attribute>
<attribute side="server" code="20" name="ProductAppearance" define="PRODUCT_APPEARANCE" type="ProductAppearanceStruct" optional="true">
- <optionalConform/>
+ <optionalConform>
+ <greaterOrEqualTerm>
+ <revision value="current"/>
+ <revision value="2"/>
+ </greaterOrEqualTerm>
+ </optionalConform>
</attribute>
<attribute code="0x0018" side="server" name="ConfigurationVersion" define="CONFIGURATION_VERSION" type="int32u" min="1" default="1" optional="true">
<otherwiseConform>
<provisionalConform/>
- <optionalConform/>
+ <optionalConform>
+ <greaterOrEqualTerm>
+ <revision value="current"/>
+ <revision value="5"/>
+ </greaterOrEqualTerm>
+ </optionalConform>
</otherwiseConform>
</attribute>
<command source="client" code="0x80" name="KeepActive" optional="true">
diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter
index d157c6c..0120e92 100644
--- a/src/controller/data_model/controller-clusters.matter
+++ b/src/controller/data_model/controller-clusters.matter
@@ -2583,7 +2583,7 @@
collection of attributes that the Node MAY collect to aid in conveying information regarding the Bridged Device to a user,
such as the vendor name, the model name, or user-assigned name. */
cluster BridgedDeviceBasicInformation = 57 {
- revision 5;
+ revision 6;
enum ColorEnum : enum8 {
kBlack = 0;
@@ -2660,7 +2660,7 @@
readonly attribute optional char_string<64> productLabel = 14;
readonly attribute optional char_string<32> serialNumber = 15;
readonly attribute boolean reachable = 17;
- readonly attribute char_string<32> uniqueID = 18;
+ readonly attribute optional char_string<32> uniqueID = 18;
readonly attribute optional ProductAppearanceStruct productAppearance = 20;
readonly attribute optional int32u configurationVersion = 24;
readonly attribute command_id generatedCommandList[] = 65528;
diff --git a/src/controller/java/generated/java/matter/controller/cluster/clusters/BridgedDeviceBasicInformationCluster.kt b/src/controller/java/generated/java/matter/controller/cluster/clusters/BridgedDeviceBasicInformationCluster.kt
index a7a111d..8c05e50 100644
--- a/src/controller/java/generated/java/matter/controller/cluster/clusters/BridgedDeviceBasicInformationCluster.kt
+++ b/src/controller/java/generated/java/matter/controller/cluster/clusters/BridgedDeviceBasicInformationCluster.kt
@@ -1524,7 +1524,7 @@
}
}
- suspend fun readUniqueIDAttribute(): String {
+ suspend fun readUniqueIDAttribute(): String? {
val ATTRIBUTE_ID: UInt = 18u
val attributePath =
@@ -1550,7 +1550,12 @@
// Decode the TLV data into the appropriate type
val tlvReader = TlvReader(attributeData.data)
- val decodedValue: String = tlvReader.getString(AnonymousTag)
+ val decodedValue: String? =
+ if (tlvReader.isNextTag(AnonymousTag)) {
+ tlvReader.getString(AnonymousTag)
+ } else {
+ null
+ }
return decodedValue
}
@@ -1594,9 +1599,14 @@
// Decode the TLV data into the appropriate type
val tlvReader = TlvReader(attributeData.data)
- val decodedValue: String = tlvReader.getString(AnonymousTag)
+ val decodedValue: String? =
+ if (tlvReader.isNextTag(AnonymousTag)) {
+ tlvReader.getString(AnonymousTag)
+ } else {
+ null
+ }
- emit(StringSubscriptionState.Success(decodedValue))
+ decodedValue?.let { emit(StringSubscriptionState.Success(it)) }
}
SubscriptionState.SubscriptionEstablished -> {
emit(StringSubscriptionState.SubscriptionEstablished)
diff --git a/src/controller/python/matter/clusters/Objects.py b/src/controller/python/matter/clusters/Objects.py
index c46f591..98232f9 100644
--- a/src/controller/python/matter/clusters/Objects.py
+++ b/src/controller/python/matter/clusters/Objects.py
@@ -11619,7 +11619,7 @@
ClusterObjectFieldDescriptor(Label="productLabel", Tag=0x0000000E, Type=typing.Optional[str]),
ClusterObjectFieldDescriptor(Label="serialNumber", Tag=0x0000000F, Type=typing.Optional[str]),
ClusterObjectFieldDescriptor(Label="reachable", Tag=0x00000011, Type=bool),
- ClusterObjectFieldDescriptor(Label="uniqueID", Tag=0x00000012, Type=str),
+ ClusterObjectFieldDescriptor(Label="uniqueID", Tag=0x00000012, Type=typing.Optional[str]),
ClusterObjectFieldDescriptor(Label="productAppearance", Tag=0x00000014, Type=typing.Optional[BridgedDeviceBasicInformation.Structs.ProductAppearanceStruct]),
ClusterObjectFieldDescriptor(Label="configurationVersion", Tag=0x00000018, Type=typing.Optional[uint]),
ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]),
@@ -11644,7 +11644,7 @@
productLabel: typing.Optional[str] = None
serialNumber: typing.Optional[str] = None
reachable: bool = False
- uniqueID: str = ""
+ uniqueID: typing.Optional[str] = None
productAppearance: typing.Optional[BridgedDeviceBasicInformation.Structs.ProductAppearanceStruct] = None
configurationVersion: typing.Optional[uint] = None
generatedCommandList: typing.List[uint] = field(default_factory=lambda: [])
@@ -11985,9 +11985,9 @@
@ChipUtility.classproperty
def attribute_type(cls) -> ClusterObjectFieldDescriptor:
- return ClusterObjectFieldDescriptor(Type=str)
+ return ClusterObjectFieldDescriptor(Type=typing.Optional[str])
- value: str = ""
+ value: typing.Optional[str] = None
@dataclass
class ProductAppearance(ClusterAttributeDescriptor):
diff --git a/zzz_generated/app-common/clusters/BridgedDeviceBasicInformation/Metadata.h b/zzz_generated/app-common/clusters/BridgedDeviceBasicInformation/Metadata.h
index cb2e14f..2e3201b 100644
--- a/zzz_generated/app-common/clusters/BridgedDeviceBasicInformation/Metadata.h
+++ b/zzz_generated/app-common/clusters/BridgedDeviceBasicInformation/Metadata.h
@@ -17,7 +17,7 @@
namespace Clusters {
namespace BridgedDeviceBasicInformation {
-inline constexpr uint32_t kRevision = 5;
+inline constexpr uint32_t kRevision = 6;
namespace Attributes {
@@ -93,9 +93,8 @@
inline constexpr DataModel::AttributeEntry kMetadataEntry(ConfigurationVersion::Id, BitFlags<DataModel::AttributeQualityFlags>(),
Access::Privilege::kView, std::nullopt);
} // namespace ConfigurationVersion
-constexpr std::array<DataModel::AttributeEntry, 2> kMandatoryMetadata = {
+constexpr std::array<DataModel::AttributeEntry, 1> kMandatoryMetadata = {
Reachable::kMetadataEntry,
- UniqueID::kMetadataEntry,
};