From bfead517773b50b760659bed79880c37c6a40e99 Mon Sep 17 00:00:00 2001 From: Cecille Freeman Date: Thu, 16 Sep 2021 11:19:50 -0400 Subject: [PATCH] Print mrp and tcp values in python discover. --- ...mmissionableNodeController-ScriptBinding.cpp | 17 +++++++++++++++++ .../ChipDeviceController-ScriptBinding.cpp | 17 +++++++++++++++++ 2 files changed, 34 insertions(+) diff --git a/src/controller/python/ChipCommissionableNodeController-ScriptBinding.cpp b/src/controller/python/ChipCommissionableNodeController-ScriptBinding.cpp index 7c6e7bb1d67a7a..9eae9a3a7dd16a 100644 --- a/src/controller/python/ChipCommissionableNodeController-ScriptBinding.cpp +++ b/src/controller/python/ChipCommissionableNodeController-ScriptBinding.cpp @@ -97,6 +97,23 @@ void pychip_CommissionableNodeController_PrintDiscoveredCommissioners( ChipLogProgress(Discovery, "\tRotating Id\t\t%s", rotatingId); ChipLogProgress(Discovery, "\tPairing Instruction\t%s", dnsSdInfo->pairingInstruction); ChipLogProgress(Discovery, "\tPairing Hint\t\t0x%x", dnsSdInfo->pairingHint); + if (dnsSdInfo->GetMrpRetryIntervalIdle().HasValue()) + { + ChipLogProgress(Discovery, "\tMrp Interval idle\t%u", dnsSdInfo->GetMrpRetryIntervalIdle().Value()); + } + else + { + ChipLogProgress(Discovery, "\tMrp Interval idle\tNot present"); + } + if (dnsSdInfo->GetMrpRetryIntervalActive().HasValue()) + { + ChipLogProgress(Discovery, "\tMrp Interval active\t%u", dnsSdInfo->GetMrpRetryIntervalActive().Value()); + } + else + { + ChipLogProgress(Discovery, "\tMrp Interval active\tNot present"); + } + ChipLogProgress(Discovery, "\tSupports TCP\t\t%d", dnsSdInfo->supportsTcp); for (int j = 0; j < dnsSdInfo->numIPs; ++j) { char buf[chip::Inet::kMaxIPAddressStringLength]; diff --git a/src/controller/python/ChipDeviceController-ScriptBinding.cpp b/src/controller/python/ChipDeviceController-ScriptBinding.cpp index fd64114df24175..6166e9ab973815 100644 --- a/src/controller/python/ChipDeviceController-ScriptBinding.cpp +++ b/src/controller/python/ChipDeviceController-ScriptBinding.cpp @@ -403,6 +403,23 @@ void pychip_DeviceController_PrintDiscoveredDevices(chip::Controller::DeviceComm ChipLogProgress(Discovery, "\tRotating Id\t\t%s", rotatingId); ChipLogProgress(Discovery, "\tPairing Instruction\t%s", dnsSdInfo->pairingInstruction); ChipLogProgress(Discovery, "\tPairing Hint\t\t0x%x", dnsSdInfo->pairingHint); + if (dnsSdInfo->GetMrpRetryIntervalIdle().HasValue()) + { + ChipLogProgress(Discovery, "\tMrp Interval idle\t%u", dnsSdInfo->GetMrpRetryIntervalIdle().Value()); + } + else + { + ChipLogProgress(Discovery, "\tMrp Interval idle\tNot present"); + } + if (dnsSdInfo->GetMrpRetryIntervalActive().HasValue()) + { + ChipLogProgress(Discovery, "\tMrp Interval active\t%u", dnsSdInfo->GetMrpRetryIntervalActive().Value()); + } + else + { + ChipLogProgress(Discovery, "\tMrp Interval active\tNot present"); + } + ChipLogProgress(Discovery, "\tSupports TCP\t\t%d", dnsSdInfo->supportsTcp); for (int j = 0; j < dnsSdInfo->numIPs; ++j) { char buf[chip::Inet::kMaxIPAddressStringLength];