Skip to content

Commit

Permalink
[nrf toup][nrfconnect] Introduced Kconfigs to configure few params
Browse files Browse the repository at this point in the history
Introduced new Kconfig options to be able to configure the
parameters related to persistent subscriptions re-establishment.

Signed-off-by: Kamil Kasperczyk <[email protected]>
  • Loading branch information
kkasperczyk-no committed Jun 24, 2024
1 parent 022f2c9 commit 374946d
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 3 deletions.
36 changes: 36 additions & 0 deletions config/nrfconnect/chip-module/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,42 @@ config CHIP_PERSISTENT_SUBSCRIPTIONS
# selecting experimental for this feature since there is an issue with multiple controllers.
select EXPERIMENTAL

config CHIP_MAX_FABRICS
int "Maximum number of Matter fabrics"
default 5
help
The maximum number of Matter fabrics that device can be joined to.

config CHIP_MAX_ACTIVE_CASE_CLIENTS
int "Maximum number of outgoing CASE sessions"
default CHIP_MAX_FABRICS if CHIP_PERSISTENT_SUBSCRIPTIONS
default 2
help
The maximum number of outgoing CASE sessions that can be simutaneously handled by the end device.

config CHIP_MAX_ACTIVE_DEVICES
int "Maximum number of simultaneous connections over CASE"
default CHIP_MAX_FABRICS if CHIP_PERSISTENT_SUBSCRIPTIONS
default 4
help
The maximum number of devices to which the Server implementers will be able to
concurrently connect over CASE and interact with.

config CHIP_SUBSCRIPTION_RESUMPTION_MIN_RETRY_INTERVAL
int "Minimum subscrpition resumption interval in seconds"
default 20 if CHIP_PERSISTENT_SUBSCRIPTIONS
default 300
help
The minimum interval in seconds before resuming a subsciption that timed out.

config CHIP_SUBSCRIPTION_RESUMPTION_RETRY_MULTIPLIER
int "The multiplier for suscription resumption retry in seconds"
default 40 if CHIP_PERSISTENT_SUBSCRIPTIONS
default 300
help
The multiplier per subscription resumption retry attempt that is multiplied by the index of Fibonacci sequence
and added to CHIP_SUBSCRIPTION_RESUMPTION_MIN_RETRY_INTERVAL to obtain final wait time for next retry.

config CHIP_ENABLE_BDX_LOG_TRANSFER
bool "Enable BDX transfer for diagnostic logs"
help
Expand Down
22 changes: 19 additions & 3 deletions src/platform/nrfconnect/CHIPPlatformConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,25 @@
#define CHIP_CONFIG_BDX_MAX_NUM_TRANSFERS 1
#endif // CHIP_CONFIG_BDX_MAX_NUM_TRANSFERS

#ifndef CHIP_CONFIG_MAX_FABRICS
#define CHIP_CONFIG_MAX_FABRICS 5
#endif
#ifdef CONFIG_CHIP_MAX_FABRICS
#define CHIP_CONFIG_MAX_FABRICS CONFIG_CHIP_MAX_FABRICS
#endif // CONFIG_CHIP_MAX_FABRICS

#ifdef CONFIG_CHIP_MAX_ACTIVE_CASE_CLIENTS
#define CHIP_CONFIG_DEVICE_MAX_ACTIVE_CASE_CLIENTS CONFIG_CHIP_MAX_ACTIVE_CASE_CLIENTS
#endif // CONFIG_CHIP_MAX_ACTIVE_CASE_CLIENTS

#ifdef CONFIG_CHIP_MAX_ACTIVE_DEVICES
#define CHIP_CONFIG_DEVICE_MAX_ACTIVE_DEVICES CONFIG_CHIP_MAX_ACTIVE_DEVICES
#endif // CONFIG_CHIP_MAX_ACTIVE_DEVICES

#ifdef CONFIG_CHIP_SUBSCRIPTION_RESUMPTION_MIN_RETRY_INTERVAL
#define CHIP_CONFIG_SUBSCRIPTION_TIMEOUT_RESUMPTION_MIN_RETRY_INTERVAL_SECS CONFIG_CHIP_SUBSCRIPTION_RESUMPTION_MIN_RETRY_INTERVAL
#endif // CONFIG_CHIP_SUBSCRIPTION_RESUMPTION_MIN_RETRY_INTERVAL

#ifdef CONFIG_CHIP_SUBSCRIPTION_RESUMPTION_RETRY_MULTIPLIER
#define CHIP_CONFIG_SUBSCRIPTION_TIMEOUT_RESUMPTION_WAIT_TIME_MULTIPLIER_SECS CONFIG_CHIP_SUBSCRIPTION_RESUMPTION_RETRY_MULTIPLIER
#endif // CONFIG_CHIP_SUBSCRIPTION_RESUMPTION_RETRY_MULTIPLIER

#ifdef CONFIG_CHIP_LOG_SIZE_OPTIMIZATION
// Disable some of the too detailed log modules to save flash
Expand Down

0 comments on commit 374946d

Please sign in to comment.