Skip to content

Commit 57898b9

Browse files
authoredJan 24, 2024
[darwin] Add support for downloading diagnostic logs (#31638)
* [Matter.framework] Add MTRDiagnosticLogsDelegate to the Matter.framework * [darwin-framework-tool] Add bdx commands to darwin-framework-tool
1 parent f44eb6b commit 57898b9

16 files changed

+971
-0
lines changed
 

‎examples/darwin-framework-tool/BUILD.gn

+2
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,8 @@ executable("darwin-framework-tool") {
163163
"${chip_root}/examples/chip-tool/commands/common/Commands.h",
164164
"${chip_root}/examples/chip-tool/commands/common/HexConversion.h",
165165
"${chip_root}/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp",
166+
"commands/bdx/Commands.h",
167+
"commands/bdx/DownloadLogCommand.mm",
166168
"commands/clusters/ClusterCommandBridge.h",
167169
"commands/clusters/ModelCommandBridge.mm",
168170
"commands/clusters/ReportCommandBridge.h",
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
/*
2+
* Copyright (c) 2023 Project CHIP Authors
3+
* All rights reserved.
4+
*
5+
* Licensed under the Apache License, Version 2.0 (the "License");
6+
* you may not use this file except in compliance with the License.
7+
* You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*
17+
*/
18+
19+
#pragma once
20+
21+
#include "commands/bdx/DownloadLogCommand.h"
22+
#include "commands/common/Commands.h"
23+
24+
void registerCommandsBdx(Commands & commands)
25+
{
26+
const char * clusterName = "Bdx";
27+
commands_list clusterCommands = {
28+
make_unique<DownloadLogCommand>(), //
29+
};
30+
31+
commands.RegisterCommandSet(clusterName, clusterCommands, "Commands related to BDX");
32+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
/*
2+
* Copyright (c) 2024 Project CHIP Authors
3+
* All rights reserved.
4+
*
5+
* Licensed under the Apache License, Version 2.0 (the "License");
6+
* you may not use this file except in compliance with the License.
7+
* You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*
17+
*/
18+
19+
#pragma once
20+
21+
#include "../common/CHIPCommandBridge.h"
22+
23+
class DownloadLogCommand : public CHIPCommandBridge
24+
{
25+
public:
26+
DownloadLogCommand() : CHIPCommandBridge("download")
27+
{
28+
AddArgument("node-id", 0, UINT64_MAX, &mNodeId, "Node to download the logs from.");
29+
AddArgument("log-type", 0, 2, &mLogType,
30+
"The type of log being requested. This should correspond to a value in the enum MTRDiagnosticLogType.");
31+
AddArgument("timeout", 0, UINT16_MAX, &mTimeout,
32+
"The timeout for getting the log. If the timeout expires, completion will be called with whatever has been "
33+
"retrieved by that point (which might be none or a partial log). If the timeout is set to 0, the request will "
34+
"not expire and completion will not be called until the log is fully retrieved or an error occurs.");
35+
}
36+
37+
/////////// CHIPCommandBridge Interface /////////
38+
CHIP_ERROR RunCommand() override;
39+
chip::System::Clock::Timeout GetWaitDuration() const override { return chip::System::Clock::Seconds16(10); }
40+
41+
private:
42+
chip::NodeId mNodeId;
43+
uint8_t mLogType;
44+
uint16_t mTimeout;
45+
};
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
/*
2+
* Copyright (c) 2024 Project CHIP Authors
3+
* All rights reserved.
4+
*
5+
* Licensed under the Apache License, Version 2.0 (the "License");
6+
* you may not use this file except in compliance with the License.
7+
* You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*
17+
*/
18+
19+
#import <Matter/Matter.h>
20+
21+
#import "MTRError_Utils.h"
22+
23+
#include "DownloadLogCommand.h"
24+
25+
CHIP_ERROR DownloadLogCommand::RunCommand()
26+
{
27+
ChipLogProgress(chipTool, "Downloading logs from node 0x" ChipLogFormatX64, ChipLogValueX64(mNodeId));
28+
29+
MTRDeviceController * commissioner = CurrentCommissioner();
30+
auto * device = [MTRDevice deviceWithNodeID:@(mNodeId) controller:commissioner];
31+
32+
auto logType = static_cast<MTRDiagnosticLogType>(mLogType);
33+
auto queue = dispatch_queue_create("com.chip.bdx.downloader", DISPATCH_QUEUE_SERIAL);
34+
35+
auto * self = this;
36+
auto completion = ^(NSURL * url, NSError * error) {
37+
// A non-nil url indicates the presence of content, which can occur even in error scenarios like timeouts.
38+
if (nil != url) {
39+
NSError * readError = nil;
40+
auto * data = [NSData dataWithContentsOfURL:url options:NSDataReadingUncached error:&readError];
41+
VerifyOrReturn(nil == readError, self->SetCommandExitStatus(MTRErrorToCHIPErrorCode(readError)));
42+
43+
auto * content = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
44+
NSLog(@"Content: %@", content);
45+
}
46+
47+
VerifyOrReturn(nil == error, self->SetCommandExitStatus(MTRErrorToCHIPErrorCode(error)));
48+
49+
// The url is nil when there are no logs on the target device.
50+
if (nil == url) {
51+
NSLog(@"No logs has been found onto node 0x" ChipLogFormatX64, ChipLogValueX64(mNodeId));
52+
}
53+
self->SetCommandExitStatus(CHIP_NO_ERROR);
54+
};
55+
56+
[device downloadLogOfType:logType timeout:mTimeout queue:queue completion:completion];
57+
return CHIP_NO_ERROR;
58+
}

‎examples/darwin-framework-tool/main.mm

+2
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020

2121
#import "logging/logging.h"
2222

23+
#include "commands/bdx/Commands.h"
2324
#include "commands/common/Commands.h"
2425
#include "commands/delay/Commands.h"
2526
#include "commands/discover/Commands.h"
@@ -38,6 +39,7 @@ int main(int argc, const char * argv[])
3839
dft::logging::Setup();
3940

4041
Commands commands;
42+
registerCommandsBdx(commands);
4143
registerCommandsPairing(commands);
4244
registerCommandsDelay(commands);
4345
registerCommandsDiscover(commands);

‎src/darwin/Framework/CHIP/MTRDevice.h

+21
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
#import <Foundation/Foundation.h>
1919
#import <Matter/MTRBaseDevice.h>
2020
#import <Matter/MTRDefines.h>
21+
#import <Matter/MTRDiagnosticLogsType.h>
2122

2223
NS_ASSUME_NONNULL_BEGIN
2324

@@ -325,6 +326,26 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1))
325326
*/
326327
- (void)removeClientDataForKey:(NSString *)key endpointID:(NSNumber *)endpointID MTR_UNSTABLE_API;
327328

329+
/**
330+
* Download log of the desired type from the device.
331+
*
332+
* Note: The consumer of this API should move the file that the url points to or open it for reading before the
333+
* completion handler returns. Otherwise, the file will be deleted, and the data will be lost.
334+
*
335+
* @param type The type of log being requested. This should correspond to a value in the enum MTRDiagnosticLogType.
336+
* @param timeout The timeout for getting the log. If the timeout expires, completion will be called with whatever
337+
* has been retrieved by that point (which might be none or a partial log).
338+
* If the timeout is set to 0, the request will not expire and completion will not be called until
339+
* the log is fully retrieved or an error occurs.
340+
* @param queue The queue on which completion will be called.
341+
* @param completion The completion that will be called to return the URL of the requested log if successful. Otherwise
342+
* returns an error.
343+
*/
344+
- (void)downloadLogOfType:(MTRDiagnosticLogType)type
345+
timeout:(NSTimeInterval)timeout
346+
queue:(dispatch_queue_t)queue
347+
completion:(void (^)(NSURL * _Nullable url, NSError * _Nullable error))completion
348+
MTR_NEWLY_AVAILABLE;
328349
@end
329350

330351
@protocol MTRDeviceDelegate <NSObject>

‎src/darwin/Framework/CHIP/MTRDevice.mm

+12
Original file line numberDiff line numberDiff line change
@@ -1363,6 +1363,18 @@ - (void)openCommissioningWindowWithDiscriminator:(NSNumber *)discriminator
13631363
[baseDevice openCommissioningWindowWithDiscriminator:discriminator duration:duration queue:queue completion:completion];
13641364
}
13651365

