mirror of
https://github.com/espressif/openthread.git
synced 2026-09-01 23:09:53 +00:00
[udp] add cli-based example for UDP APIs (#2027)
This commit is contained in:
@@ -201,6 +201,9 @@ const struct Command Interpreter::sCommands[] =
|
||||
{ "state", &Interpreter::ProcessState },
|
||||
{ "thread", &Interpreter::ProcessThread },
|
||||
{ "txpowermax", &Interpreter::ProcessTxPowerMax },
|
||||
#ifndef OTDLL
|
||||
{ "udp", &Interpreter::ProcessUdp },
|
||||
#endif
|
||||
{ "version", &Interpreter::ProcessVersion },
|
||||
};
|
||||
|
||||
@@ -248,6 +251,7 @@ Interpreter::Interpreter(otInstance *aInstance):
|
||||
#if OPENTHREAD_ENABLE_DNS_CLIENT
|
||||
mResolvingInProgress(0),
|
||||
#endif
|
||||
mUdp(*this),
|
||||
#endif
|
||||
mInstance(aInstance)
|
||||
{
|
||||
@@ -2487,6 +2491,15 @@ void Interpreter::ProcessVersion(int argc, char *argv[])
|
||||
OT_UNUSED_VARIABLE(argv);
|
||||
}
|
||||
|
||||
#ifndef OTDLL
|
||||
void Interpreter::ProcessUdp(int argc, char *argv[])
|
||||
{
|
||||
otError error;
|
||||
error = mUdp.Process(argc, argv);
|
||||
AppendResult(error);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if OPENTHREAD_ENABLE_COMMISSIONER && OPENTHREAD_FTD
|
||||
|
||||
void Interpreter::ProcessCommissioner(int argc, char *argv[])
|
||||
|
||||
Reference in New Issue
Block a user