10static const char *
const TAG =
"openthread.automation";
13 ESP_LOGW(TAG,
"OpenThread action has no effect on FTD devices (MTD only)");
17 if (this->
parent_->is_ready()) {
19 if (
auto *instance =
lock.get_instance(); instance !=
nullptr) {
23 ESP_LOGW(TAG,
"Failed to acquire lock in action");
31 ESP_LOGD(TAG,
"Not (yet) ready to apply");
OpenThreadComponent * parent_
static InstanceLock try_acquire(int delay)
virtual void apply_locked(otInstance *instance)=0
Handler to implement in subclass for applying action parts that need lock.
void lock_and_apply_()
Fetch OT lock and then call apply_locked.
static constexpr uint32_t LOCK_ACQUIRE_TIMEOUT_MS
Timeout (ms) for acquiring OT lock.
void warn_ftd_no_op_()
Log a warning that this action has no effect on FTD devices.