1366+
- (void)downloadLogOfType:(MTRDiagnosticLogType)type
1367+
timeout:(NSTimeInterval)timeout
1368+
queue:(dispatch_queue_t)queue
1369+
completion:(void (^)(NSURL * _Nullable url, NSError * _Nullable error))completion
1370+
{
1371+
[_deviceController downloadLogFromNodeWithID:_nodeID
1372+
type:type
1373+
timeout:timeout
1374+
queue:queue
1375+
completion:completion];
1376+
}
1377+
13661378
#pragma mark - Cache management
13671379

13681380
// assume lock is held

‎src/darwin/Framework/CHIP/MTRDeviceController.mm

+14
Original file line numberDiff line numberDiff line change
@@ -1216,6 +1216,20 @@ - (void)operationalInstanceAdded:(chip::NodeId)nodeID
12161216
[device nodeMayBeAdvertisingOperational];
12171217
}
12181218

1219+
- (void)downloadLogFromNodeWithID:(NSNumber *)nodeID
1220+
type:(MTRDiagnosticLogType)type
1221+
timeout:(NSTimeInterval)timeout
1222+
queue:(dispatch_queue_t)queue
1223+
completion:(void (^)(NSURL * _Nullable url, NSError * _Nullable error))completion
1224+
{
1225+
[_factory downloadLogFromNodeWithID:nodeID
1226+
controller:self
1227+
type:type
1228+
timeout:timeout
1229+
queue:queue
1230+
completion:completion];
1231+
}
1232+
12191233
@end
12201234

