mirror of
https://github.com/espressif/openthread.git
synced 2026-08-20 01:19:51 +00:00
[cli] move a few static util methods to Cli::Utils class (#10138)
This commit moves a few static util methods from the `Interpreter` class to the `Cli::Utils` class. Since the `Interpreter` class and other classes for cli components inherit the `Cli::Utils`, they can still access these methods. Putting these methods in utils class is more intuitive. This change also makes other cli classes less dependent on the `Interpreter` class.
This commit is contained in:
+2
-3
@@ -134,7 +134,7 @@ template <> otError UdpExample::Process<Cmd("connect")>(Arg aArgs[])
|
||||
otSockAddr sockaddr;
|
||||
bool nat64Synth;
|
||||
|
||||
SuccessOrExit(error = Interpreter::ParseToIp6Address(GetInstancePtr(), aArgs[0], sockaddr.mAddress, nat64Synth));
|
||||
SuccessOrExit(error = ParseToIp6Address(GetInstancePtr(), aArgs[0], sockaddr.mAddress, nat64Synth));
|
||||
|
||||
if (nat64Synth)
|
||||
{
|
||||
@@ -269,8 +269,7 @@ template <> otError UdpExample::Process<Cmd("send")>(Arg aArgs[])
|
||||
{
|
||||
bool nat64Synth;
|
||||
|
||||
SuccessOrExit(
|
||||
error = Interpreter::ParseToIp6Address(GetInstancePtr(), aArgs[0], messageInfo.mPeerAddr, nat64Synth));
|
||||
SuccessOrExit(error = ParseToIp6Address(GetInstancePtr(), aArgs[0], messageInfo.mPeerAddr, nat64Synth));
|
||||
|
||||
if (nat64Synth)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user