mirror of
https://github.com/espressif/openthread.git
synced 2026-08-01 08:37:47 +00:00
[cli] update CLI Output class (#8343)
This commit updates the `Cli::Output` class and the related types. A
new type `OutputImplementer` is added which provides the basic output
functionality, i.e., method `OutputV()`. `Output` class requires a
reference to an `OutputImplementer` which it then uses to provide all
the different `Output{}()` method flavors. The new model allows all
CLI sub-modules to directly inherit `Output` class while reusing a
single and common underlying `OutputImplementer` provided by the
`Cli::Interpreter`.
This commit is contained in:
+2
-2
@@ -43,8 +43,8 @@
|
||||
namespace ot {
|
||||
namespace Cli {
|
||||
|
||||
UdpExample::UdpExample(Output &aOutput)
|
||||
: OutputWrapper(aOutput)
|
||||
UdpExample::UdpExample(otInstance *aInstance, OutputImplementer &aOutputImplementer)
|
||||
: Output(aInstance, aOutputImplementer)
|
||||
, mLinkSecurityEnabled(true)
|
||||
{
|
||||
memset(&mSocket, 0, sizeof(mSocket));
|
||||
|
||||
Reference in New Issue
Block a user