9#include <openthread/srp_client.h>
10#include <openthread/srp_client_buffers.h>
11#include <openthread/instance.h>
12#include <openthread/thread.h>
29 void setup()
override;
45 void set_use_address(
const char *use_address) { this->use_address_ = use_address; }
46#if CONFIG_OPENTHREAD_MTD
69#if CONFIG_OPENTHREAD_MTD
81 const char *use_address_{
nullptr};
91 void setup()
override;
92 static void srp_callback(otError err,
const otSrpClientHostInfo *host_info,
const otSrpClientService *services,
93 const otSrpClientService *removed_services,
void *context);
94 static void srp_start_callback(
const otSockAddr *server_socket_address,
void *context);
96 const otSrpClientService *services,
const otSrpClientService *removed_services,
122 explicit operator bool()
const {
return this->owns_; }
float get_setup_priority() const override
static InstanceLock try_acquire(int delay)
InstanceLock & operator=(const InstanceLock &)=delete
otInstance * get_instance()
InstanceLock(InstanceLock &&)=delete
static InstanceLock acquire()
InstanceLock(const InstanceLock &)=delete
InstanceLock & operator=(InstanceLock &&)=delete
void set_poll_period(uint32_t poll_period)
network::IPAddresses get_ip_addresses()
void set_use_address(const char *use_address)
std::optional< otIp6Address > get_omr_address_(InstanceLock &lock)
void dump_config() override
void apply_linkmode_(otInstance *instance)
Apply Link Mode settings (incl poll period).
std::optional< int8_t > output_power_
uint32_t get_poll_period() const
std::atomic< bool > lock_initialized_
std::function< void()> factory_reset_external_callback_
void set_output_power(int8_t output_power)
otInstance * get_openthread_instance_()
void defer_factory_reset_external_callback()
static void on_state_changed(otChangedFlags flags, void *context)
bool is_lock_initialized() const
Returns true once esp_openthread_init() has completed and the OT lock is usable.
std::optional< otIp6Address > get_omr_address()
void set_connected(bool connected)
float get_setup_priority() const override
void on_factory_reset(std::function< void()> callback)
bool is_connected() const
const char * get_use_address() const
Returns nullptr when no explicit use_address is configured and the address is derived at runtime from...
Action to set single poll period parameter.
std::vector< std::unique_ptr< uint8_t[]> > memory_pool_
static void srp_start_callback(const otSockAddr *server_socket_address, void *context)
void set_mdns(esphome::mdns::MDNSComponent *mdns)
static void srp_factory_reset_callback(otError err, const otSrpClientHostInfo *host_info, const otSrpClientService *services, const otSrpClientService *removed_services, void *context)
float get_setup_priority() const override
static void srp_callback(otError err, const otSrpClientHostInfo *host_info, const otSrpClientService *services, const otSrpClientService *removed_services, void *context)
esphome::mdns::MDNSComponent * mdns_
void * pool_alloc_(size_t size)
std::array< IPAddress, 5 > IPAddresses
OpenThreadComponent * global_openthread_component
void HOT delay(uint32_t ms)