Skip to content

Commit 2b1029e

Browse files
Use dependency injection in NetworkCommissioningCluster cluster for global values (project-chip#42929)
* Decouple `NetworkCommissioningCluster` * Fix `Server` not defined in `CodegenInstance.h` * Restyled by clang-format * Remove unused headers * Fix `WifiRootNodeDevice` * Add needed context for `WifiRootNodeDevice` And rename `platformMgr` to `platformManager` * Make context in `RootNodeDevice` protected * Move `BreadcrumbTracker` into `Context` * Restyled by clang-format * Fix --------- Co-authored-by: Restyled.io <commits@restyled.io>
1 parent 1c3aabe commit 2b1029e

8 files changed

Lines changed: 77 additions & 48 deletions

File tree

examples/all-devices-app/all-devices-common/devices/root-node/RootNodeDevice.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,11 @@ class RootNodeDevice : public SingleEndpointDevice
6666
void UnRegister(CodeDrivenDataModelProvider & provider) override;
6767

6868
protected:
69+
Context mContext;
70+
6971
LazyRegisteredServerCluster<Clusters::GeneralCommissioningCluster> mGeneralCommissioningCluster;
7072

7173
private:
72-
Context mContext;
73-
7474
LazyRegisteredServerCluster<Clusters::BasicInformationCluster> mBasicInformationCluster;
7575
LazyRegisteredServerCluster<Clusters::AdministratorCommissioningWithBasicCommissioningWindowCluster>
7676
mAdministratorCommissioningCluster;

examples/all-devices-app/all-devices-common/devices/root-node/WifiRootNodeDevice.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,13 @@ CHIP_ERROR WifiRootNodeDevice::Register(EndpointId endpointId, CodeDrivenDataMod
3434
BitFlags<WiFiNetworkDiagnostics::Feature>{});
3535
ReturnErrorOnFailure(provider.AddCluster(mWifiDiagnosticsCluster.Registration()));
3636

37-
mNetworkCommissioningCluster.Create(endpointId, &mWifiContext.wifiDriver, mGeneralCommissioningCluster.Cluster());
37+
mNetworkCommissioningCluster.Create(endpointId, &mWifiContext.wifiDriver,
38+
NetworkCommissioningCluster::Context{
39+
.breadcrumbTracker = mGeneralCommissioningCluster.Cluster(),
40+
.failSafeContext = mContext.failSafeContext,
41+
.platformManager = mContext.platformManager,
42+
.deviceControlServer = mContext.deviceControlServer,
43+
});
3844
ReturnErrorOnFailure(mNetworkCommissioningCluster.Cluster().Init());
3945
ReturnErrorOnFailure(provider.AddCluster(mNetworkCommissioningCluster.Registration()));
4046

examples/all-devices-app/esp32/main/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ chip::app::DataModel::Provider * PopulateCodeDrivenDataModelProvider(PersistentS
214214
.failSafeContext = Server::GetInstance().GetFailSafeContext(), //
215215
.deviceInstanceInfoProvider = *provider, //
216216
.platformManager = DeviceLayer::PlatformMgr(), //
217-
.groupDataProvider = gGropupDataProvider, //
217+
.groupDataProvider = gGroupDataProvider, //
218218
.sessionManager = Server::GetInstance().GetSecureSessionManager(), //
219219
.dnssdServer = DnssdServer::Instance(), //
220220

src/app/clusters/network-commissioning/CodegenInstance.h

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020

2121
#include <app/clusters/general-commissioning-server/BreadCrumbTracker.h>
2222
#include <app/server-cluster/ServerClusterInterfaceRegistry.h>
23+
#include <app/server/Server.h>
2324
#include <data-model-providers/codegen/CodegenDataModelProvider.h>
2425

2526
namespace chip {
@@ -45,9 +46,9 @@ class Instance
4546
/// Calls Shutdown on the cluster and unregisters the cluster from the CodegenDataModelProvider Registry
4647
void Shutdown();
4748

48-
Instance(EndpointId aEndpointId, WiFiDriver * apDelegate) : mCluster(aEndpointId, apDelegate, mTracker) {}
49-
Instance(EndpointId aEndpointId, ThreadDriver * apDelegate) : mCluster(aEndpointId, apDelegate, mTracker) {}
50-
Instance(EndpointId aEndpointId, EthernetDriver * apDelegate) : mCluster(aEndpointId, apDelegate, mTracker) {}
49+
Instance(EndpointId aEndpointId, WiFiDriver * apDelegate) : mCluster(aEndpointId, apDelegate, mContext) {}
50+
Instance(EndpointId aEndpointId, ThreadDriver * apDelegate) : mCluster(aEndpointId, apDelegate, mContext) {}
51+
Instance(EndpointId aEndpointId, EthernetDriver * apDelegate) : mCluster(aEndpointId, apDelegate, mContext) {}
5152

5253
private:
5354
// Does the tracking via the public general commissioning cluster (if available)
@@ -58,6 +59,12 @@ class Instance
5859
};
5960

6061
CodegenGeneralCommissioningBreadcrumbTracker mTracker;
62+
NetworkCommissioningCluster::Context mContext{
63+
.breadcrumbTracker = mTracker,
64+
.failSafeContext = Server::GetInstance().GetFailSafeContext(),
65+
.platformManager = DeviceLayer::PlatformMgr(),
66+
.deviceControlServer = DeviceLayer::DeviceControlServer::DeviceControlSvr(),
67+
};
6168
RegisteredServerCluster<NetworkCommissioningCluster> mCluster;
6269
};
6370

src/app/clusters/network-commissioning/NetworkCommissioningCluster.cpp

Lines changed: 18 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
#include <app/reporting/reporting.h>
3030
#include <app/server-cluster/AttributeListBuilder.h>
3131
#include <app/server-cluster/DefaultServerCluster.h>
32-
#include <app/server/Server.h>
3332
#include <clusters/NetworkCommissioning/AttributeIds.h>
3433
#include <clusters/NetworkCommissioning/CommandIds.h>
3534
#include <clusters/NetworkCommissioning/Commands.h>
@@ -46,8 +45,6 @@
4645
#include <optional>
4746
#include <platform/CHIPDeviceConfig.h>
4847
#include <platform/ConnectivityManager.h>
49-
#include <platform/DeviceControlServer.h>
50-
#include <platform/PlatformManager.h>
5148
#include <platform/internal/DeviceNetworkInfo.h>
5249
#include <protocols/interaction_model/StatusCode.h>
5350
#include <tracing/macros.h>
@@ -150,10 +147,8 @@ void FillDebugTextAndNetworkIndex(Commands::NetworkConfigResponse::Type & respon
150147
}
151148
}
152149