12211235
/**

‎src/darwin/Framework/CHIP/MTRDeviceControllerFactory.mm

+32
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
#import "MTRDeviceControllerStartupParams.h"
3232
#import "MTRDeviceControllerStartupParams_Internal.h"
3333
#import "MTRDeviceController_Internal.h"
34+
#import "MTRDiagnosticLogsDownloader.h"
3435
#import "MTRError_Internal.h"
3536
#import "MTRFabricInfo_Internal.h"
3637
#import "MTRFramework.h"
@@ -133,6 +134,8 @@ @interface MTRDeviceControllerFactory ()
133134
@property (nonatomic, readonly, nullable) id<MTROTAProviderDelegate> otaProviderDelegate;
134135
@property (nonatomic, readonly, nullable) dispatch_queue_t otaProviderDelegateQueue;
135136

137+
@property (nonatomic, readonly) MTRDiagnosticLogsDownloader * diagnosticLogsDownloader;
138+
136139
- (BOOL)findMatchingFabric:(FabricTable &)fabricTable
137140
params:(MTRDeviceControllerStartupParams *)params
138141
fabric:(const FabricInfo * _Nullable * _Nonnull)fabric;
@@ -332,6 +335,8 @@ - (void)cleanupStartupObjects
332335
delete _persistentStorageDelegate;
333336
_persistentStorageDelegate = nullptr;
334337
}
338+
339+
_diagnosticLogsDownloader = nil;
335340
}
336341

337342
- (CHIP_ERROR)_initFabricTable:(FabricTable &)fabricTable
@@ -1066,6 +1071,33 @@ - (nullable MTRDeviceController *)runningControllerForFabricIndex:(chip::FabricI
10661071
return [self runningControllerForFabricIndex:fabricIndex includeControllerStartingUp:YES includeControllerShuttingDown:YES];
10671072
}
10681073

1074+
- (void)downloadLogFromNodeWithID:(NSNumber *)nodeID
1075+
controller:(MTRDeviceController *)controller
1076+
type:(MTRDiagnosticLogType)type
1077+
timeout:(NSTimeInterval)timeout
1078+
queue:(dispatch_queue_t)queue
1079+
completion:(void (^)(NSURL * _Nullable url, NSError * _Nullable error))completion
1080+
{
1081+
dispatch_sync(_chipWorkQueue, ^{
1082+
if (![self isRunning]) {
1083+
return;
1084+
}
1085+
1086+
if (_diagnosticLogsDownloader == nil) {
1087+
_diagnosticLogsDownloader = [[MTRDiagnosticLogsDownloader alloc] init];
1088+
auto systemState = _controllerFactory->GetSystemState();
1089+
systemState->BDXTransferServer()->SetDelegate([_diagnosticLogsDownloader getBridge]);
1090+
}
1091+
1092+
[_diagnosticLogsDownloader downloadLogFromNodeWithID:nodeID
1093+
controller:controller
1094+
type:type
1095+
timeout:timeout
1096+
queue:queue
1097+
completion:completion];
1098+
});
1099+
}
1100+
10691101
- (void)operationalInstanceAdded:(chip::PeerId &)operationalID
10701102
{
10711103
assertChipStackLockedByCurrentThread();

‎src/darwin/Framework/CHIP/MTRDeviceControllerFactory_Internal.h

+11
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
#import <Foundation/Foundation.h>
2323
#import <Matter/MTRDefines.h>
2424
#import <Matter/MTRDeviceController.h>
25+
#import <Matter/MTRDiagnosticLogsType.h>
2526

2627
#if MTR_PER_CONTROLLER_STORAGE_ENABLED
2728
#import <Matter/MTRDeviceControllerParameters.h>
@@ -75,6 +76,16 @@ NS_ASSUME_NONNULL_BEGIN
7576
*/
7677
- (void)operationalInstanceAdded:(chip::PeerId &)operationalID;
7778

