mirror of
https://github.com/espressif/openthread.git
synced 2026-07-08 21:30:24 +00:00
MLE Announce. (#736)
This commit is contained in:
@@ -2029,6 +2029,33 @@ void Interpreter::ProcessCommissioner(int argc, char *argv[])
|
||||
{
|
||||
SuccessOrExit(error = otCommissionerSetProvisioningUrl(mInstance, (argc > 1) ? argv[1] : NULL));
|
||||
}
|
||||
else if (strcmp(argv[0], "announce") == 0)
|
||||
{
|
||||
long mask;
|
||||
long count;
|
||||
long period;
|
||||
otIp6Address address;
|
||||
|
||||
VerifyOrExit(argc > 4, error = kThreadError_Parse);
|
||||
|
||||
// mask
|
||||
SuccessOrExit(error = ParseLong(argv[1], mask));
|
||||
|
||||
// count
|
||||
SuccessOrExit(error = ParseLong(argv[2], count));
|
||||
|
||||
// period
|
||||
SuccessOrExit(error = ParseLong(argv[3], period));
|
||||
|
||||
// destination
|
||||
SuccessOrExit(error = otIp6AddressFromString(argv[4], &address));
|
||||
|
||||
SuccessOrExit(error = otCommissionerAnnounceBegin(mInstance,
|
||||
static_cast<uint32_t>(mask),
|
||||
static_cast<uint8_t>(count),
|
||||
static_cast<uint16_t>(period),
|
||||
&address));
|
||||
}
|
||||
else if (strcmp(argv[0], "energy") == 0)
|
||||
{
|
||||
long mask;
|
||||
|
||||
Reference in New Issue
Block a user