153-
std::optional<ActionReturnStatus> EnsureFailsafeIsArmed(FabricIndex fabricIndex)
150+
std::optional<ActionReturnStatus> EnsureFailsafeIsArmed(FailSafeContext & failSafeContext, FabricIndex fabricIndex)
154151
{
155-
auto & failSafeContext = chip::Server::GetInstance().GetFailSafeContext();
156-
157152
if (!failSafeContext.IsFailSafeArmed(fabricIndex))
158153
{
159154
return Protocols::InteractionModel::Status::FailsafeRequired;
@@ -166,35 +161,31 @@ std::optional<ActionReturnStatus> EnsureFailsafeIsArmed(FabricIndex fabricIndex)
166161
/// is not armed for the given fabric index.
167162
///
168163
/// This just wraps EnsureFailsafeIsArmed with a one-liner for check & return.
169-
#define RETURN_ERROR_STATUS_IF_FAILSAFE_NOT_ARMED(fabricIndex) \
170-
if (std::optional<ActionReturnStatus> status = EnsureFailsafeIsArmed(fabricIndex); status.has_value()) \
164+
#define RETURN_ERROR_STATUS_IF_FAILSAFE_NOT_ARMED(failSafeContext, fabricIndex) \
165+
if (std::optional<ActionReturnStatus> status = EnsureFailsafeIsArmed(failSafeContext, fabricIndex); status.has_value()) \
171166
{ \
172167
return status; \
173168
} \
174169
(void) 0
175170
} // namespace
176171

177-
NetworkCommissioningCluster::NetworkCommissioningCluster(EndpointId endpointId, WiFiDriver * driver, BreadCrumbTracker & tracker) :
172+
NetworkCommissioningCluster::NetworkCommissioningCluster(EndpointId endpointId, WiFiDriver * driver, const Context & context) :
178173
DefaultServerCluster({ endpointId, NetworkCommissioning::Id }), mEndpointId(endpointId), mFeatureFlags(WiFiFeatures(driver)),
179-
mpWirelessDriver(driver), mpBaseDriver(driver), mBreadcrumbTracker(tracker)
174+
mpWirelessDriver(driver), mpBaseDriver(driver), mClusterContext(context)
180175
{
181176
mpDriver.Set<WiFiDriver *>(driver);
182177
}
183178

184-
NetworkCommissioningCluster::NetworkCommissioningCluster(EndpointId endpointId, ThreadDriver * driver,
185-
BreadCrumbTracker & tracker) :
186-
DefaultServerCluster({ endpointId, NetworkCommissioning::Id }),
187-
mEndpointId(endpointId), mFeatureFlags(Feature::kThreadNetworkInterface), mpWirelessDriver(driver), mpBaseDriver(driver),
188-
mBreadcrumbTracker(tracker)
179+
NetworkCommissioningCluster::NetworkCommissioningCluster(EndpointId endpointId, ThreadDriver * driver, const Context & context) :
180+
DefaultServerCluster({ endpointId, NetworkCommissioning::Id }), mEndpointId(endpointId),
181+
mFeatureFlags(Feature::kThreadNetworkInterface), mpWirelessDriver(driver), mpBaseDriver(driver), mClusterContext(context)
189182
{
190183
mpDriver.Set<ThreadDriver *>(driver);
191184
}
192185

193-
NetworkCommissioningCluster::NetworkCommissioningCluster(EndpointId endpointId, EthernetDriver * driver,
194-
BreadCrumbTracker & tracker) :
195-
DefaultServerCluster({ endpointId, NetworkCommissioning::Id }),
196-
mEndpointId(endpointId), mFeatureFlags(Feature::kEthernetNetworkInterface), mpWirelessDriver(nullptr), mpBaseDriver(driver),
197-
mBreadcrumbTracker(tracker)
186+
NetworkCommissioningCluster::NetworkCommissioningCluster(EndpointId endpointId, EthernetDriver * driver, const Context & context) :
187+
DefaultServerCluster({ endpointId, NetworkCommissioning::Id }), mEndpointId(endpointId),
188+
mFeatureFlags(Feature::kEthernetNetworkInterface), mpWirelessDriver(nullptr), mpBaseDriver(driver), mClusterContext(context)
198189
{}
199190

200191
#if CHIP_DEVICE_CONFIG_SUPPORTS_CONCURRENT_CONNECTION
@@ -203,7 +194,7 @@ NetworkCommissioningCluster::NetworkInstanceList NetworkCommissioningCluster::sI
203194

204195
CHIP_ERROR NetworkCommissioningCluster::Init()
205196
{
206-
ReturnErrorOnFailure(DeviceLayer::PlatformMgrImpl().AddEventHandler(OnPlatformEventHandler, reinterpret_cast<intptr_t>(this)));
197+
ReturnErrorOnFailure(mClusterContext.platformManager.AddEventHandler(OnPlatformEventHandler, reinterpret_cast<intptr_t>(this)));
207198
ReturnErrorOnFailure(mpBaseDriver->Init(this));
208199
mLastNetworkingStatusValue.SetNull();
209200
mLastConnectErrorValue.SetNull();
@@ -378,7 +369,7 @@ NetworkCommissioningCluster::HandleAddOrUpdateWiFiNetwork(CommandHandler & handl
378369
#if CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION || CHIP_DEVICE_CONFIG_ENABLE_WIFI_AP
379370
MATTER_TRACE_SCOPE("HandleAddOrUpdateWiFiNetwork", "NetworkCommissioning");
380371

381-
RETURN_ERROR_STATUS_IF_FAILSAFE_NOT_ARMED(handler.GetAccessingFabricIndex());
372+
RETURN_ERROR_STATUS_IF_FAILSAFE_NOT_ARMED(mClusterContext.failSafeContext, handler.GetAccessingFabricIndex());
382373

383374
if (req.ssid.empty() || req.ssid.size() > DeviceLayer::Internal::kMaxWiFiSSIDLength)
384375
{
@@ -566,7 +557,7 @@ NetworkCommissioningCluster::HandleAddOrUpdateThreadNetwork(CommandHandler & han
566557

567558
MATTER_TRACE_SCOPE("HandleAddOrUpdateThreadNetwork", "NetworkCommissioning");
568559

569-
RETURN_ERROR_STATUS_IF_FAILSAFE_NOT_ARMED(handler.GetAccessingFabricIndex());
560+
RETURN_ERROR_STATUS_IF_FAILSAFE_NOT_ARMED(mClusterContext.failSafeContext, handler.GetAccessingFabricIndex());
570561

571562
Commands::NetworkConfigResponse::Type response;
572563
DebugTextStorage debugTextBuffer;
@@ -590,7 +581,7 @@ NetworkCommissioningCluster::HandleAddOrUpdateThreadNetwork(CommandHandler & han
590581
void NetworkCommissioningCluster::UpdateBreadcrumb(const Optional<uint64_t> & breadcrumb)
591582
{
592583
VerifyOrReturn(breadcrumb.HasValue());
593-
mBreadcrumbTracker.SetBreadCrumb(breadcrumb.Value());
584+
mClusterContext.breadcrumbTracker.SetBreadCrumb(breadcrumb.Value());
594585
}
595586

596587
void NetworkCommissioningCluster::CommitSavedBreadcrumb()
@@ -607,7 +598,7 @@ NetworkCommissioningCluster::HandleRemoveNetwork(CommandHandler & handler, const
607598
{
608599
MATTER_TRACE_SCOPE("HandleRemoveNetwork", "NetworkCommissioning");
609600

610-
RETURN_ERROR_STATUS_IF_FAILSAFE_NOT_ARMED(handler.GetAccessingFabricIndex());
601+
RETURN_ERROR_STATUS_IF_FAILSAFE_NOT_ARMED(mClusterContext.failSafeContext, handler.GetAccessingFabricIndex());
611602

612603
Commands::NetworkConfigResponse::Type response;
613604
DebugTextStorage debugTextBuffer;
@@ -642,7 +633,7 @@ NetworkCommissioningCluster::HandleConnectNetwork(CommandHandler & handler, cons
642633
return Protocols::InteractionModel::Status::ConstraintError;
643634
}
644635

645-
RETURN_ERROR_STATUS_IF_FAILSAFE_NOT_ARMED(handler.GetAccessingFabricIndex());
636+
RETURN_ERROR_STATUS_IF_FAILSAFE_NOT_ARMED(mClusterContext.failSafeContext, handler.GetAccessingFabricIndex());
646637

647638
mConnectingNetworkIDLen = static_cast<uint8_t>(req.networkID.size());
648639
memcpy(mConnectingNetworkID, req.networkID.data(), mConnectingNetworkIDLen);
@@ -837,7 +828,7 @@ void NetworkCommissioningCluster::OnResult(Status commissioningError, CharSpan d
837828
}
838829
if (commissioningError == Status::kSuccess)
839830
{
840-
TEMPORARY_RETURN_IGNORED DeviceLayer::DeviceControlServer::DeviceControlSvr().PostConnectedToOperationalNetworkEvent(
831+
TEMPORARY_RETURN_IGNORED mClusterContext.deviceControlServer.PostConnectedToOperationalNetworkEvent(
841832
ByteSpan(mLastNetworkID, mLastNetworkIDLen));
842833
SetLastConnectErrorValue(NullNullable);
843834
}

src/app/clusters/network-commissioning/NetworkCommissioningCluster.h

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,14 @@
1919
#include <app/AttributeValueEncoder.h>
2020
#include <app/CommandHandler.h>
2121
#include <app/ConcreteCommandPath.h>
22+
#include <app/FailSafeContext.h>
2223
#include <app/clusters/general-commissioning-server/BreadCrumbTracker.h>
2324
#include <app/data-model-provider/ActionReturnStatus.h>
2425
#include <app/data-model/Nullable.h>
2526
#include <app/server-cluster/DefaultServerCluster.h>
2627
#include <clusters/NetworkCommissioning/Attributes.h>
2728
#include <clusters/NetworkCommissioning/Commands.h>
29+
#include <include/platform/DeviceControlServer.h>
2830
#include <lib/core/CHIPError.h>
2931
#include <lib/support/IntrusiveList.h>
3032
#include <lib/support/ThreadOperationalDataset.h>
@@ -69,11 +71,19 @@ class NetworkCommissioningCluster : private NetworkCommissioningLogicListNode,
6971
using WiFiDriver = DeviceLayer::NetworkCommissioning::WiFiDriver;
7072
using EthernetDriver = DeviceLayer::NetworkCommissioning::EthernetDriver;
7173

72-
NetworkCommissioningCluster(EndpointId endpointId, WiFiDriver * driver, BreadCrumbTracker & tracker);
74+
struct Context
75+
{
76+
BreadCrumbTracker & breadcrumbTracker;
77+
FailSafeContext & failSafeContext;
78+
DeviceLayer::PlatformManager & platformManager;
79+
DeviceLayer::DeviceControlServer & deviceControlServer;
80+
};
81+
82+
NetworkCommissioningCluster(EndpointId endpointId, WiFiDriver * driver, const Context & context);
7383

74-
NetworkCommissioningCluster(EndpointId endpointId, ThreadDriver * driver, BreadCrumbTracker & tracker);
84+
NetworkCommissioningCluster(EndpointId endpointId, ThreadDriver * driver, const Context & context);
7585

76-
NetworkCommissioningCluster(EndpointId endpointId, EthernetDriver * driver, BreadCrumbTracker & tracker);
86+
NetworkCommissioningCluster(EndpointId endpointId, EthernetDriver * driver, const Context & context);
7787

7888
// Server cluster implementation
7989
DataModel::ActionReturnStatus ReadAttribute(const DataModel::ReadAttributeRequest & request,
@@ -230,7 +240,7 @@ class NetworkCommissioningCluster : private NetworkCommissioningLogicListNode,
230240
uint8_t mLastNetworkIDLen = 0;
231241
Optional<uint64_t> mCurrentOperationBreadcrumb;
232242
bool mScanningWasDirected = false;
233-
BreadCrumbTracker & mBreadcrumbTracker;
243+
Context mClusterContext;
234244

235245
void SetLastNetworkingStatusValue(NetworkCommissioning::Attributes::LastNetworkingStatus::TypeInfo::Type networkingStatusValue);
236246
void SetLastConnectErrorValue(NetworkCommissioning::Attributes::LastConnectErrorValue::TypeInfo::Type connectErrorValue);

src/app/clusters/network-commissioning/tests/TestNetworkCommissioningCluster.cpp

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
#include <app/server-cluster/testing/ClusterTester.h>
2424
#include <app/server-cluster/testing/TestServerClusterContext.h>
2525
#include <app/server-cluster/testing/ValidateGlobalAttributes.h>
26+
#include <app/server/Server.h>
2627
#include <clusters/GeneralCommissioning/Attributes.h>
2728
#include <clusters/NetworkCommissioning/Commands.h>
2829
#include <clusters/NetworkCommissioning/Enums.h>
@@ -55,17 +56,24 @@ class NoopBreadcrumbTracker : public BreadCrumbTracker
5556
// initialize memory as ReadOnlyBufferBuilder may allocate
5657
struct TestNetworkCommissioningCluster : public ::testing::Test
5758
{
58-
static void SetUpTestSuite() { ASSERT_EQ(chip::Platform::MemoryInit(), CHIP_NO_ERROR); }
59-
static void TearDownTestSuite() { chip::Platform::MemoryShutdown(); }
59+
static void SetUpTestSuite() { ASSERT_EQ(Platform::MemoryInit(), CHIP_NO_ERROR); }
60+
static void TearDownTestSuite() { Platform::MemoryShutdown(); }
61+
62+
inline static NoopBreadcrumbTracker tracker;
63+
inline static NetworkCommissioningCluster::Context defaultContext{
64+
.breadcrumbTracker = tracker,
65+
.failSafeContext = Server::GetInstance().GetFailSafeContext(),
66+
.platformManager = DeviceLayer::PlatformMgr(),
67+
.deviceControlServer = DeviceLayer::DeviceControlServer::DeviceControlSvr(),
68+
};
6069
};
6170

6271
TEST_F(TestNetworkCommissioningCluster, TestAttributes)
6372
{
64-
NoopBreadcrumbTracker tracker;
6573
{
6674
Testing::FakeWiFiDriver fakeWifiDriver;
6775

68-
NetworkCommissioningCluster cluster(kRootEndpointId, &fakeWifiDriver, tracker);
76+
NetworkCommissioningCluster cluster(kRootEndpointId, &fakeWifiDriver, defaultContext);
6977

7078
// NOTE: this is AWKWARD: we pass in a wifi driver, yet attributes are still depending
7179
// on device enabling. Ideally we should not allow compiling odd things at all.
@@ -93,8 +101,7 @@ TEST_F(TestNetworkCommissioningCluster, TestAttributes)
93101
TEST_F(TestNetworkCommissioningCluster, TestNotifyOnEnableInterface)
94102
{
95103
Testing::FakeWiFiDriver fakeWifiDriver;
96-
NoopBreadcrumbTracker tracker;
97-
NetworkCommissioningCluster cluster(kRootEndpointId, &fakeWifiDriver, tracker);
104+
NetworkCommissioningCluster cluster(kRootEndpointId, &fakeWifiDriver, defaultContext);
98105

99106
ClusterTester tester(cluster);
100107
ASSERT_EQ(cluster.Startup(tester.GetServerClusterContext()), CHIP_NO_ERROR);

src/app/clusters/network-commissioning/tests/TestNetworkCommissioningClusterEthernet.cpp

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
#include <app/server-cluster/testing/ClusterTester.h>
2525
#include <app/server-cluster/testing/TestServerClusterContext.h>
2626
#include <app/server-cluster/testing/ValidateGlobalAttributes.h>
27+
#include <app/server/Server.h>
2728
#include <clusters/GeneralCommissioning/Attributes.h>
2829
#include <clusters/NetworkCommissioning/Commands.h>
2930
#include <clusters/NetworkCommissioning/Enums.h>
@@ -53,16 +54,23 @@ class NoopBreadcrumbTracker : public BreadCrumbTracker
5354
// initialize memory as ReadOnlyBufferBuilder may allocate
5455
struct TestNetworkCommissioningClusterEthernet : public ::testing::Test
5556
{
56-
static void SetUpTestSuite() { ASSERT_EQ(chip::Platform::MemoryInit(), CHIP_NO_ERROR); }
57-
static void TearDownTestSuite() { chip::Platform::MemoryShutdown(); }
57+
static void SetUpTestSuite() { ASSERT_EQ(Platform::MemoryInit(), CHIP_NO_ERROR); }
58+
static void TearDownTestSuite() { Platform::MemoryShutdown(); }
59+
60+
inline static NoopBreadcrumbTracker tracker;
61+
inline static NetworkCommissioningCluster::Context defaultContext{
62+
.breadcrumbTracker = tracker,
63+
.failSafeContext = Server::GetInstance().GetFailSafeContext(),
64+
.platformManager = DeviceLayer::PlatformMgr(),
65+
.deviceControlServer = DeviceLayer::DeviceControlServer::DeviceControlSvr(),
66+
};
5867
};
5968

6069
TEST_F(TestNetworkCommissioningClusterEthernet, TestAttributes)
6170
{
62-
NoopBreadcrumbTracker tracker;
6371
Testing::FakeEthernetDriver fakeEthernetDriver;
6472
ByteSpan testInterfaceName(Uint8::from_const_char("eth0_test"), 9);
65-
NetworkCommissioningCluster cluster(kRootEndpointId, &fakeEthernetDriver, tracker);
73+
NetworkCommissioningCluster cluster(kRootEndpointId, &fakeEthernetDriver, defaultContext);
6674
chip::Testing::ClusterTester tester(cluster);
6775
ASSERT_EQ(cluster.Init(), CHIP_NO_ERROR);
6876
ASSERT_EQ(cluster.Startup(tester.GetServerClusterContext()), CHIP_NO_ERROR);

0 commit comments

Comments
 (0)