79+
/**
80+
* Download log of the desired type from the device.
81+
*/
82+
- (void)downloadLogFromNodeWithID:(NSNumber *)nodeID
83+
controller:(MTRDeviceController *)controller
84+
type:(MTRDiagnosticLogType)type
85+
timeout:(NSTimeInterval)timeout
86+
queue:(dispatch_queue_t)queue
87+
completion:(void (^)(NSURL * _Nullable url, NSError * _Nullable error))completion;
88+
7889
/**
7990
* Initialize an MTRDeviceController with the given parameters.
8091
*/

‎src/darwin/Framework/CHIP/MTRDeviceController_Internal.h

+10
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333

3434
#import <Matter/MTRDefines.h>
3535
#import <Matter/MTRDeviceControllerStartupParams.h>
36+
#import <Matter/MTRDiagnosticLogsType.h>
3637
#if MTR_PER_CONTROLLER_STORAGE_ENABLED
3738
#import <Matter/MTRDeviceControllerStorageDelegate.h>
3839
#else
@@ -233,6 +234,15 @@ NS_ASSUME_NONNULL_BEGIN
233234
*/
234235
- (void)operationalInstanceAdded:(chip::NodeId)nodeID;
235236

237+
/**
238+
* Download log of the desired type from the device.
239+
*/
240+
- (void)downloadLogFromNodeWithID:(NSNumber *)nodeID
241+
type:(MTRDiagnosticLogType)type
242+
timeout:(NSTimeInterval)timeout
243+
queue:(dispatch_queue_t)queue
244+
completion:(void (^)(NSURL * _Nullable url, NSError * _Nullable error))completion;
245+
236246
#pragma mark - Device-specific data and SDK access
237247
// DeviceController will act as a central repository for this opaque dictionary that MTRDevice manages
238248
- (MTRDevice *)deviceForNodeID:(NSNumber *)nodeID;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
/**
2+
*
3+
* Copyright (c) 2024 Project CHIP Authors
4+
*
5+
* Licensed under the Apache License, Version 2.0 (the "License");
6+
* you may not use this file except in compliance with the License.
7+
* You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
18+
#import <Foundation/Foundation.h>
19+
20+
#import <Matter/MTRDeviceController.h>
21+
#import <Matter/MTRDiagnosticLogsType.h>
22+
23+
namespace chip {
24+
namespace bdx {
25+
class BDXTransferServerDelegate;
26+
}
27+
}
28+
29+
NS_ASSUME_NONNULL_BEGIN
30+
31+
@interface MTRDiagnosticLogsDownloader : NSObject
32+
- (chip::bdx::BDXTransferServerDelegate *)getBridge;
33+
34+
- (void)downloadLogFromNodeWithID:(NSNumber *)nodeID
35+
controller:(MTRDeviceController *)controller
36+
type:(MTRDiagnosticLogType)type
37+
timeout:(NSTimeInterval)timeout
38+
queue:(dispatch_queue_t)queue
39+
completion:(void (^)(NSURL * _Nullable url, NSError * _Nullable error))completion;
40+
@end
41+
42+
NS_ASSUME_NONNULL_END

‎src/darwin/Framework/CHIP/MTRDiagnosticLogsDownloader.mm

+630
Large diffs are not rendered by default.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
/**
2+
*
3+
* Copyright (c) 2024 Project CHIP Authors
4+
*
5+
* Licensed under the Apache License, Version 2.0 (the "License");
6+
* you may not use this file except in compliance with the License.
7+
* You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
18+
/**
19+
* This enum is used to specify the type of log requested from this device.
20+
*
21+
* The log types are : End User Support, Network Diagnostics and Crash logs.
22+
*/
23+
typedef NS_ENUM(NSInteger, MTRDiagnosticLogType) {
24+
MTRDiagnosticLogTypeEndUserSupport = 0, // End user support log is requested
25+
MTRDiagnosticLogTypeNetworkDiagnostics = 1, // Network Diagnostics log is requested
26+
MTRDiagnosticLogTypeCrash = 2 // Crash log is requested
27+
} MTR_NEWLY_AVAILABLE;

