Lines Matching +full:cli +full:- +full:mtd
31 * This file implements the CLI interpreter for Mesh Diagnostics function.
38 #include "cli/cli.hpp"
39 #include "cli/cli_utils.hpp"
45 namespace Cli { namespace
55 * @cli meshdiag topology in Process()
58 * id:02 rloc16:0x0800 ext-addr:8aa57d2c603fe16c ver:4 - me - leader in Process()
59 * 3-links:{ 46 } in Process()
60 * id:46 rloc16:0xb800 ext-addr:fe109d277e0175cc ver:4 in Process()
61 * 3-links:{ 02 51 57 } in Process()
62 * id:33 rloc16:0x8400 ext-addr:d2e511a146b9e54d ver:4 in Process()
63 * 3-links:{ 51 57 } in Process()
64 * id:51 rloc16:0xcc00 ext-addr:9aab43ababf05352 ver:4 in Process()
65 * 3-links:{ 33 57 } in Process()
66 * 2-links:{ 46 } in Process()
67 * id:57 rloc16:0xe400 ext-addr:dae9c4c0e9da55ff ver:4 in Process()
68 * 3-links:{ 46 51 } in Process()
69 * 1-links:{ 33 } in Process()
75 * * `ip6-addrs` to discover the list of IPv6 addresses of every router. in Process()
88 * * `3-links`: Router IDs to which this router has a incoming link with link quality 3 in Process()
89 * * `2-links`: Router IDs to which this router has a incoming link with link quality 2 in Process()
90 * * `1-links`: Router IDs to which this router has a incoming link with link quality 1 in Process()
92 * * If `ip6-addrs`, list of IPv6 addresses of the router in Process()
96 …* * Child Device mode (`r` rx-on-when-idle, `d` Full Thread Device, `n` Full Network Data, `-` n… in Process()
99 * @cparam meshdiag topology [@ca{ip6-addrs}] [@ca{children}] in Process()
108 for (; !aArgs->IsEmpty(); aArgs++) in Process()
110 if (*aArgs == "ip6-addrs") in Process()
134 * @cli meshdiag childtable in Process()
137 * rloc16:0x6402 ext-addr:8e6f4d323bbed1fe ver:4 in Process()
138 * timeout:120 age:36 supvn:129 q-msg:0 in Process()
139 * rx-on:yes type:ftd full-net:yes in Process()
140 * rss - ave:-20 last:-20 margin:80 in Process()
141 * err-rate - frame:11.51% msg:0.76% in Process()
142 * conn-time:00:11:07 in Process()
143 * csl - sync:no period:0 timeout:0 channel:0 in Process()
144 * rloc16:0x6403 ext-addr:ee24e64ecf8c079a ver:4 in Process()
145 * timeout:120 age:19 supvn:129 q-msg:0 in Process()
146 * rx-on:no type:mtd full-net:no in Process()
147 * rss - ave:-20 last:-20 margin:80 in Process()
148 * err-rate - frame:0.73% msg:0.00% in Process()
149 * conn-time:01:08:53 in Process()
150 * csl - sync:no period:0 timeout:0 channel:0 in Process()
156 * - RLOC16 in Process()
157 * - Extended MAC address in Process()
158 * - Thread Version in Process()
159 * - Timeout (in seconds) in Process()
160 * - Age (seconds since last heard) in Process()
161 * - Supervision interval (in seconds) in Process()
162 * - Number of queued messages (in case child is sleepy) in Process()
163 * - Device Mode in Process()
164 * - RSS (average and last) in Process()
165 * - Error rates: frame tx (at MAC layer), IPv6 message tx (above MAC) in Process()
166 * - Connection time (seconds since link establishment `{dd}d.{hh}:{mm}:{ss}` format) in Process()
167 * - CSL info: in Process()
168 * - If synchronized in Process()
169 * - Period (in unit of 10-symbols-time) in Process()
170 * - Timeout (in seconds) in Process()
172 * @cparam meshdiag childtable @ca{router-rloc16} in Process()
193 * @cli meshdiag childip6 in Process()
196 * child-rloc16: 0xdc02 in Process()
200 * child-rloc16: 0xdc03 in Process()
207 * Send a query to a parent to retrieve the IPv6 addresses of all its MTD children. in Process()
208 * @cparam meshdiag childip6 @ca{parent-rloc16} in Process()
229 * @cli meshdiag routerneighbortable in Process()
232 * rloc16:0x9c00 ext-addr:764788cf6e57a4d2 ver:4 in Process()
233 * rss - ave:-20 last:-20 margin:80 in Process()
234 * err-rate - frame:1.38% msg:0.00% in Process()
235 * conn-time:01:54:02 in Process()
236 * rloc16:0x7c00 ext-addr:4ed24fceec9bf6d3 ver:4 in Process()
237 * rss - ave:-20 last:-20 margin:80 in Process()
238 * err-rate - frame:0.72% msg:0.00% in Process()
239 * conn-time:00:11:27 in Process()
245 * - RLOC16 in Process()
246 * - Extended MAC address in Process()
247 * - Thread Version in Process()
248 * - RSS (average and last) and link margin in Process()
249 * - Error rates, frame tx (at MAC layer), IPv6 message tx (above MAC) in Process()
250 * - Connection time (seconds since link establishment `{dd}d.{hh}:{mm}:{ss}` format) in Process()
251 * @cparam meshdiag routerneighbortable @ca{router-rloc16} in Process()
297 error = (this->*command->mHandler)(aArgs + 1); in Process()
305 reinterpret_cast<MeshDiag *>(aContext)->HandleMeshDiagDiscoverDone(aError, aRouterInfo); in HandleMeshDiagDiscoverDone()
312 OutputFormat("id:%02u rloc16:0x%04x ext-addr:", aRouterInfo->mRouterId, aRouterInfo->mRloc16); in HandleMeshDiagDiscoverDone()
313 OutputExtAddress(aRouterInfo->mExtAddress); in HandleMeshDiagDiscoverDone()
315 if (aRouterInfo->mVersion != OT_MESH_DIAG_VERSION_UNKNOWN) in HandleMeshDiagDiscoverDone()
317 OutputFormat(" ver:%u", aRouterInfo->mVersion); in HandleMeshDiagDiscoverDone()
320 if (aRouterInfo->mIsThisDevice) in HandleMeshDiagDiscoverDone()
322 OutputFormat(" - me"); in HandleMeshDiagDiscoverDone()
325 if (aRouterInfo->mIsThisDeviceParent) in HandleMeshDiagDiscoverDone()
327 OutputFormat(" - parent"); in HandleMeshDiagDiscoverDone()
330 if (aRouterInfo->mIsLeader) in HandleMeshDiagDiscoverDone()
332 OutputFormat(" - leader"); in HandleMeshDiagDiscoverDone()
335 if (aRouterInfo->mIsBorderRouter) in HandleMeshDiagDiscoverDone()
337 OutputFormat(" - br"); in HandleMeshDiagDiscoverDone()
342 for (uint8_t linkQuality = 3; linkQuality > 0; linkQuality--) in HandleMeshDiagDiscoverDone()
346 for (uint8_t entryQuality : aRouterInfo->mLinkQualities) in HandleMeshDiagDiscoverDone()
357 OutputFormat(kIndentSize, "%u-links:{ ", linkQuality); in HandleMeshDiagDiscoverDone()
359 …for (uint8_t id = 0; id < static_cast<uint8_t>(OT_ARRAY_LENGTH(aRouterInfo->mLinkQualities)); id++) in HandleMeshDiagDiscoverDone()
361 if (aRouterInfo->mLinkQualities[id] == linkQuality) in HandleMeshDiagDiscoverDone()
371 if (aRouterInfo->mIp6AddrIterator != nullptr) in HandleMeshDiagDiscoverDone()
375 OutputLine(kIndentSize, "ip6-addrs:"); in HandleMeshDiagDiscoverDone()
377 … while (otMeshDiagGetNextIp6Address(aRouterInfo->mIp6AddrIterator, &ip6Address) == OT_ERROR_NONE) in HandleMeshDiagDiscoverDone()
384 if (aRouterInfo->mChildIterator != nullptr) in HandleMeshDiagDiscoverDone()
390 while (otMeshDiagGetNextChildInfo(aRouterInfo->mChildIterator, &childInfo) == OT_ERROR_NONE) in HandleMeshDiagDiscoverDone()
403 OutputFormat(" - me"); in HandleMeshDiagDiscoverDone()
408 OutputFormat(" - br"); in HandleMeshDiagDiscoverDone()
428 … reinterpret_cast<MeshDiag *>(aContext)->HandleMeshDiagQueryChildTableResult(aError, aChildEntry); in HandleMeshDiagQueryChildTableResult()
438 OutputFormat("rloc16:0x%04x ext-addr:", aChildEntry->mRloc16); in HandleMeshDiagQueryChildTableResult()
439 OutputExtAddress(aChildEntry->mExtAddress); in HandleMeshDiagQueryChildTableResult()
440 OutputLine(" ver:%u", aChildEntry->mVersion); in HandleMeshDiagQueryChildTableResult()
442 OutputLine(kIndentSize, "timeout:%lu age:%lu supvn:%u q-msg:%u", ToUlong(aChildEntry->mTimeout), in HandleMeshDiagQueryChildTableResult()
443 … ToUlong(aChildEntry->mAge), aChildEntry->mSupervisionInterval, aChildEntry->mQueuedMessageCount); in HandleMeshDiagQueryChildTableResult()
445 … OutputLine(kIndentSize, "rx-on:%s type:%s full-net:%s", aChildEntry->mRxOnWhenIdle ? "yes" : "no", in HandleMeshDiagQueryChildTableResult()
446 … aChildEntry->mDeviceTypeFtd ? "ftd" : "mtd", aChildEntry->mFullNetData ? "yes" : "no"); in HandleMeshDiagQueryChildTableResult()
448 …OutputLine(kIndentSize, "rss - ave:%d last:%d margin:%d", aChildEntry->mAverageRssi, aChildEntry->… in HandleMeshDiagQueryChildTableResult()
449 aChildEntry->mLinkMargin); in HandleMeshDiagQueryChildTableResult()
451 if (aChildEntry->mSupportsErrRate) in HandleMeshDiagQueryChildTableResult()
453 OutputFormat(kIndentSize, "err-rate - frame:%s%% ", in HandleMeshDiagQueryChildTableResult()
454 PercentageToString(aChildEntry->mFrameErrorRate, stringBuffer)); in HandleMeshDiagQueryChildTableResult()
455 OutputLine("msg:%s%% ", PercentageToString(aChildEntry->mMessageErrorRate, stringBuffer)); in HandleMeshDiagQueryChildTableResult()
458 otConvertDurationInSecondsToString(aChildEntry->mConnectionTime, string, sizeof(string)); in HandleMeshDiagQueryChildTableResult()
459 OutputLine(kIndentSize, "conn-time:%s", string); in HandleMeshDiagQueryChildTableResult()
461 OutputLine(kIndentSize, "csl - sync:%s period:%u timeout:%lu channel:%u", in HandleMeshDiagQueryChildTableResult()
462 …aChildEntry->mCslSynchronized ? "yes" : "no", aChildEntry->mCslPeriod, ToUlong(aChildEntry->mCslTi… in HandleMeshDiagQueryChildTableResult()
463 aChildEntry->mCslChannel); in HandleMeshDiagQueryChildTableResult()
473 …reinterpret_cast<MeshDiag *>(aContext)->HandleMeshDiagQueryRouterNeighborTableResult(aError, aNeig… in HandleMeshDiagQueryRouterNeighborTableResult()
484 OutputFormat("rloc16:0x%04x ext-addr:", aNeighborEntry->mRloc16); in HandleMeshDiagQueryRouterNeighborTableResult()
485 OutputExtAddress(aNeighborEntry->mExtAddress); in HandleMeshDiagQueryRouterNeighborTableResult()
486 OutputLine(" ver:%u", aNeighborEntry->mVersion); in HandleMeshDiagQueryRouterNeighborTableResult()
488 …OutputLine(kIndentSize, "rss - ave:%d last:%d margin:%d", aNeighborEntry->mAverageRssi, aNeighborE… in HandleMeshDiagQueryRouterNeighborTableResult()
489 aNeighborEntry->mLinkMargin); in HandleMeshDiagQueryRouterNeighborTableResult()
491 if (aNeighborEntry->mSupportsErrRate) in HandleMeshDiagQueryRouterNeighborTableResult()
493 OutputFormat(kIndentSize, "err-rate - frame:%s%% ", in HandleMeshDiagQueryRouterNeighborTableResult()
494 PercentageToString(aNeighborEntry->mFrameErrorRate, stringBuffer)); in HandleMeshDiagQueryRouterNeighborTableResult()
495 … OutputLine("msg:%s%% ", PercentageToString(aNeighborEntry->mMessageErrorRate, stringBuffer)); in HandleMeshDiagQueryRouterNeighborTableResult()
498 otConvertDurationInSecondsToString(aNeighborEntry->mConnectionTime, string, sizeof(string)); in HandleMeshDiagQueryRouterNeighborTableResult()
499 OutputLine(kIndentSize, "conn-time:%s", string); in HandleMeshDiagQueryRouterNeighborTableResult()
510 …reinterpret_cast<MeshDiag *>(aContext)->HandleMeshDiagQueryChildIp6Addrs(aError, aChildRloc16, aIp… in HandleMeshDiagQueryChildIp6Addrs()
522 OutputLine("child-rloc16: 0x%04x", aChildRloc16); in HandleMeshDiagQueryChildIp6Addrs()
536 } // namespace Cli