#include <src/ncp/ncp_openthread.hpp>
|
using | ThreadStateChangedCallback = std::function< void(otChangedFlags aFlags)> |
|
This interface defines NCP Controller functionality.
◆ ControllerOpenThread()
otbr::Ncp::ControllerOpenThread::ControllerOpenThread |
( |
const char * |
aInterfaceName, |
|
|
const std::vector< const char * > & |
aRadioUrls, |
|
|
const char * |
aBackboneInterfaceName, |
|
|
bool |
aDryRun, |
|
|
bool |
aEnableAutoAttach |
|
) |
| |
This constructor initializes this object.
- Parameters
-
[in] | aInterfaceName | A string of the NCP interface name. |
[in] | aRadioUrls | The radio URLs (can be IEEE802.15.4 or TREL radio). |
[in] | aBackboneInterfaceName | The Backbone network interface name. |
[in] | aDryRun | TRUE to indicate dry-run mode. FALSE otherwise. |
[in] | aEnableAutoAttach | Whether or not to automatically attach to the saved network. |
◆ AddThreadStateChangedCallback()
void otbr::Ncp::ControllerOpenThread::AddThreadStateChangedCallback |
( |
ThreadStateChangedCallback |
aCallback | ) |
|
This method adds a event listener for Thread state changes.
- Parameters
-
[in] | aCallback | The callback to receive Thread state changed events. |
◆ Deinit()
void otbr::Ncp::ControllerOpenThread::Deinit |
( |
void |
| ) |
|
This method deinitialize the NCP controller.
◆ GetInstance()
otInstance* otbr::Ncp::ControllerOpenThread::GetInstance |
( |
void |
| ) |
|
|
inline |
This method get mInstance pointer.
- Return values
-
◆ GetInterfaceName()
const char* otbr::Ncp::ControllerOpenThread::GetInterfaceName |
( |
void |
| ) |
const |
|
inline |
This method returns the Thread network interface name.
- Returns
- A pointer to the Thread network interface name string.
◆ GetThreadHelper()
This method gets the thread functionality helper.
- Return values
-
The | pointer to the helper object. |
◆ GetThreadVersion()
const char * otbr::Ncp::ControllerOpenThread::GetThreadVersion |
( |
void |
| ) |
|
|
static |
This method returns the Thread protocol version as a string.
- Returns
- A pointer to the Thread version string.
◆ Init()
void otbr::Ncp::ControllerOpenThread::Init |
( |
void |
| ) |
|
This method initialize the NCP controller.
◆ PostTimerTask()
void otbr::Ncp::ControllerOpenThread::PostTimerTask |
( |
Milliseconds |
aDelay, |
|
|
TaskRunner::Task< void > |
aTask |
|
) |
| |
This method posts a task to the timer
- Parameters
-
[in] | aDelay | The delay in milliseconds before executing the task. |
[in] | aTask | The task function. |
◆ Process()
void otbr::Ncp::ControllerOpenThread::Process |
( |
const MainloopContext & |
aMainloop | ) |
|
|
overridevirtual |
This method processes mainloop events.
- Parameters
-
[in] | aMainloop | A reference to the mainloop context. |
Implements otbr::MainloopProcessor.
◆ RegisterResetHandler()
void otbr::Ncp::ControllerOpenThread::RegisterResetHandler |
( |
std::function< void(void)> |
aHandler | ) |
|
This method registers a reset handler.
- Parameters
-
[in] | aHandler | The handler function. |
◆ Reset()
void otbr::Ncp::ControllerOpenThread::Reset |
( |
void |
| ) |
|
This method resets the OpenThread instance.
◆ Update()
void otbr::Ncp::ControllerOpenThread::Update |
( |
MainloopContext & |
aMainloop | ) |
|
|
overridevirtual |
This method updates the mainloop context.
- Parameters
-
[in,out] | aMainloop | A reference to the mainloop to be updated. |
Implements otbr::MainloopProcessor.
The documentation for this class was generated from the following files: