Skip to content

Commit 7ceaf6f

Browse files
authored
[Fabric-Sync] Synchronize all required attributes (#36780)
* [Fabric-Sync] Synchronize all required attributes * Revert commit 8126bbd * Synchronize all required attributes
1 parent 572a799 commit 7ceaf6f

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

examples/fabric-sync/admin/DeviceSynchronization.cpp

+24
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,14 @@ void DeviceSynchronizer::OnAttributeData(const ConcreteDataAttributePath & path,
9191
}
9292
}
9393
break;
94+
case Clusters::BasicInformation::Attributes::VendorID::Id: {
95+
uint32_t vendorId;
96+
if (SuccessOrLog(data->Get(vendorId), "VendorID"))
97+
{
98+
mCurrentDeviceData.vendorId = static_cast<chip::VendorId>(vendorId);
99+
}
100+
}
101+
break;
94102
case Clusters::BasicInformation::Attributes::VendorName::Id: {
95103
char vendorNameBuffer[kBasicInformationAttributeBufSize];
96104
if (SuccessOrLog(data->GetString(vendorNameBuffer, sizeof(vendorNameBuffer)), "VendorName"))
@@ -99,6 +107,14 @@ void DeviceSynchronizer::OnAttributeData(const ConcreteDataAttributePath & path,
99107
}
100108
}
101109
break;
110+
case Clusters::BasicInformation::Attributes::ProductID::Id: {
111+
uint32_t productId;
112+
if (SuccessOrLog(data->Get(productId), "ProductID"))
113+
{
114+
mCurrentDeviceData.productId = productId;
115+
}
116+
}
117+
break;
102118
case Clusters::BasicInformation::Attributes::ProductName::Id: {
103119
char productNameBuffer[kBasicInformationAttributeBufSize];
104120
if (SuccessOrLog(data->GetString(productNameBuffer, sizeof(productNameBuffer)), "ProductName"))
@@ -124,6 +140,14 @@ void DeviceSynchronizer::OnAttributeData(const ConcreteDataAttributePath & path,
124140
}
125141
}
126142
break;
143+
case Clusters::BasicInformation::Attributes::SoftwareVersion::Id: {
144+
uint32_t softwareVersion;
145+
if (SuccessOrLog(data->Get(softwareVersion), "SoftwareVersion"))
146+
{
147+
mCurrentDeviceData.softwareVersion = softwareVersion;
148+
}
149+
}
150+
break;
127151
case Clusters::BasicInformation::Attributes::SoftwareVersionString::Id: {
128152
char softwareVersionStringBuffer[kBasicInformationAttributeBufSize];
129153
if (SuccessOrLog(data->GetString(softwareVersionStringBuffer, sizeof(softwareVersionStringBuffer)),

0 commit comments

Comments
 (0)