Skip to content

Commit

Permalink
added build argument to change CHIP_CONFIG_MRP_DEFAULT_ACTIVE_RETRY_I…
Browse files Browse the repository at this point in the history
…NTERVAL (#11486)
  • Loading branch information
mkardous-silabs authored and pull[bot] committed Jan 11, 2022
1 parent fa5c309 commit a70ee51
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 2 deletions.
13 changes: 11 additions & 2 deletions scripts/build_python.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ declare chip_detail_logging=false
declare enable_pybindings=false
declare chip_mdns
declare clusters=true
declare case_retry_delta

help() {

Expand All @@ -57,6 +58,9 @@ Input Options:
-c, --clusters_for_ip_commissioning true/false Specify whether to use clusters for IP commissioning.
By default it is true.
-p, --enable_pybindings EnableValue Specify whether to enable pybindings as python controller.
-t --time_between_case_retries MRPActiveRetryInterval Specify MRPActiveRetryInterval value
Default is 300 ms
"
}

Expand Down Expand Up @@ -84,6 +88,10 @@ while (($#)); do
enable_pybindings=$2
shift
;;
--time_between_case_retries | -t)
chip_case_retry_delta=$2
shift
;;
-*)
help
echo "Unknown Option \"$1\""
Expand All @@ -94,15 +102,16 @@ while (($#)); do
done

# Print input values
echo "Input values: chip_detail_logging = $chip_detail_logging , chip_mdns = \"$chip_mdns\", enable_pybindings = $enable_pybindings"
echo "Input values: chip_detail_logging = $chip_detail_logging , chip_mdns = \"$chip_mdns\", enable_pybindings = $enable_pybindings, chip_case_retry_delta=\"$chip_case_retry_delta\""

# Ensure we have a compilation environment
source "$CHIP_ROOT/scripts/activate.sh"

# Generates ninja files
[[ -n "$chip_mdns" ]] && chip_mdns_arg="chip_mdns=\"$chip_mdns\"" || chip_mdns_arg=""
[[ -n "$chip_case_retry_delta" ]] && chip_case_retry_arg="chip_case_retry_delta=$chip_case_retry_delta" || chip_case_retry_arg=""

gn --root="$CHIP_ROOT" gen "$OUTPUT_ROOT" --args="chip_detail_logging=$chip_detail_logging enable_pylib=$enable_pybindings enable_rtti=$enable_pybindings chip_use_clusters_for_ip_commissioning=$clusters chip_project_config_include_dirs=[\"//config/python\"] $chip_mdns_arg"
gn --root="$CHIP_ROOT" gen "$OUTPUT_ROOT" --args="chip_detail_logging=$chip_detail_logging enable_pylib=$enable_pybindings enable_rtti=$enable_pybindings chip_use_clusters_for_ip_commissioning=$clusters chip_project_config_include_dirs=[\"//config/python\"] $chip_mdns_arg $chip_case_retry_arg"

# Compiles python files
# Check pybindings was requested
Expand Down
13 changes: 13 additions & 0 deletions src/messaging/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,19 @@

import("//build_overrides/chip.gni")

declare_args() {
# Allows to change time between retries during the case session
chip_case_retry_delta = ""
}

defines = []

if (chip_case_retry_delta != "") {
defines += [
"CHIP_CONFIG_MRP_DEFAULT_ACTIVE_RETRY_INTERVAL=${chip_case_retry_delta}",
]
}

static_library("messaging") {
output_name = "libMessagingLayer"

Expand Down

0 comments on commit a70ee51

Please sign in to comment.