ble_mesh: Add an API to get node info with unicast addr

This commit is contained in:
lly
2020-01-08 19:39:24 +08:00
committed by baohongde
parent 787ee04a5d
commit cb2cb8fea7
2 changed files with 22 additions and 1 deletions

View File

@ -296,6 +296,15 @@ esp_ble_mesh_node_t *esp_ble_mesh_provisioner_get_node_info(const uint8_t uuid[1
return (esp_ble_mesh_node_t *)bt_mesh_provisioner_get_prov_node_info(uuid);
}
esp_ble_mesh_node_t *esp_ble_mesh_provisioner_get_node_info_with_addr(uint16_t unicast_addr)
{
if (!ESP_BLE_MESH_ADDR_IS_UNICAST(unicast_addr)) {
return NULL;
}
return (esp_ble_mesh_node_t *)bt_mesh_provisioner_get_node_info(unicast_addr);
}
esp_err_t esp_ble_mesh_provisioner_add_local_app_key(const uint8_t app_key[16],
uint16_t net_idx, uint16_t app_idx)
{

View File

@ -213,7 +213,8 @@ const char *esp_ble_mesh_provisioner_get_node_name(uint16_t index);
uint16_t esp_ble_mesh_provisioner_get_node_index(const char *name);
/**
* @brief This function is called to get the provisioned node information.
* @brief This function is called to get the provisioned node information
* with the node device uuid.
*
* @param[in] uuid: Device UUID of the node
*
@ -222,6 +223,17 @@ uint16_t esp_ble_mesh_provisioner_get_node_index(const char *name);
*/
esp_ble_mesh_node_t *esp_ble_mesh_provisioner_get_node_info(const uint8_t uuid[16]);
/**
* @brief This function is called to get the provisioned node information
* with the node unicast address.
*
* @param[in] unicast_addr: Unicast address of the node
*
* @return Pointer of the node info struct or NULL on failure.
*
*/
esp_ble_mesh_node_t *esp_ble_mesh_provisioner_get_node_info_with_addr(uint16_t unicast_addr);
/**
* @brief This function is called to store the Composition Data of the node.
*