‎src/darwin/Framework/CHIP/Matter.h

+1
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
#import <Matter/MTRDeviceControllerParameters.h>
4646
#import <Matter/MTRDeviceControllerStartupParams.h>
4747
#import <Matter/MTRDeviceControllerStorageDelegate.h>
48+
#import <Matter/MTRDiagnosticLogsType.h>
4849
#import <Matter/MTRError.h>
4950
#import <Matter/MTRFabricInfo.h>
5051
#import <Matter/MTRKeypair.h>

‎src/darwin/Framework/Matter.xcodeproj/project.pbxproj

+32
Original file line numberDiff line numberDiff line change
@@ -299,10 +299,16 @@
299299
B45373FF2A9FEC4F00807602 /* unix-misc.c in Sources */ = {isa = PBXBuildFile; fileRef = B45373F82A9FEC4F00807602 /* unix-misc.c */; };
300300
B45374002A9FEC4F00807602 /* unix-init.c in Sources */ = {isa = PBXBuildFile; fileRef = B45373F92A9FEC4F00807602 /* unix-init.c */; };
301301
B45374012A9FEC4F00807602 /* unix-sockets.c in Sources */ = {isa = PBXBuildFile; fileRef = B45373FA2A9FEC4F00807602 /* unix-sockets.c */; };
302+
B4C8E6B72B3453AD00FCD54D /* MTRDiagnosticLogsDownloader.mm in Sources */ = {isa = PBXBuildFile; fileRef = B4C8E6B42B3453AD00FCD54D /* MTRDiagnosticLogsDownloader.mm */; };
302303
B4E262162AA0CF1C00DBA5BC /* RemoteDataModelLogger.mm in Sources */ = {isa = PBXBuildFile; fileRef = B4E262122AA0C7A300DBA5BC /* RemoteDataModelLogger.mm */; };
303304
B4E262172AA0CF2000DBA5BC /* RemoteDataModelLogger.h in Headers */ = {isa = PBXBuildFile; fileRef = B4E262132AA0C7A300DBA5BC /* RemoteDataModelLogger.h */; };
304305
B4E2621B2AA0D02000DBA5BC /* SleepCommand.mm in Sources */ = {isa = PBXBuildFile; fileRef = B4E262192AA0D01D00DBA5BC /* SleepCommand.mm */; };
305306
B4E2621E2AA0D02D00DBA5BC /* WaitForCommissioneeCommand.mm in Sources */ = {isa = PBXBuildFile; fileRef = B4E2621C2AA0D02A00DBA5BC /* WaitForCommissioneeCommand.mm */; };
307+
B4FCD56A2B5EDBD300832859 /* MTRDiagnosticLogsType.h in Headers */ = {isa = PBXBuildFile; fileRef = B4FCD5692B5EDBD300832859 /* MTRDiagnosticLogsType.h */; settings = {ATTRIBUTES = (Public, ); }; };
308+
B4FCD5732B611EB300832859 /* MTRDiagnosticLogsDownloader.h in Headers */ = {isa = PBXBuildFile; fileRef = B4C8E6B32B3453AD00FCD54D /* MTRDiagnosticLogsDownloader.h */; };
309+
B4FCD5702B603A6300832859 /* Commands.h in Headers */ = {isa = PBXBuildFile; fileRef = B4FCD56D2B603A6300832859 /* Commands.h */; };
310+
B4FCD5712B603A6300832859 /* DownloadLogCommand.h in Headers */ = {isa = PBXBuildFile; fileRef = B4FCD56E2B603A6300832859 /* DownloadLogCommand.h */; };
311+
B4FCD5722B603A6300832859 /* DownloadLogCommand.mm in Sources */ = {isa = PBXBuildFile; fileRef = B4FCD56F2B603A6300832859 /* DownloadLogCommand.mm */; };
306312
BA09EB43247477BA00605257 /* libCHIP.a in Frameworks */ = {isa = PBXBuildFile; fileRef = BA09EB3F2474762900605257 /* libCHIP.a */; };
307313
D4772A46285AE98400383630 /* MTRClusterConstants.h in Headers */ = {isa = PBXBuildFile; fileRef = D4772A45285AE98300383630 /* MTRClusterConstants.h */; settings = {ATTRIBUTES = (Public, ); }; };
308314
/* End PBXBuildFile section */
@@ -669,10 +675,16 @@
669675
B45373F82A9FEC4F00807602 /* unix-misc.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "unix-misc.c"; path = "repo/lib/plat/unix/unix-misc.c"; sourceTree = "<group>"; };
670676
B45373F92A9FEC4F00807602 /* unix-init.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "unix-init.c"; path = "repo/lib/plat/unix/unix-init.c"; sourceTree = "<group>"; };
671677
B45373FA2A9FEC4F00807602 /* unix-sockets.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "unix-sockets.c"; path = "repo/lib/plat/unix/unix-sockets.c"; sourceTree = "<group>"; };
678+
B4C8E6B32B3453AD00FCD54D /* MTRDiagnosticLogsDownloader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MTRDiagnosticLogsDownloader.h; sourceTree = "<group>"; };
679+
B4C8E6B42B3453AD00FCD54D /* MTRDiagnosticLogsDownloader.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MTRDiagnosticLogsDownloader.mm; sourceTree = "<group>"; };
672680
B4E262122AA0C7A300DBA5BC /* RemoteDataModelLogger.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = RemoteDataModelLogger.mm; sourceTree = "<group>"; };
673681
B4E262132AA0C7A300DBA5BC /* RemoteDataModelLogger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RemoteDataModelLogger.h; sourceTree = "<group>"; };
674682
B4E262192AA0D01D00DBA5BC /* SleepCommand.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = SleepCommand.mm; sourceTree = "<group>"; };
675683
B4E2621C2AA0D02A00DBA5BC /* WaitForCommissioneeCommand.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WaitForCommissioneeCommand.mm; sourceTree = "<group>"; };
684+
B4FCD5692B5EDBD300832859 /* MTRDiagnosticLogsType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MTRDiagnosticLogsType.h; sourceTree = "<group>"; };
685+
B4FCD56D2B603A6300832859 /* Commands.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Commands.h; sourceTree = "<group>"; };
686+
B4FCD56E2B603A6300832859 /* DownloadLogCommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DownloadLogCommand.h; sourceTree = "<group>"; };
687+
B4FCD56F2B603A6300832859 /* DownloadLogCommand.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = DownloadLogCommand.mm; sourceTree = "<group>"; };
676688
BA09EB3F2474762900605257 /* libCHIP.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libCHIP.a; path = lib/libCHIP.a; sourceTree = BUILT_PRODUCTS_DIR; };
677689
BA107AEE2470CFBB004287EB /* chip_xcode_build_connector.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = chip_xcode_build_connector.sh; sourceTree = "<group>"; };
678690
D437613E285BDC0D0051FEA2 /* MTRErrorTestUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MTRErrorTestUtils.h; sourceTree = "<group>"; };
@@ -741,6 +753,7 @@
741753
037C3D7B2991BD4F00B7EEE2 /* commands */ = {
742754
isa = PBXGroup;
743755
children = (
756+
B4FCD56C2B603A6300832859 /* bdx */,
744757
B4E262182AA0CFFE00DBA5BC /* delay */,
745758
03FB93DA2A46200A0048CB35 /* discover */,
746759
037C3D7C2991BD4F00B7EEE2 /* pairing */,
@@ -1105,6 +1118,9 @@
11051118
B202528F2459E34F00F97062 /* CHIP */ = {
11061119
isa = PBXGroup;
11071120
children = (
1121+
B4FCD5692B5EDBD300832859 /* MTRDiagnosticLogsType.h */,
1122+
B4C8E6B32B3453AD00FCD54D /* MTRDiagnosticLogsDownloader.h */,
1123+
B4C8E6B42B3453AD00FCD54D /* MTRDiagnosticLogsDownloader.mm */,
11081124
1E4D655129C30A8700BC3478 /* MTRCommissionableBrowser.mm */,
11091125
1E4D654C29C208DD00BC3478 /* MTRCommissionableBrowser.h */,
11101126
1E4D654D29C208DD00BC3478 /* MTRCommissionableBrowserDelegate.h */,
@@ -1339,6 +1355,16 @@
13391355
path = delay;
13401356
sourceTree = "<group>";
13411357
};
1358+
B4FCD56C2B603A6300832859 /* bdx */ = {
1359+
isa = PBXGroup;
1360+
children = (
1361+
B4FCD56D2B603A6300832859 /* Commands.h */,
1362+
B4FCD56E2B603A6300832859 /* DownloadLogCommand.h */,
1363+
B4FCD56F2B603A6300832859 /* DownloadLogCommand.mm */,
1364+
);
1365+
path = bdx;
1366+
sourceTree = "<group>";
1367+
};
13421368
BA09EB3E2474762900605257 /* Frameworks */ = {
13431369
isa = PBXGroup;
13441370
children = (
@@ -1368,6 +1394,7 @@
13681394
037C3DCE2991BD5100B7EEE2 /* CHIPCommandBridge.h in Headers */,
13691395
037C3DD22991BD5200B7EEE2 /* InteractiveCommands.h in Headers */,
13701396
037C3DAF2991BD4F00B7EEE2 /* DeviceControllerDelegateBridge.h in Headers */,
1397+
B4FCD5712B603A6300832859 /* DownloadLogCommand.h in Headers */,
13711398
037C3DC32991BD5100B7EEE2 /* Commands.h in Headers */,
13721399
037C3DB82991BD5000B7EEE2 /* ClusterCommandBridge.h in Headers */,
13731400
037C3DC82991BD5100B7EEE2 /* CHIPToolKeypair.h in Headers */,
@@ -1380,6 +1407,7 @@
13801407
037C3DB92991BD5000B7EEE2 /* ReportCommandBridge.h in Headers */,
13811408
037C3DBE2991BD5000B7EEE2 /* OTASoftwareUpdateInteractive.h in Headers */,
13821409
037C3DBD2991BD5000B7EEE2 /* OTAProviderDelegate.h in Headers */,
1410+
B4FCD5702B603A6300832859 /* Commands.h in Headers */,
13831411
037C3DB02991BD4F00B7EEE2 /* Commands.h in Headers */,
13841412
037C3DC02991BD5100B7EEE2 /* Commands.h in Headers */,
13851413
B4E262172AA0CF2000DBA5BC /* RemoteDataModelLogger.h in Headers */,
@@ -1411,6 +1439,7 @@
14111439
5178E6812AE098520069DF72 /* MTRCommandTimedCheck.h in Headers */,
14121440
7596A84B287636C1004DAE0E /* MTRDevice_Internal.h in Headers */,
14131441
5A6FEC9927B5C88900F25F42 /* MTRDeviceOverXPC.h in Headers */,
1442+
B4FCD5732B611EB300832859 /* MTRDiagnosticLogsDownloader.h in Headers */,
14141443
51B22C222740CB1D008D5055 /* MTRCommandPayloadsObjc.h in Headers */,
14151444
51B22C1E2740CB0A008D5055 /* MTRStructsObjc.h in Headers */,
14161445
2CB7163B252E8A7B0026E2BB /* MTRDeviceControllerDelegateBridge.h in Headers */,
@@ -1460,6 +1489,7 @@
14601489
998F286D26D55E10001846C6 /* MTRKeypair.h in Headers */,
14611490
1ED276E426C5832500547A89 /* MTRCluster.h in Headers */,
14621491
3D843711294977000070D20A /* NSStringSpanConversion.h in Headers */,
1492+
B4FCD56A2B5EDBD300832859 /* MTRDiagnosticLogsType.h in Headers */,
14631493
5A6FEC9A27B5C89300F25F42 /* MTRDeviceControllerXPCConnection.h in Headers */,
14641494
5129BCFD26A9EE3300122DDF /* MTRError.h in Headers */,
14651495
2C8C8FC1253E0C2100797F05 /* MTRStorage.h in Headers */,
@@ -1643,6 +1673,7 @@
16431673
B45373C12A9FEA9100807602 /* close.c in Sources */,
16441674
039546A62991E151006D42A8 /* InteractionModel.cpp in Sources */,
16451675
B45373E72A9FEBA400807602 /* parsers.c in Sources */,
1676+
B4FCD5722B603A6300832859 /* DownloadLogCommand.mm in Sources */,
16461677
B45373BF2A9FEA9100807602 /* adopt.c in Sources */,
16471678
B45373F32A9FEC1A00807602 /* server-ws.c in Sources */,
16481679
03F430AA2994113500166449 /* sysunix.c in Sources */,
@@ -1736,6 +1767,7 @@
17361767
AF5F90FF2878D351005503FA /* MTROTAProviderDelegateBridge.mm in Sources */,
17371768
51E95DFC2A78443C00A434F0 /* MTRSessionResumptionStorageBridge.mm in Sources */,
17381769
7534F12828BFF20300390851 /* MTRDeviceAttestationDelegate.mm in Sources */,
1770+
B4C8E6B72B3453AD00FCD54D /* MTRDiagnosticLogsDownloader.mm in Sources */,
17391771
2C5EEEF7268A85C400CAE3D3 /* MTRDeviceConnectionBridge.mm in Sources */,
17401772
51B22C262740CB32008D5055 /* MTRStructsObjc.mm in Sources */,
17411773
2C222AD1255C620600E446B9 /* MTRBaseDevice.mm in Sources */,

0 commit comments

Comments
 (0)
Please sign in to comment.