mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-27 18:32:54 +00:00
feat(openthread): Add dataset changed event and post it in state change callback
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2021-2023 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2021-2024 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@@ -46,6 +46,7 @@ typedef enum {
|
||||
OPENTHREAD_EVENT_SET_DNS_SERVER, /*!< OpenThread stack set DNS server >*/
|
||||
OPENTHREAD_EVENT_PUBLISH_MESHCOP_E, /*!< OpenThread stack start to publish meshcop-e service >*/
|
||||
OPENTHREAD_EVENT_REMOVE_MESHCOP_E, /*!< OpenThread stack start to remove meshcop-e service >*/
|
||||
OPENTHREAD_EVENT_DATASET_CHANGED, /*!< OpenThread dataset changed >*/
|
||||
} esp_openthread_event_t;
|
||||
|
||||
/**
|
||||
@@ -63,6 +64,24 @@ typedef struct {
|
||||
otDeviceRole current_role; /*!< Current Thread role */
|
||||
} esp_openthread_role_changed_event_t;
|
||||
|
||||
/**
|
||||
* @brief OpenThread dataset type
|
||||
*
|
||||
*/
|
||||
typedef enum {
|
||||
OPENTHREAD_ACTIVE_DATASET, /*!< Active dataset */
|
||||
OPENTHREAD_PENDING_DATASET, /*!< Pending dataset */
|
||||
} esp_openthread_dataset_type_t;
|
||||
|
||||
/**
|
||||
* @brief OpenThread dataset changed event data
|
||||
*
|
||||
*/
|
||||
typedef struct {
|
||||
esp_openthread_dataset_type_t type; /*!< Dataset type */
|
||||
otOperationalDataset new_dataset; /*!< New dataset */
|
||||
} esp_openthread_dataset_changed_event_t;
|
||||
|
||||
/**
|
||||
* This structure represents a context for a select() based mainloop.
|
||||
*
|
||||
|
Reference in New Issue
Block a user