|
esp_iot_framework
v0.1.0-alpha
© 2026 AmakeSasha, distributed under a license Apache-2.0
|
System hooks for internal business logic. More...
IP layer events | |
These handlers are dispatched automatically by the framework when the corresponding IP-level event occurs. | |
| typedef esp_err_t(* | eif_handler_ip_t) (void) |
| Prototype for network IP lifecycle event handlers. | |
| esp_err_t | eif_register_handler_ip_got (eif_handler_ip_t handler) |
Register a handler for the IP_EVENT_STA_GOT_IP. More... | |
| esp_err_t | eif_register_handler_ip_lost (eif_handler_ip_t handler) |
Register a handler for the IP_EVENT_STA_LOST_IP. More... | |
These functions are the primary interface for linking the final product's business logic with system-wide lifecycle events. They allow the application to execute specific tasks in direct response to internal state transitions, hardware updates, and subsystem status changes.
eif_core_initialize() must be executed exactly once, and all calls must take place prior to eif_wifi_initialize().| esp_err_t eif_register_handler_ip_got | ( | eif_handler_ip_t | handler | ) |
Registers a callback for processing network layer events. It is the primary trigger point that executes automatically as soon as the station secures a valid IP lease from the DHCP server.
CORE.| handler | Pointer to the function to execute. Cannot be NULL. |
ESP_OK: Handler registered successfully.ESP_ERR_INVALID_ARG: The handler pointer is NULL.Example of use:
| esp_err_t eif_register_handler_ip_lost | ( | eif_handler_ip_t | handler | ) |
WIFI_EVENT_STA_DISCONNECTED, since it is equivalent to IP_EVENT_STA_LOST_IP. If IP_EVENT_STA_LOST_IP is separate, the handler will be called twice.Registers a callback for processing network layer events. It executes automatically when the station drops its Wi-Fi connection, the AP kicks the client, or the DHCP lease expires.
CORE.| handler | Pointer to the function to execute. Cannot be NULL. |
ESP_OK: Handler registered successfully.ESP_ERR_INVALID_ARG: The handler pointer is NULL.Example of use: