Skip to content

Commit ee4b717

Browse files
committed
Add chip_persist_subscriptions and chip_subscription_timeout_resumption
1 parent 865e94a commit ee4b717

File tree

1 file changed

+17
-6
lines changed

1 file changed

+17
-6
lines changed

examples/chef/chef.py

+17-6
Original file line numberDiff line numberDiff line change
@@ -393,11 +393,18 @@ def main() -> int:
393393
help=("Builds Chef Examples defined in cicd_config under ci_allow_list_linux. "
394394
"Devices are built without -c for faster compilation."),
395395
dest="ci_linux", action="store_true")
396-
parser.add_option(
397-
"", "--enable_ipv4", help="Enable IPv4 mDNS. Only applicable to platforms that can support IPV4 (e.g, Linux, ESP32)",
398-
action="store_true", default=False)
399-
parser.add_option(
400-
"", "--cpu_type", help="CPU type to compile for. Linux only.", choices=["arm64", "arm", "x64"])
396+
parser.add_option("", "--cpu_type",
397+
help="CPU type to compile for. Linux only.",
398+
choices=["arm64", "arm", "x64"])
399+
parser.add_option("", "--enable_ipv4",
400+
help="Enable IPv4 mDNS. Only applicable to platforms that can support IPV4 (e.g, Linux, ESP32)",
401+
action="store_true", default=False)
402+
parser.add_option("", "--icd_persist_subscription",
403+
help="Enable ICD persistent subscription and re-establish subscriptions from the server side after reboot",
404+
action="store_true", default=False)
405+
parser.add_option("", "--icd_subscription_resumption",
406+
help="Enable subscription resumption after timeout",
407+
action="store_true", default=False)
401408

402409
options, _ = parser.parse_args(sys.argv[1:])
403410

@@ -899,10 +906,14 @@ def main() -> int:
899906

900907
if options.enable_lit_icd:
901908
linux_args.append("chip_enable_icd_server = true")
902-
linux_args.append("chip_subscription_timeout_resumption = true")
903909
linux_args.append("chip_icd_report_on_active_mode = true")
904910
linux_args.append("chip_enable_icd_lit = true")
905911
linux_args.append("chip_enable_icd_dsls = true")
912+
if options.icd_subscription_resumption:
913+
options.icd_persist_subscription = True
914+
linux_args.append("chip_subscription_timeout_resumption = true")
915+
if options.icd_persist_subscription:
916+
linux_args.append("chip_persist_subscriptions = true")
906917

907918
if sw_ver_string:
908919
linux_args.append(

0 commit comments

Comments
 (0)