Skip to content

Commit

Permalink
[Fabric-Sync] Adjust the Subscribe Max Interval to align with test sp…
Browse files Browse the repository at this point in the history
…ec (#36806)
  • Loading branch information
yufengwangca authored Dec 12, 2024
1 parent f3ebc14 commit c55e3ab
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion examples/fabric-sync/admin/BridgeSubscription.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down
7 changes: 6 additions & 1 deletion examples/fabric-sync/admin/DeviceSubscription.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<DeviceSubscription *>(context)->OnDeviceConnected(exchangeMgr, sessionHandle);
Expand Down Expand Up @@ -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);

Expand Down

0 comments on commit c55e3ab

Please sign in to comment.