From b9dcdbca4edd348e924d7579a2bada48bf085645 Mon Sep 17 00:00:00 2001 From: Abtin Keshavarzian Date: Wed, 28 Feb 2024 13:42:11 -0800 Subject: [PATCH] [cli] add documentation for `nexthop` command in `README.md` (#9882) --- src/cli/README.md | 80 +++++++++++++++++++++++++++++++++-------------- 1 file changed, 56 insertions(+), 24 deletions(-) diff --git a/src/cli/README.md b/src/cli/README.md index 262b9f567..2d0251178 100644 --- a/src/cli/README.md +++ b/src/cli/README.md @@ -86,6 +86,7 @@ Done - [networkkey](#networkkey) - [networkname](#networkname) - [networktime](#networktime) +- [nexthop](#nexthop) - [panid](#panid) - [parent](#parent) - [parentpriority](#parentpriority) @@ -1026,30 +1027,6 @@ Set the CSL timeout in seconds. Done ``` -### networktime - -Get the Thread network time and the time sync parameters. - -```bash -> networktime -Network Time: 21084154us (synchronized) -Time Sync Period: 100s -XTAL Threshold: 300ppm -Done -``` - -### networktime \ \ - -Set time sync parameters - -- timesyncperiod: The time synchronization period, in seconds. -- xtalthreshold: The XTAL accuracy threshold for a device to become Router-Capable device, in PPM. - -```bash -> networktime 100 300 -Done -``` - ### debug Executes a series of CLI commands to gather information about the device and thread network. This is intended for debugging. @@ -2696,6 +2673,61 @@ Set the Thread Network Name. Done ``` +### networktime + +Get the Thread network time and the time sync parameters. + +```bash +> networktime +Network Time: 21084154us (synchronized) +Time Sync Period: 100s +XTAL Threshold: 300ppm +Done +``` + +### networktime \ \ + +Set time sync parameters + +- timesyncperiod: The time synchronization period, in seconds. +- xtalthreshold: The XTAL accuracy threshold for a device to become Router-Capable device, in PPM. + +```bash +> networktime 100 300 +Done +``` + +### nexthop + +Output the table of allocated Router IDs and the current next hop (as Router ID) and path cost for each ID. + +```bash +> nexthop +| ID |NxtHop| Cost | ++------+------+------+ +| 9 | 9 | 1 | +| 25 | 25 | 0 | +| 30 | 30 | 1 | +| 46 | - | - | +| 50 | 30 | 3 | +| 60 | 30 | 2 | +Done +``` + +### nexthop \ + +Get the next hop (as RLOC16) and path cost towards a given RLOC16 destination. + +```bash +> nexthop 0xc000 +0xc000 cost:0 +Done + +nexthop 0x8001 +0x2000 cost:3 +Done +``` + ### panid Get the IEEE 802.15.4 PAN ID value.