Skip to content

Commit

Permalink
Darwin framework: add new header generation for cluster/attribute/com…
Browse files Browse the repository at this point in the history
…mand/event IDs to expose in darwin public framework

Issue #18164 - Need obj-c friendly constants header for cluster/attribute/command/event IDs
  • Loading branch information
jtung-apple committed May 10, 2022
1 parent 3c3a422 commit f45535b
Show file tree
Hide file tree
Showing 7 changed files with 2,703 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -233,8 +233,9 @@ - (void)reportFromUserEnteredSettings
}
for (CHIPAttributeReport * report in reports) {
// These should be exposed by the SDK
if ([report.path.cluster isEqualToNumber:@(1026)] &&
[report.path.attribute isEqualToNumber:@(0)]) {
if ([report.path.cluster isEqualToNumber:@(kMatterClusterTemperatureMeasurementID)] &&
[report.path.attribute
isEqualToNumber:@(kMatterClusterTemperatureMeasurementAttributeMeasuredValueID)]) {
if (report.error != nil) {
NSLog(@"Error reading temperature: %@", report.error);
} else {
Expand Down
4 changes: 4 additions & 0 deletions src/darwin/Framework/CHIP.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@
5AE6D4E427A99041001F2493 /* CHIPDeviceTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 5AE6D4E327A99041001F2493 /* CHIPDeviceTests.m */; };
754F3DF427FBB94B00E60580 /* CHIPEventTLVValueDecoder_Internal.h in Headers */ = {isa = PBXBuildFile; fileRef = 754F3DF327FBB94B00E60580 /* CHIPEventTLVValueDecoder_Internal.h */; };
7560FD1C27FBBD3F005E85B3 /* CHIPEventTLVValueDecoder.mm in Sources */ = {isa = PBXBuildFile; fileRef = 7560FD1B27FBBD3F005E85B3 /* CHIPEventTLVValueDecoder.mm */; };
75C645A42825AAC3007E2C29 /* MatterClusterConstants.h in Headers */ = {isa = PBXBuildFile; fileRef = 75C645A32825AAC3007E2C29 /* MatterClusterConstants.h */; settings = {ATTRIBUTES = (Public, ); }; };
88EBF8CE27FABDD500686BC1 /* CHIPDeviceAttestationDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 88EBF8CB27FABDD500686BC1 /* CHIPDeviceAttestationDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; };
88EBF8CF27FABDD500686BC1 /* CHIPDeviceAttestationDelegateBridge.mm in Sources */ = {isa = PBXBuildFile; fileRef = 88EBF8CC27FABDD500686BC1 /* CHIPDeviceAttestationDelegateBridge.mm */; };
88EBF8D027FABDD500686BC1 /* CHIPDeviceAttestationDelegateBridge.h in Headers */ = {isa = PBXBuildFile; fileRef = 88EBF8CD27FABDD500686BC1 /* CHIPDeviceAttestationDelegateBridge.h */; };
Expand Down Expand Up @@ -172,6 +173,7 @@
5AE6D4E327A99041001F2493 /* CHIPDeviceTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CHIPDeviceTests.m; sourceTree = "<group>"; };
754F3DF327FBB94B00E60580 /* CHIPEventTLVValueDecoder_Internal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CHIPEventTLVValueDecoder_Internal.h; sourceTree = "<group>"; };
7560FD1B27FBBD3F005E85B3 /* CHIPEventTLVValueDecoder.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = CHIPEventTLVValueDecoder.mm; path = "zap-generated/CHIPEventTLVValueDecoder.mm"; sourceTree = "<group>"; };
75C645A32825AAC3007E2C29 /* MatterClusterConstants.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MatterClusterConstants.h; path = "MatterClusterConstants.h"; sourceTree = "<group>"; };
88EBF8CB27FABDD500686BC1 /* CHIPDeviceAttestationDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CHIPDeviceAttestationDelegate.h; sourceTree = "<group>"; };
88EBF8CC27FABDD500686BC1 /* CHIPDeviceAttestationDelegateBridge.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = CHIPDeviceAttestationDelegateBridge.mm; sourceTree = "<group>"; };
88EBF8CD27FABDD500686BC1 /* CHIPDeviceAttestationDelegateBridge.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CHIPDeviceAttestationDelegateBridge.h; sourceTree = "<group>"; };
Expand Down Expand Up @@ -252,6 +254,7 @@
1E857307265519AE0050A4D9 /* callback-stub.cpp */,
1EC4CE6325CC276600D7304F /* CHIPClustersObjc.h */,
1EC4CE5925CC26E900D7304F /* CHIPClustersObjc.mm */,
75C645A32825AAC3007E2C29 /* MatterClusterConstants.h */,
);
name = CHIPGeneratedFiles;
sourceTree = "<group>";
Expand Down Expand Up @@ -395,6 +398,7 @@
2C1B027B2641DB4E00780EF1 /* CHIPOperationalCredentialsDelegate.h in Headers */,
99D466E12798936D0089A18F /* CHIPCommissioningParameters.h in Headers */,
5136661528067D550025EDAE /* MatterControllerFactory_Internal.h in Headers */,
75C645A42825AAC3007E2C29 /* MatterClusterConstants.h in Headers */,
B289D4212639C0D300D4E314 /* CHIPOnboardingPayloadParser.h in Headers */,
513DDB862761F69300DAA01A /* CHIPAttributeTLVValueDecoder_Internal.h in Headers */,
2CB7163F252F731E0026E2BB /* CHIPDevicePairingDelegate.h in Headers */,
Expand Down
1 change: 1 addition & 0 deletions src/darwin/Framework/CHIP/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ static_library("framework") {
"CHIPQRCodeSetupPayloadParser.mm",
"CHIPSetupPayload.h",
"CHIPSetupPayload.mm",
"MatterClusterConstants.h",
"MatterControllerFactory.h",
"MatterControllerFactory.mm",
"MatterControllerFactory_Internal.h",
Expand Down
1 change: 1 addition & 0 deletions src/darwin/Framework/CHIP/CHIP.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
#import <CHIP/CHIPSetupPayload.h>
#import <CHIP/CHIPStructsObjc.h>
#import <CHIP/CHIPThreadOperationalDataset.h>
#import <CHIP/MatterClusterConstants.h>
#import <CHIP/MatterControllerFactory.h>

#import <Foundation/Foundation.h>
Expand Down
Loading

0 comments on commit f45535b

Please sign in to comment.