Skip to content

Commit ada74db

Browse files
committed
rename to indicate the attributes are for logging / informational use
1 parent 3c53619 commit ada74db

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

src/darwin/Framework/CHIP/MTRDevice.mm

+9-9
Original file line numberDiff line numberDiff line change
@@ -93,17 +93,17 @@ - (id)strongObject
9393
}
9494
@end
9595

96-
// Stores essential-for-logging attributes immutably for use in logs
97-
@interface MTRDeviceEssentialAttributes : NSObject
96+
// convenience object for commonly-logged device attributes
97+
@interface MTRDeviceInformationalAttributes : NSObject
9898
@property (readonly) UInt16 vendorID;
9999
@property (readonly) UInt16 productID;
100100
@property (readonly) BOOL usesThread;
101101

102-
- (void)addEssentialAttributesToCurrentMetricScope;
102+
- (void)addInformationalAttributesToCurrentMetricScope;
103103

104104
@end
105105

106-
@implementation MTRDeviceEssentialAttributes
106+
@implementation MTRDeviceInformationalAttributes
107107

108108
- (instancetype)initWithVendorID:(UInt16)vendorID productID:(UInt16)productID usesThread:(BOOL)usesThread {
109109
self = [super init];
@@ -117,7 +117,7 @@ - (instancetype)initWithVendorID:(UInt16)vendorID productID:(UInt16)productID us
117117
return self;
118118
}
119119

120-
- (void)addEssentialAttributesToCurrentMetricScope {
120+
- (void)addInformationalAttributesToCurrentMetricScope {
121121
using namespace chip::Tracing::DarwinFramework;
122122
MATTER_LOG_METRIC(kMetricDeviceVendorID, _vendorID);
123123
MATTER_LOG_METRIC(kMetricDeviceProductID, _productID);
@@ -1926,11 +1926,11 @@ - (void)_setCachedAttributeValue:(MTRDeviceDataValueDictionary _Nullable)value f
19261926
// (removals are OK)
19271927

19281928
// log when a device violates expectations for Changes Omitted Quality attributes.
1929-
MTRDeviceEssentialAttributes * attributes = [self _essentialAttributesForCurrentState];
1929+
MTRDeviceInformationalAttributes * attributes = [self _informationalAttributesForCurrentState];
19301930

19311931
using namespace chip::Tracing::DarwinFramework;
19321932
MATTER_LOG_METRIC_BEGIN(kMetricUnexpectedCQualityUpdate);
1933-
[attributes addEssentialAttributesToCurrentMetricScope];
1933+
[attributes addInformationalAttributesToCurrentMetricScope];
19341934
MATTER_LOG_METRIC_END(kMetricUnexpectedCQualityUpdate);
19351935

19361936
return;
@@ -3688,7 +3688,7 @@ - (void)removeClientDataForKey:(NSString *)key endpointID:(NSNumber *)endpointID
36883688

36893689
#pragma mark Log Help
36903690

3691-
- (MTRDeviceEssentialAttributes *)_essentialAttributesForCurrentState {
3691+
- (MTRDeviceInformationalAttributes *)_informationalAttributesForCurrentState {
36923692
MTRClusterPath * basicInfoClusterPath = [MTRClusterPath clusterPathWithEndpointID:@(kRootEndpointId) clusterID:@(MTRClusterIDTypeBasicInformationID)];
36933693
MTRDeviceClusterData * basicInfoClusterData = [self _clusterDataForPath:basicInfoClusterPath];
36943694

@@ -3699,7 +3699,7 @@ - (MTRDeviceEssentialAttributes *)_essentialAttributesForCurrentState {
36993699

37003700
BOOL usesThread = [self _deviceUsesThread];
37013701

3702-
return [[MTRDeviceEssentialAttributes alloc] initWithVendorID:vendorID productID:productID usesThread:usesThread];
3702+
return [[MTRDeviceInformationalAttributes alloc] initWithVendorID:vendorID productID:productID usesThread:usesThread];
37033703
}
37043704

37053705
@end

0 commit comments

Comments
 (0)