[cli] get preferred and supported channel mask (#4253)

This commit is contained in:
Yakun Xu
2019-10-24 22:30:34 -07:00
committed by Jonathan Hui
parent 7fddb6c9db
commit 9cb3fa50ef
2 changed files with 28 additions and 0 deletions
+20
View File
@@ -113,6 +113,26 @@ Set the IEEE 802.15.4 Channel value.
Done
```
### channel preferred
Get preferred channel mask.
```bash
> channel preferred
0x7fff800
Done
```
### channel supported
Get supported channel mask.
```bash
> channel supported
0x7fff800
Done
```
### child list
List attached Child IDs.
+8
View File
@@ -460,6 +460,14 @@ void Interpreter::ProcessChannel(int argc, char *argv[])
{
mServer->OutputFormat("%d\r\n", otLinkGetChannel(mInstance));
}
else if (strcmp(argv[0], "supported") == 0)
{
mServer->OutputFormat("0x%x\r\n", otPlatRadioGetSupportedChannelMask(mInstance));
}
else if (strcmp(argv[0], "preferred") == 0)
{
mServer->OutputFormat("0x%x\r\n", otPlatRadioGetPreferredChannelMask(mInstance));
}
#if OPENTHREAD_CONFIG_CHANNEL_MONITOR_ENABLE
else if (strcmp(argv[0], "monitor") == 0)
{