From c55e3abf3d83256ddc0119414d98a6d02ee34133 Mon Sep 17 00:00:00 2001 From: Yufeng Wang Date: Thu, 12 Dec 2024 10:04:04 -0800 Subject: [PATCH] [Fabric-Sync] Adjust the Subscribe Max Interval to align with test spec (#36806) --- examples/fabric-sync/admin/BridgeSubscription.cpp | 2 +- examples/fabric-sync/admin/DeviceSubscription.cpp | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/examples/fabric-sync/admin/BridgeSubscription.cpp b/examples/fabric-sync/admin/BridgeSubscription.cpp index 1df9371ff74dff..a6778a0f0324e6 100644 --- a/examples/fabric-sync/admin/BridgeSubscription.cpp +++ b/examples/fabric-sync/admin/BridgeSubscription.cpp @@ -28,7 +28,7 @@ namespace admin { namespace { constexpr uint16_t kSubscribeMinInterval = 0; -constexpr uint16_t kSubscribeMaxInterval = 60; +constexpr uint16_t kSubscribeMaxInterval = 30; void OnDeviceConnectedWrapper(void * context, Messaging::ExchangeManager & exchangeMgr, const SessionHandle & sessionHandle) { diff --git a/examples/fabric-sync/admin/DeviceSubscription.cpp b/examples/fabric-sync/admin/DeviceSubscription.cpp index 9379df6910f84a..65f65f94cd3bd2 100644 --- a/examples/fabric-sync/admin/DeviceSubscription.cpp +++ b/examples/fabric-sync/admin/DeviceSubscription.cpp @@ -32,6 +32,9 @@ namespace admin { namespace { +constexpr uint16_t kSubscribeMinInterval = 0; +constexpr uint16_t kSubscribeMaxInterval = 10; + void OnDeviceConnectedWrapper(void * context, Messaging::ExchangeManager & exchangeMgr, const SessionHandle & sessionHandle) { reinterpret_cast(context)->OnDeviceConnected(exchangeMgr, sessionHandle); @@ -160,7 +163,9 @@ void DeviceSubscription::OnDeviceConnected(Messaging::ExchangeManager & exchange readParams.mpAttributePathParamsList = readPaths; readParams.mAttributePathParamsListSize = 1; - readParams.mMaxIntervalCeilingSeconds = 5 * 60; + readParams.mMinIntervalFloorSeconds = kSubscribeMinInterval; + readParams.mMaxIntervalCeilingSeconds = kSubscribeMaxInterval; + readParams.mKeepSubscriptions = true; CHIP_ERROR err = mClient->SendRequest(readParams);