Skip to content

Commit 22607b1

Browse files
committed
Add accepted commands list and attribute list to the list of attributes that qualify as device configuration changes
1 parent 7e3320c commit 22607b1

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

src/darwin/Framework/CHIP/MTRDevice.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,7 @@ MTR_EXTERN NSString * const MTRDataVersionKey MTR_NEWLY_AVAILABLE;
425425

426426
/**
427427
* Notifies delegate when the device configuration changes. Device configuration changes include updates in parts list, device type list,
428-
* server list, feature map or cluster revision attributes in the descriptor cluster.
428+
* server list, accepted commands list, attribute list, feature map or cluster revision attributes in the descriptor cluster.
429429
*
430430
* This is called when the MTRDevice object detects a change in the device configuration and reports that to the delegate.
431431
*

src/darwin/Framework/CHIP/MTRDevice.mm

+6-4
Original file line numberDiff line numberDiff line change
@@ -373,8 +373,8 @@ @implementation MTRDevice {
373373
MTRDeviceConnectivityMonitor * _connectivityMonitor;
374374

375375
// This boolean keeps track of any device configuration changes received in an attribute report
376-
// and when the report ends, we notify the delegate. Device configuration changes include parts
377-
// list, server list, device type list, cluster revision and feature map updates.
376+
// and when the report ends, we notify the delegate. Device configuration changes include parts list,
377+
// server list, device type list, accepted commands list, attribute list, cluster revision and feature map updates.
378378
BOOL _deviceConfigurationChanged;
379379
}
380380

@@ -1107,8 +1107,8 @@ - (void)_reportAttributes:(NSArray<NSDictionary<NSString *, id> *> *)attributes
11071107
}
11081108
}
11091109

1110-
// When we receive an attribute report, check if there are any changes in parts list, server list, device type list, cluster revision
1111-
// or feature map attributes of the descriptor cluster. If yes, make a note that the device configuration changed.
1110+
// When we receive an attribute report, check if there are any changes in parts list, server list, device type list, accepted commands list,
1111+
// attribute list, cluster revision or feature map attributes of the descriptor cluster. If yes, make a note that the device configuration changed.
11121112
- (void)_noteDeviceConfigurationChanged:(NSArray<NSDictionary<NSString *, id> *> *)attributeReport
11131113
{
11141114
for (NSDictionary<NSString *, id> * attribute in attributeReport) {
@@ -1122,6 +1122,8 @@ - (void)_noteDeviceConfigurationChanged:(NSArray<NSDictionary<NSString *, id> *>
11221122
case MTRClusterDescriptorAttributePartsListID:
11231123
case MTRClusterDescriptorAttributeServerListID:
11241124
case MTRClusterDescriptorAttributeDeviceTypeListID:
1125+
case MTRClusterDescriptorAttributeAcceptedCommandListID:
1126+
case MTRClusterDescriptorAttributeAttributeListID:
11251127
case MTRClusterDescriptorAttributeClusterRevisionID:
11261128
case MTRClusterDescriptorAttributeFeatureMapID: {
11271129
// If changes are detected, note that the device configuration has changed.

0 commit comments

Comments
 (0)