Skip to content

Commit fcea7dc

Browse files
committed
Builders for the sys handlers
1 parent 2f1d58f commit fcea7dc

14 files changed

Lines changed: 283 additions & 14 deletions

File tree

bloat-check/src/bin/bloat-check.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -653,7 +653,7 @@ fn dm_handler<'a>(
653653
wifi_diag: &'a dyn WifiDiag,
654654
net_ctl: &'a AppNetCtl,
655655
) -> AppDmHandler<'a> {
656-
endpoints::wifi_sys_handler(&true, &(), &(), wifi_diag, &(), &(), net_ctl, rand)
656+
endpoints::WifiSysHandlerBuilder::new(net_ctl, wifi_diag).build(rand)
657657
.chain(
658658
EpClMatcher::new(Some(1), Some(desc::DescHandler::CLUSTER.id)),
659659
Async(desc::DescHandler::new(Dataver::new_rand(&mut rand)).adapt()),

examples/src/bin/bridge.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,9 @@ fn dm_handler<'a, OH: OnOffHooks, LH: LevelControlHooks>(
208208
) -> impl DataModelHandler + 'a {
209209
(
210210
NODE,
211-
endpoints::eth_sys_handler(&false, &(), &SysNetifs, &(), &(), rand)
211+
endpoints::EthSysHandlerBuilder::new()
212+
.netif_diag(&SysNetifs)
213+
.build(rand)
212214
// The next chain is the handler for the "aggregator" endpoint 1.
213215
//
214216
// Note how the descriptor cluster is a bit different compared to the normal ones.

examples/src/bin/camera_tests.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -686,7 +686,9 @@ fn dm_handler<'a>(
686686
) -> impl DataModelHandler + 'a {
687687
(
688688
NODE,
689-
endpoints::eth_sys_handler(&false, &(), &SysNetifs, &(), &(), rand)
689+
endpoints::EthSysHandlerBuilder::new()
690+
.netif_diag(&SysNetifs)
691+
.build(rand)
690692
.chain(
691693
EpClMatcher::new(Some(1), Some(desc::DescHandler::CLUSTER.id)),
692694
Async(desc::DescHandler::new(Dataver::new_rand(&mut rand)).adapt()),

examples/src/bin/chip_tool_tests.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -619,7 +619,10 @@ fn dm_handler<'a, OH: OnOffHooks, LH: LevelControlHooks>(
619619
) -> impl DataModelHandler + 'a {
620620
(
621621
node,
622-
endpoints::eth_sys_handler(&false, gen_diag, &SysNetifs, &(), &(), rand)
622+
endpoints::EthSysHandlerBuilder::new()
623+
.gen_diag(gen_diag)
624+
.netif_diag(&SysNetifs)
625+
.build(rand)
623626
// Groups handler at the root endpoint. The library-level
624627
// `with_*_sys()` chain in `rs-matter/src/dm/endpoints.rs`
625628
// intentionally does *not* bind Groups at root anymore —

examples/src/bin/dimmable_light.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,9 @@ fn dm_handler<'a, LH: LevelControlHooks, OH: OnOffHooks>(
274274
) -> impl DataModelHandler + 'a {
275275
(
276276
NODE,
277-
endpoints::eth_sys_handler(&false, &(), &SysNetifs, &(), &(), rand)
277+
endpoints::EthSysHandlerBuilder::new()
278+
.netif_diag(&SysNetifs)
279+
.build(rand)
278280
.chain(
279281
EpClMatcher::new(Some(1), Some(desc::DescHandler::CLUSTER.id)),
280282
Async(desc::DescHandler::new(Dataver::new_rand(&mut rand)).adapt()),

examples/src/bin/media_player.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,9 @@ fn dm_handler<'a, OH: OnOffHooks, LH: LevelControlHooks>(
187187
) -> impl DataModelHandler + 'a {
188188
(
189189
NODE,
190-
endpoints::eth_sys_handler(&false, &(), &SysNetifs, &(), &(), rand)
190+
endpoints::EthSysHandlerBuilder::new()
191+
.netif_diag(&SysNetifs)
192+
.build(rand)
191193
.chain(
192194
EpClMatcher::new(Some(1), Some(desc::DescHandler::CLUSTER.id)),
193195
Async(desc::DescHandler::new(Dataver::new_rand(&mut rand)).adapt()),

examples/src/bin/onoff_light.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,9 @@ fn dm_handler<'a, OH: OnOffHooks, LH: LevelControlHooks>(
210210
) -> impl DataModelHandler + 'a {
211211
(
212212
NODE,
213-
endpoints::eth_sys_handler(&false, &(), &SysNetifs, &(), &(), rand)
213+
endpoints::EthSysHandlerBuilder::new()
214+
.netif_diag(&SysNetifs)
215+
.build(rand)
214216
.chain(
215217
EpClMatcher::new(Some(1), Some(desc::DescHandler::CLUSTER.id)),
216218
Async(desc::DescHandler::new(Dataver::new_rand(&mut rand)).adapt()),

examples/src/bin/onoff_light_bt.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,9 @@ where
280280
{
281281
(
282282
NODE,
283-
endpoints::wifi_sys_handler(&true, &(), &UnixNetifs, wifi_diag, &(), &(), net_ctl, rand)
283+
endpoints::WifiSysHandlerBuilder::new(net_ctl, wifi_diag)
284+
.netif_diag(&UnixNetifs)
285+
.build(rand)
284286
.chain(
285287
EpClMatcher::new(Some(1), Some(desc::DescHandler::CLUSTER.id)),
286288
Async(desc::DescHandler::new(Dataver::new_rand(&mut rand)).adapt()),

examples/src/bin/onoff_light_work_stealing.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,9 @@ fn dm_handler<'a>(
255255
mut rand: impl RngCore + Copy,
256256
on_off: on_off::OnOffHandler<'a, TestOnOffDeviceLogic, NoLevelControl>,
257257
) -> AppDmHandler<'a> {
258-
endpoints::eth_sys_handler(&false, &(), &SysNetifs, &(), &(), rand)
258+
endpoints::EthSysHandlerBuilder::new()
259+
.netif_diag(&SysNetifs)
260+
.build(rand)
259261
.chain(
260262
EpClMatcher::new(Some(1), Some(desc::DescHandler::CLUSTER.id)),
261263
Async(desc::DescHandler::new(Dataver::new_rand(&mut rand)).adapt()),

examples/src/bin/speaker.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,9 @@ fn dm_handler<'a, LH: LevelControlHooks, OH: OnOffHooks>(
184184
) -> impl DataModelHandler + 'a {
185185
(
186186
NODE,
187-
endpoints::eth_sys_handler(&false, &(), &SysNetifs, &(), &(), rand)
187+
endpoints::EthSysHandlerBuilder::new()
188+
.netif_diag(&SysNetifs)
189+
.build(rand)
188190
.chain(
189191
EpClMatcher::new(Some(1), Some(desc::DescHandler::CLUSTER.id)),
190192
Async(desc::DescHandler::new(Dataver::new_rand(&mut rand)).adapt()),

0 commit comments

Comments
 (0)