ble_mesh: add Doxyfile for core apis & model apis

This commit is contained in:
lly 2019-06-28 11:13:18 +08:00
parent c5c853a8ca
commit ff40911a51
101 changed files with 1109 additions and 838 deletions

View file

@ -1,4 +1,4 @@
// Copyright 2017-2018 Espressif Systems (Shanghai) PTE LTD
// Copyright 2017-2019 Espressif Systems (Shanghai) PTE LTD
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.

View file

@ -1,4 +1,4 @@
// Copyright 2017-2018 Espressif Systems (Shanghai) PTE LTD
// Copyright 2017-2019 Espressif Systems (Shanghai) PTE LTD
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.

View file

@ -1,4 +1,4 @@
// Copyright 2017-2018 Espressif Systems (Shanghai) PTE LTD
// Copyright 2017-2019 Espressif Systems (Shanghai) PTE LTD
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.

View file

@ -1,4 +1,4 @@
// Copyright 2017-2018 Espressif Systems (Shanghai) PTE LTD
// Copyright 2017-2019 Espressif Systems (Shanghai) PTE LTD
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.

View file

@ -1,4 +1,4 @@
// Copyright 2017-2018 Espressif Systems (Shanghai) PTE LTD
// Copyright 2017-2019 Espressif Systems (Shanghai) PTE LTD
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.

View file

@ -1,4 +1,4 @@
// Copyright 2017-2018 Espressif Systems (Shanghai) PTE LTD
// Copyright 2017-2019 Espressif Systems (Shanghai) PTE LTD
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.

View file

@ -1,4 +1,4 @@
// Copyright 2017-2018 Espressif Systems (Shanghai) PTE LTD
// Copyright 2017-2019 Espressif Systems (Shanghai) PTE LTD
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.

View file

@ -1,4 +1,4 @@
// Copyright 2017-2018 Espressif Systems (Shanghai) PTE LTD
// Copyright 2017-2019 Espressif Systems (Shanghai) PTE LTD
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@ -30,8 +30,6 @@ int32_t esp_ble_mesh_get_model_publish_period(esp_ble_mesh_model_t *model);
/**
* @brief Get the address of the primary element.
*
* @param None.
*
* @return Address of the primary element on success, or
* ESP_BLE_MESH_ADDR_UNASSIGNED on failure which means the device has not been provisioned.
*
@ -68,8 +66,6 @@ esp_ble_mesh_elem_t *esp_ble_mesh_find_element(uint16_t element_addr);
/**
* @brief Get the number of elements that have been registered.
*
* @param None.
*
* @return Number of elements.
*
*/
@ -103,8 +99,6 @@ esp_ble_mesh_model_t *esp_ble_mesh_find_sig_model(const esp_ble_mesh_elem_t *ele
/**
* @brief Get the Composition data which has been registered.
*
* @param None.
*
* @return Pointer to the Composition data on success, or NULL on failure which means the Composition data is not initialized.
*
*/

View file

@ -1,4 +1,4 @@
// Copyright 2017-2018 Espressif Systems (Shanghai) PTE LTD
// Copyright 2017-2019 Espressif Systems (Shanghai) PTE LTD
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.

View file

@ -1,4 +1,4 @@
// Copyright 2017-2018 Espressif Systems (Shanghai) PTE LTD
// Copyright 2017-2019 Espressif Systems (Shanghai) PTE LTD
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@ -141,8 +141,6 @@ esp_err_t esp_ble_mesh_model_publish(esp_ble_mesh_model_t *model, uint32_t opcod
* needs to be reprovisioned. The API function esp_ble_mesh_node_prov_enable()
* needs to be called to start a new provisioning procedure.
*
* @param None.
*
* @return ESP_OK on success or error code otherwise.
*
*/

View file

@ -1,4 +1,4 @@
// Copyright 2017-2018 Espressif Systems (Shanghai) PTE LTD
// Copyright 2017-2019 Espressif Systems (Shanghai) PTE LTD
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@ -34,8 +34,6 @@ esp_err_t esp_ble_mesh_register_prov_callback(esp_ble_mesh_prov_cb_t callback);
/**
* @brief Check if a device has been provisioned.
*
* @param None.
*
* @return TRUE if the device is provisioned, FALSE if the device is unprovisioned.
*
*/

View file

@ -1,4 +1,4 @@
// Copyright 2017-2018 Espressif Systems (Shanghai) PTE LTD
// Copyright 2017-2019 Espressif Systems (Shanghai) PTE LTD
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@ -27,8 +27,6 @@
* Network ID advertising will be enabled automatically by BLE Mesh
* stack after the device is provisioned.
*
* @param None.
*
* @return ESP_OK on success or error code otherwise.
*
*/
@ -37,8 +35,6 @@ esp_err_t esp_ble_mesh_proxy_identity_enable(void);
/**
* @brief Enable BLE Mesh GATT Proxy Service.
*
* @param None.
*
* @return ESP_OK on success or error code otherwise.
*
*/
@ -48,8 +44,6 @@ esp_err_t esp_ble_mesh_proxy_gatt_enable(void);
* @brief Disconnect the BLE Mesh GATT Proxy connection if there is any, and
* disable the BLE Mesh GATT Proxy Service.
*
* @param None.
*
* @return ESP_OK on success or error code otherwise.
*
*/

View file

@ -1,4 +1,4 @@
// Copyright 2017-2018 Espressif Systems (Shanghai) PTE LTD
// Copyright 2017-2019 Espressif Systems (Shanghai) PTE LTD
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@ -31,6 +31,7 @@
#include "model_opcode.h"
#include "mesh_common.h"
/*!< The maximum length of a BLE Mesh message, including Opcode, Payload and TransMIC */
#define ESP_BLE_MESH_SDU_MAX_LEN 384
/*!< The maximum length of a BLE Mesh provisioned node name */
@ -392,7 +393,7 @@ typedef uint32_t esp_ble_mesh_generic_message_opcode_t; /*!< esp_ble_mesh_ge
typedef uint32_t esp_ble_mesh_sensor_message_opcode_t; /*!< esp_ble_mesh_sensor_message_opcode_t belongs to esp_ble_mesh_opcode_t,
this typedef is only used to locate the opcodes used by functions
esp_ble_mesh_sensor_client_get_state & esp_ble_mesh_sensor_client_set_state */
esp_ble_mesh_sensor_client_get_state & esp_ble_mesh_sensor_client_set_state */
/*!< Sensor Message Opcode */
#define ESP_BLE_MESH_MODEL_OP_SENSOR_DESCRIPTOR_GET BLE_MESH_MODEL_OP_SENSOR_DESCRIPTOR_GET
#define ESP_BLE_MESH_MODEL_OP_SENSOR_DESCRIPTOR_STATUS BLE_MESH_MODEL_OP_SENSOR_DESCRIPTOR_STATUS
@ -663,7 +664,7 @@ typedef uint8_t esp_ble_mesh_model_status_t; /*!< This typedef is only used t
*/
#define ESP_BLE_MESH_GET_PUBLISH_TRANSMIT_INTERVAL(transmit) BLE_MESH_PUB_TRANSMIT_INT(transmit)
/* esp_ble_mesh_cb_t is not needed to be initialized by users (set with 0 and will be initialized internally) */
/*!< Callbacks which are not needed to be initialized by users (set with 0 and will be initialized internally) */
typedef uint32_t esp_ble_mesh_cb_t;
typedef enum {
@ -727,6 +728,7 @@ typedef enum {
ESP_BLE_MESH_PROV_OOB_ON_DEV = BIT(15),
} esp_ble_mesh_prov_oob_info_t;
/*!< Macros used to define message opcode */
#define ESP_BLE_MESH_MODEL_OP_1(b0) BLE_MESH_MODEL_OP_1(b0)
#define ESP_BLE_MESH_MODEL_OP_2(b0, b1) BLE_MESH_MODEL_OP_2(b0, b1)
#define ESP_BLE_MESH_MODEL_OP_3(b0, cid) BLE_MESH_MODEL_OP_3(b0, cid)
@ -790,43 +792,43 @@ typedef enum {
typedef struct esp_ble_mesh_model esp_ble_mesh_model_t;
/*!< Abstraction that describes a BLE Mesh Element.
This structure is associated with bt_mesh_elem in mesh_access.h */
/** Abstraction that describes a BLE Mesh Element.
* This structure is associated with struct bt_mesh_elem in mesh_access.h
*/
typedef struct {
/* Element Address, assigned during provisioning. */
/** Element Address, assigned during provisioning. */
uint16_t element_addr;
/* Location Descriptor (GATT Bluetooth Namespace Descriptors) */
/** Location Descriptor (GATT Bluetooth Namespace Descriptors) */
const uint16_t location;
/* Model count */
const uint8_t sig_model_count;
const uint8_t vnd_model_count;
const uint8_t sig_model_count; /*!< SIG Model count */
const uint8_t vnd_model_count; /*!< Vendor Model count */
/* Models */
esp_ble_mesh_model_t *sig_models;
esp_ble_mesh_model_t *vnd_models;
esp_ble_mesh_model_t *sig_models; /*!< SIG Models */
esp_ble_mesh_model_t *vnd_models; /*!< Vendor Models */
} esp_ble_mesh_elem_t;
/*!< Model publication context.
This structure is associated with bt_mesh_model_pub in mesh_access.h */
/** Abstraction that describes a model publication context.
* This structure is associated with struct bt_mesh_model_pub in mesh_access.h
*/
typedef struct {
/** The model to which the context belongs. Initialized by the stack. */
/** Pointer to the model to which the context belongs. Initialized by the stack. */
esp_ble_mesh_model_t *model;
uint16_t publish_addr; /**< Publish Address. */
uint16_t app_idx; /**< Publish AppKey Index. */
uint16_t publish_addr; /*!< Publish Address. */
uint16_t app_idx; /*!< Publish AppKey Index. */
uint8_t ttl; /**< Publish Time to Live. */
uint8_t retransmit; /**< Retransmit Count & Interval Steps. */
uint8_t ttl; /*!< Publish Time to Live. */
uint8_t retransmit; /*!< Retransmit Count & Interval Steps. */
uint8_t period; /*!< Publish Period. */
uint16_t period_div: 4, /*!< Divisor for the Period. */
cred: 1, /*!< Friendship Credentials Flag. */
fast_period: 1, /**< Use FastPeriodDivisor */
fast_period: 1, /*!< Use FastPeriodDivisor */
count: 3; /*!< Retransmissions left. */
uint32_t period_start; /**< Start of the current period. */
uint32_t period_start; /*!< Start of the current period. */
/** @brief Publication buffer, containing the publication message.
*
@ -837,13 +839,13 @@ typedef struct {
*/
struct net_buf_simple *msg;
/* The callback is only used for the BLE Mesh stack, not for the app layer. */
/** Callback used to update publish message. Initialized by the stack. */
esp_ble_mesh_cb_t update;
/* Role of the device that is going to publish messages */
/** Role of the device that is going to publish messages */
uint8_t dev_role;
/** Publish Period Timer. Only for stack-internal use. */
/** Publish Period Timer. Initialized by the stack. */
struct k_delayed_work timer;
} esp_ble_mesh_model_pub_t;
@ -863,8 +865,13 @@ typedef struct {
.dev_role = _role, \
}
/*!< Model operation context.
This structure is associated with bt_mesh_model_op in mesh_access.h */
/** @def ESP_BLE_MESH_MODEL_OP
*
* Define a model operation context.
*
* @param _opcode Message opcode.
* @param _min_len Message minimum length.
*/
#define ESP_BLE_MESH_MODEL_OP(_opcode, _min_len) \
{ \
.opcode = _opcode, \
@ -872,23 +879,26 @@ typedef struct {
.param_cb = (uint32_t)NULL, \
}
/** Abstraction that describes a model operation context.
* This structure is associated with struct bt_mesh_model_op in mesh_access.h
*/
typedef struct {
const uint32_t opcode; /* Opcode encoded with the ESP_BLE_MESH_MODEL_OP_* macro */
const size_t min_len; /* Minimum required message length */
esp_ble_mesh_cb_t param_cb; /* The callback is only used for BLE Mesh stack, not for the app layer. */
const uint32_t opcode; /*!< Message opcode */
const size_t min_len; /*!< Message minimum length */
esp_ble_mesh_cb_t param_cb; /*!< Callback used to handle message. Initialized by the stack. */
} esp_ble_mesh_model_op_t;
/** Define the terminator for the model operation table, each
* model operation struct array must use this terminator as
/** Define the terminator for the model operation table.
* Each model operation struct array must use this terminator as
* the end tag of the operation unit.
*/
#define ESP_BLE_MESH_MODEL_OP_END {0, 0, 0}
/** Abstraction that describes a Mesh Model instance.
* This structure is associated with bt_mesh_model in mesh_access.h
* This structure is associated with struct bt_mesh_model in mesh_access.h
*/
struct esp_ble_mesh_model {
/* Model ID */
/** Model ID */
union {
const uint16_t model_id;
struct {
@ -897,27 +907,27 @@ struct esp_ble_mesh_model {
} vnd;
};
/* Internal information, mainly for persistent storage */
uint8_t element_idx; /* Belongs to Nth element */
uint8_t model_idx; /* Is the Nth model in the element */
uint16_t flags; /* Information about what has changed */
/** Internal information, mainly for persistent storage */
uint8_t element_idx; /*!< Belongs to Nth element */
uint8_t model_idx; /*!< Is the Nth model in the element */
uint16_t flags; /*!< Information about what has changed */
/* The Element to which this Model belongs */
/** The Element to which this Model belongs */
esp_ble_mesh_elem_t *element;
/* Model Publication */
/** Model Publication */
esp_ble_mesh_model_pub_t *const pub;
/* AppKey List */
/** AppKey List */
uint16_t keys[CONFIG_BLE_MESH_MODEL_KEY_COUNT];
/* Subscription List (group or virtual addresses) */
/** Subscription List (group or virtual addresses) */
uint16_t groups[CONFIG_BLE_MESH_MODEL_GROUP_COUNT];
/* Model operation context */
/** Model operation context */
esp_ble_mesh_model_op_t *op;
/* Model-specific user data */
/** Model-specific user data */
void *user_data;
};
@ -927,7 +937,7 @@ struct esp_ble_mesh_model {
#define ESP_BLE_MESH_MODEL_NONE ((esp_ble_mesh_model_t []){})
/** Message sending context.
* This structure is associated with bt_mesh_msg_ctx in mesh_access.h
* This structure is associated with struct bt_mesh_msg_ctx in mesh_access.h
*/
typedef struct {
/** NetKey Index of the subnet through which to send the message. */
@ -962,7 +972,7 @@ typedef struct {
} esp_ble_mesh_msg_ctx_t;
/** Provisioning properties & capabilities.
* This structure is associated with bt_mesh_prov in mesh_access.h
* This structure is associated with struct bt_mesh_prov in mesh_access.h
*/
typedef struct {
#if CONFIG_BLE_MESH_NODE
@ -982,7 +992,7 @@ typedef struct {
/** Flag indicates whether unprovisioned devices support OOB public key */
bool oob_pub_key;
/* This callback is only used for the BLE Mesh stack, not for the app layer */
/** Callback used to notify to set OOB Public Key. Initialized by the stack. */
esp_ble_mesh_cb_t oob_pub_key_cb;
/** Static OOB value */
@ -1000,136 +1010,154 @@ typedef struct {
/** Supported Input OOB Actions */
uint16_t input_actions;
/* These callbacks are only used for the BLE Mesh stack, not for the app layer */
/** Callback used to output the number. Initialized by the stack. */
esp_ble_mesh_cb_t output_num_cb;
/** Callback used to output the string. Initialized by the stack. */
esp_ble_mesh_cb_t output_str_cb;
/** Callback used to notify to input number/string. Initialized by the stack. */
esp_ble_mesh_cb_t input_cb;
/** Callback used to indicate that link is opened. Initialized by the stack. */
esp_ble_mesh_cb_t link_open_cb;
/** Callback used to indicate that link is closed. Initialized by the stack. */
esp_ble_mesh_cb_t link_close_cb;
/** Callback used to indicate that provisioning is completed. Initialized by the stack. */
esp_ble_mesh_cb_t complete_cb;
/** Callback used to indicate that node has been reset. Initialized by the stack. */
esp_ble_mesh_cb_t reset_cb;
#endif /* CONFIG_BLE_MESH_NODE */
#ifdef CONFIG_BLE_MESH_PROVISIONER
/* Provisioner device UUID */
/** Provisioner device UUID */
const uint8_t *prov_uuid;
/* Primary element address of the provisioner */
/** Primary element address of the provisioner */
const uint16_t prov_unicast_addr;
/* Pre-incremental unicast address value to be assigned to the first device */
/** Pre-incremental unicast address value to be assigned to the first device */
uint16_t prov_start_address;
/* Attention timer contained in Provisioning Invite PDU */
/** Attention timer contained in Provisioning Invite PDU */
uint8_t prov_attention;
/* Provisioning Algorithm for the Provisioner */
/** Provisioning Algorithm for the Provisioner */
uint8_t prov_algorithm;
/* Provisioner public key oob */
/** Provisioner public key oob */
uint8_t prov_pub_key_oob;
/* The callback is only used for BLE Mesh stack, not for the app layer */
/** Callback used to notify to set device OOB Public Key. Initialized by the stack. */
esp_ble_mesh_cb_t provisioner_prov_read_oob_pub_key;
/* Provisioner static oob value */
/** Provisioner static oob value */
uint8_t *prov_static_oob_val;
/* Provisioner static oob value length */
/** Provisioner static oob value length */
uint8_t prov_static_oob_len;
/* These callbacks are only used for BLE Mesh stack, not for the app layer */
/** Callback used to notify to input number/string. Initialized by the stack. */
esp_ble_mesh_cb_t provisioner_prov_input;
/** Callback used to output number/string. Initialized by the stack. */
esp_ble_mesh_cb_t provisioner_prov_output;
/* Key refresh and IV update flag */
/** Key refresh and IV update flag */
uint8_t flags;
/* IV index */
/** IV index */
uint32_t iv_index;
/* These callbacks are only used for BLE Mesh stack, not for the app layer */
/** Callback used to indicate that link is opened. Initialized by the stack. */
esp_ble_mesh_cb_t provisioner_link_open;
/** Callback used to indicate that link is closed. Initialized by the stack. */
esp_ble_mesh_cb_t provisioner_link_close;
/** Callback used to indicate that a device is provisioned. Initialized by the stack. */
esp_ble_mesh_cb_t provisioner_prov_comp;
#endif /* CONFIG_BLE_MESH_PROVISIONER */
} esp_ble_mesh_prov_t;
/** Node Composition
* This structure is associated with bt_mesh_comp in mesh_access.h
/** Node Composition data context.
* This structure is associated with struct bt_mesh_comp in mesh_access.h
*/
typedef struct {
uint16_t cid;
uint16_t pid;
uint16_t vid;
uint16_t cid; /*!< 16-bit SIG-assigned company identifier */
uint16_t pid; /*!< 16-bit vendor-assigned product identifier */
uint16_t vid; /*!< 16-bit vendor-assigned product version identifier */
size_t element_count;
esp_ble_mesh_elem_t *elements;
size_t element_count; /*!< Element count */
esp_ble_mesh_elem_t *elements; /*!< A sequence of elements */
} esp_ble_mesh_comp_t;
/*!< This enum value is the role of the device */
typedef enum {
ROLE_NODE = 0,
ROLE_PROVISIONER,
ROLE_FAST_PROV,
} esp_ble_mesh_dev_role_t;
/** Common parameters of the messages sent by Client Model. */
typedef struct {
esp_ble_mesh_opcode_t opcode; /*!< Message opcode */
esp_ble_mesh_model_t *model; /*!< Pointer to the client model structure */
esp_ble_mesh_msg_ctx_t ctx; /*!< The context used to send message */
int32_t msg_timeout; /*!< Timeout value (ms) to get response to the sent message */
/*!< Note: if using default timeout value in menuconfig, make sure to set this value to 0 */
uint8_t msg_role; /*!< Role of the device - Node/Provisioner, only used for tx */
/*!< Note: if using default timeout value in menuconfig, make sure to set this value to 0 */
uint8_t msg_role; /*!< Role of the device - Node/Provisioner */
} esp_ble_mesh_client_common_param_t;
/*!< Flag which will be set when device is going to be added. */
typedef uint8_t esp_ble_mesh_dev_add_flag_t;
#define ADD_DEV_RM_AFTER_PROV_FLAG BIT(0)
#define ADD_DEV_START_PROV_NOW_FLAG BIT(1)
#define ADD_DEV_FLUSHABLE_DEV_FLAG BIT(2)
#define ADD_DEV_RM_AFTER_PROV_FLAG BIT(0) /*!< Device will be removed from queue after provisioned successfully */
#define ADD_DEV_START_PROV_NOW_FLAG BIT(1) /*!< Start provisioning device immediately */
#define ADD_DEV_FLUSHABLE_DEV_FLAG BIT(2) /*!< Device can be remove when queue is full and new device is going to added */
/** Information of the device which is going to be added for provisioning. */
typedef struct {
esp_bd_addr_t addr;
esp_ble_addr_type_t addr_type;
uint8_t uuid[16];
uint16_t oob_info;
esp_bd_addr_t addr; /*!< Device address */
esp_ble_addr_type_t addr_type; /*!< Device address type */
uint8_t uuid[16]; /*!< Device UUID */
uint16_t oob_info; /*!< Device OOB Info */
/*!< ADD_DEV_START_PROV_NOW_FLAG shall not be set if the bearer has both PB-ADV and PB-GATT enabled */
esp_ble_mesh_prov_bearer_t bearer;
esp_ble_mesh_prov_bearer_t bearer; /*!< Provisioning Bearer */
} esp_ble_mesh_unprov_dev_add_t;
#define DEL_DEV_ADDR_FLAG BIT(0)
#define DEL_DEV_UUID_FLAG BIT(1)
/** Information of the device which is going to be deleted. */
typedef struct {
union {
struct {
esp_bd_addr_t addr;
esp_ble_addr_type_t addr_type;
esp_bd_addr_t addr; /*!< Device address */
esp_ble_addr_type_t addr_type; /*!< Device address type */
};
uint8_t uuid[16];
uint8_t uuid[16]; /*!< Device UUID */
};
uint8_t flag; /*!< BIT0: device address; BIT1: device UUID */
uint8_t flag; /*!< BIT0: device address; BIT1: device UUID */
} esp_ble_mesh_device_delete_t;
#define PROV_DATA_NET_IDX_FLAG BIT(0)
#define PROV_DATA_FLAGS_FLAG BIT(1)
#define PROV_DATA_IV_INDEX_FLAG BIT(2)
/** Information of the provisioner which is going to be updated. */
typedef struct {
union {
uint16_t net_idx;
uint8_t flags;
uint32_t iv_index;
uint16_t net_idx; /*!< NetKey Index */
uint8_t flags; /*!< Flags */
uint32_t iv_index; /*!< IV Index */
};
uint8_t flag; /*!< BIT0: net_idx; BIT1: flags; BIT2: iv_index */
uint8_t flag; /*!< BIT0: net_idx; BIT1: flags; BIT2: iv_index */
} esp_ble_mesh_prov_data_info_t;
/** Context of fast provisioning which need to be set. */
typedef struct {
uint16_t unicast_min; /* Minimum unicast address used for fast provisioning */
uint16_t unicast_max; /* Maximum unicast address used for fast provisioning */
uint16_t net_idx; /* Netkey index used for fast provisioning */
uint8_t flags; /* Flags used for fast provisioning */
uint32_t iv_index; /* IV Index used for fast provisioning */
uint8_t offset; /* Offset of the UUID to be compared */
uint8_t match_len; /* Length of the UUID to be compared */
uint8_t match_val[16]; /* Value of UUID to be compared */
uint16_t unicast_min; /*!< Minimum unicast address used for fast provisioning */
uint16_t unicast_max; /*!< Maximum unicast address used for fast provisioning */
uint16_t net_idx; /*!< Netkey index used for fast provisioning */
uint8_t flags; /*!< Flags used for fast provisioning */
uint32_t iv_index; /*!< IV Index used for fast provisioning */
uint8_t offset; /*!< Offset of the UUID to be compared */
uint8_t match_len; /*!< Length of the UUID to be compared */
uint8_t match_val[16]; /*!< Value of UUID to be compared */
} esp_ble_mesh_fast_prov_info_t;
/*!< This enum value is the action of fast provisioning */
typedef enum {
FAST_PROV_ACT_NONE,
FAST_PROV_ACT_ENTER,
@ -1138,6 +1166,7 @@ typedef enum {
FAST_PROV_ACT_MAX,
} esp_ble_mesh_fast_prov_action_t;
/*!< This enum value is the event of node/provisioner/fast provisioning */
typedef enum {
ESP_BLE_MESH_PROV_REGISTER_COMP_EVT, /*!< Initialize BLE Mesh provisioning capabilities and internal data information completion event */
ESP_BLE_MESH_NODE_SET_UNPROV_DEV_NAME_COMP_EVT, /*!< Set the unprovisioned device name completion event */
@ -1177,11 +1206,12 @@ typedef enum {
ESP_BLE_MESH_PROVISIONER_ADD_LOCAL_APP_KEY_COMP_EVT, /*!< Provisioner add local app key completion event */
ESP_BLE_MESH_PROVISIONER_BIND_APP_KEY_TO_MODEL_COMP_EVT, /*!< Provisioner bind local model with local app key completion event */
ESP_BLE_MESH_PROVISIONER_ADD_LOCAL_NET_KEY_COMP_EVT, /*!< Provisioner add local network key completion event */
ESP_BLE_MESH_SET_FAST_PROV_INFO_COMP_EVT, /* !< Set fast provisioning information (e.g. unicast address range, net_idx, etc.) completion event */
ESP_BLE_MESH_SET_FAST_PROV_ACTION_COMP_EVT, /* !< Set fast provisioning action completion event */
ESP_BLE_MESH_SET_FAST_PROV_INFO_COMP_EVT, /*!< Set fast provisioning information (e.g. unicast address range, net_idx, etc.) completion event */
ESP_BLE_MESH_SET_FAST_PROV_ACTION_COMP_EVT, /*!< Set fast provisioning action completion event */
ESP_BLE_MESH_PROV_EVT_MAX,
} esp_ble_mesh_prov_cb_event_t;
/*!< This enum value is the event of undefined SIG Models and Vendor Models */
typedef enum {
ESP_BLE_MESH_MODEL_OPERATION_EVT, /*!< User-defined models receive messages from peer devices (e.g. get, set, status, etc) event */
ESP_BLE_MESH_MODEL_SEND_COMP_EVT, /*!< User-defined models send messages completion event */
@ -1192,332 +1222,345 @@ typedef enum {
ESP_BLE_MESH_MODEL_EVT_MAX,
} esp_ble_mesh_model_cb_event_t;
/**
* @brief BLE Mesh Node/Provisioner callback parameters union
*/
typedef union {
/**
* @brief ESP_BLE_MESH_PROV_REGISTER_COMP_EVT
*/
struct ble_mesh_prov_register_comp_param {
int err_code;
} prov_register_comp;
int err_code; /*!< Indicate the result of BLE Mesh initialization */
} prov_register_comp; /*!< Event parameter of ESP_BLE_MESH_PROV_REGISTER_COMP_EVT */
/**
* @brief ESP_BLE_MESH_NODE_SET_UNPROV_DEV_NAME_COMP_EVT
*/
struct ble_mesh_set_unprov_dev_name_comp_param {
int err_code;
} node_set_unprov_dev_name_comp;
int err_code; /*!< Indicate the result of setting BLE Mesh device name */
} node_set_unprov_dev_name_comp; /*!< Event parameter of ESP_BLE_MESH_NODE_SET_UNPROV_DEV_NAME_COMP_EVT */
/**
* @brief ESP_BLE_MESH_NODE_PROV_ENABLE_COMP_EVT
*/
struct ble_mesh_prov_enable_comp_param {
int err_code;
} node_prov_enable_comp;
int err_code; /*!< Indicate the result of enabling BLE Mesh device */
} node_prov_enable_comp; /*!< Event parameter of ESP_BLE_MESH_NODE_PROV_ENABLE_COMP_EVT */
/**
* @brief ESP_BLE_MESH_NODE_PROV_DISABLE_COMP_EVT
*/
struct ble_mesh_prov_disable_comp_param {
int err_code;
} node_prov_disable_comp;
int err_code; /*!< Indicate the result of disabling BLE Mesh device */
} node_prov_disable_comp; /*!< Event parameter of ESP_BLE_MESH_NODE_PROV_DISABLE_COMP_EVT */
/**
* @brief ESP_BLE_MESH_NODE_PROV_LINK_OPEN_EVT
*/
struct ble_mesh_link_open_evt_param {
esp_ble_mesh_prov_bearer_t bearer;
} node_prov_link_open;
esp_ble_mesh_prov_bearer_t bearer; /*!< Type of the bearer used when device link is open */
} node_prov_link_open; /*!< Event parameter of ESP_BLE_MESH_NODE_PROV_LINK_OPEN_EVT */
/**
* @brief ESP_BLE_MESH_NODE_PROV_LINK_CLOSE_EVT
*/
struct ble_mesh_link_close_evt_param {
esp_ble_mesh_prov_bearer_t bearer;
} node_prov_link_close;
esp_ble_mesh_prov_bearer_t bearer; /*!< Type of the bearer used when device link is closed */
} node_prov_link_close; /*!< Event parameter of ESP_BLE_MESH_NODE_PROV_LINK_CLOSE_EVT */
/**
* @brief ESP_BLE_MESH_NODE_PROV_OUTPUT_NUMBER_EVT
*/
struct ble_mesh_output_num_evt_param {
esp_ble_mesh_output_action_t action;
uint32_t number;
} node_prov_output_num;
esp_ble_mesh_output_action_t action; /*!< Action of Output OOB Authentication */
uint32_t number; /*!< Number of Output OOB Authentication */
} node_prov_output_num; /*!< Event parameter of ESP_BLE_MESH_NODE_PROV_OUTPUT_NUMBER_EVT */
/**
* @brief ESP_BLE_MESH_NODE_PROV_OUTPUT_STRING_EVT
*/
struct ble_mesh_output_str_evt_param {
char string[8];
} node_prov_output_str;
char string[8]; /*!< String of Output OOB Authentication */
} node_prov_output_str; /*!< Event parameter of ESP_BLE_MESH_NODE_PROV_OUTPUT_STRING_EVT */
/**
* @brief ESP_BLE_MESH_NODE_PROV_INPUT_EVT
*/
struct ble_mesh_input_evt_param {
esp_ble_mesh_input_action_t action;
uint8_t size;
} node_prov_input;
esp_ble_mesh_input_action_t action; /*!< Action of Input OOB Authentication */
uint8_t size; /*!< Size of Input OOB Authentication */
} node_prov_input; /*!< Event parameter of ESP_BLE_MESH_NODE_PROV_INPUT_EVT */
/**
* @brief ESP_BLE_MESH_NODE_PROV_COMPLETE_EVT
*/
struct ble_mesh_provision_complete_evt_param {
uint16_t net_idx;
uint16_t addr;
uint8_t flags;
uint32_t iv_index;
} node_prov_complete;
uint16_t net_idx; /*!< NetKey Index */
uint16_t addr; /*!< Primary address */
uint8_t flags; /*!< Flags */
uint32_t iv_index; /*!< IV Index */
} node_prov_complete; /*!< Event parameter of ESP_BLE_MESH_NODE_PROV_COMPLETE_EVT */
/**
* @brief ESP_BLE_MESH_NODE_PROV_RESET_EVT
*/
struct ble_mesh_provision_reset_param {
} node_prov_reset;
} node_prov_reset; /*!< Event parameter of ESP_BLE_MESH_NODE_PROV_RESET_EVT */
/**
* @brief ESP_BLE_MESH_NODE_PROV_SET_OOB_PUB_KEY_COMP_EVT
*/
struct ble_mesh_set_oob_pub_key_comp_param {
int err_code;
} node_prov_set_oob_pub_key_comp;
int err_code; /*!< Indicate the result of setting OOB Public Key */
} node_prov_set_oob_pub_key_comp; /*!< Event parameter of ESP_BLE_MESH_NODE_PROV_SET_OOB_PUB_KEY_COMP_EVT */
/**
* @brief ESP_BLE_MESH_NODE_PROV_INPUT_NUM_COMP_EVT
*/
struct ble_mesh_input_number_comp_param {
int err_code;
} node_prov_input_num_comp;
int err_code; /*!< Indicate the result of inputting number */
} node_prov_input_num_comp; /*!< Event parameter of ESP_BLE_MESH_NODE_PROV_INPUT_NUM_COMP_EVT */
/**
* @brief ESP_BLE_MESH_NODE_PROV_INPUT_STR_COMP_EVT
*/
struct ble_mesh_input_string_comp_param {
int err_code;
} node_prov_input_str_comp;
int err_code; /*!< Indicate the result of inputting string */
} node_prov_input_str_comp; /*!< Event parameter of ESP_BLE_MESH_NODE_PROV_INPUT_STR_COMP_EVT */
/**
* @brief ESP_BLE_MESH_NODE_PROXY_IDENTITY_ENABLE_COMP_EVT
*/
struct ble_mesh_proxy_identity_enable_comp_param {
int err_code;
} node_proxy_identity_enable_comp;
int err_code; /*!< Indicate the result of enabling Mesh Proxy advertising */
} node_proxy_identity_enable_comp; /*!< Event parameter of ESP_BLE_MESH_NODE_PROXY_IDENTITY_ENABLE_COMP_EVT */
/**
* @brief ESP_BLE_MESH_NODE_PROXY_GATT_ENABLE_COMP_EVT
*/
struct ble_mesh_proxy_gatt_enable_comp_param {
int err_code;
} node_proxy_gatt_enable_comp;
int err_code; /*!< Indicate the result of enabling Mesh Proxy Service */
} node_proxy_gatt_enable_comp; /*!< Event parameter of ESP_BLE_MESH_NODE_PROXY_GATT_ENABLE_COMP_EVT */
/**
* @brief ESP_BLE_MESH_NODE_PROXY_GATT_DISABLE_COMP_EVT
*/
struct ble_mesh_proxy_gatt_disable_comp_param {
int err_code;
} node_proxy_gatt_disable_comp;
int err_code; /*!< Indicate the result of disabling Mesh Proxy Service */
} node_proxy_gatt_disable_comp; /*!< Event parameter of ESP_BLE_MESH_NODE_PROXY_GATT_DISABLE_COMP_EVT */
/**
* @brief ESP_BLE_MESH_PROVISIONER_RECV_UNPROV_ADV_PKT_EVT
*/
struct ble_mesh_provisioner_recv_unprov_adv_pkt_param {
uint8_t dev_uuid[16];
uint8_t addr[6];
esp_ble_addr_type_t addr_type;
uint16_t oob_info;
uint8_t adv_type;
esp_ble_mesh_prov_bearer_t bearer;
} provisioner_recv_unprov_adv_pkt;
uint8_t dev_uuid[16]; /*!< Device UUID of the unprovisoned device */
uint8_t addr[6]; /*!< Device address of the unprovisoned device */
esp_ble_addr_type_t addr_type; /*!< Device address type */
uint16_t oob_info; /*!< OOB Info of the unprovisoned device */
uint8_t adv_type; /*!< Avertising type of the unprovisoned device */
esp_ble_mesh_prov_bearer_t bearer; /*!< Bearer of the unprovisoned device */
} provisioner_recv_unprov_adv_pkt; /*!< Event parameter of ESP_BLE_MESH_PROVISIONER_RECV_UNPROV_ADV_PKT_EVT */
/**
* @brief ESP_BLE_MESH_PROVISIONER_PROV_ENABLE_COMP_EVT
*/
struct ble_mesh_provisioner_prov_enable_comp_param {
int err_code;
} provisioner_prov_enable_comp;
int err_code; /*!< Indicate the result of enabling BLE Mesh Provisioner */
} provisioner_prov_enable_comp; /*!< Event parameter of ESP_BLE_MESH_PROVISIONER_PROV_ENABLE_COMP_EVT */
/**
* @brief ESP_BLE_MESH_PROVISIONER_PROV_DISABLE_COMP_EVT
*/
struct ble_mesh_provisioner_prov_disable_comp_param {
int err_code;
} provisioner_prov_disable_comp;
int err_code; /*!< Indicate the result of disabling BLE Mesh Provisioner */
} provisioner_prov_disable_comp; /*!< Event parameter of ESP_BLE_MESH_PROVISIONER_PROV_DISABLE_COMP_EVT */
/**
* @brief ESP_BLE_MESH_PROVISIONER_PROV_LINK_OPEN_EVT
*/
struct ble_mesh_provisioner_link_open_evt_param {
esp_ble_mesh_prov_bearer_t bearer;
} provisioner_prov_link_open;
esp_ble_mesh_prov_bearer_t bearer; /*!< Type of the bearer used when Provisioner link is opened */
} provisioner_prov_link_open; /*!< Event parameter of ESP_BLE_MESH_PROVISIONER_PROV_LINK_OPEN_EVT */
/**
* @brief ESP_BLE_MESH_PROVISIONER_PROV_READ_OOB_PUB_KEY_EVT
*/
struct ble_mesh_provisioner_prov_read_oob_pub_key_evt_param {
uint8_t link_idx;
} provisioner_prov_read_oob_pub_key;
uint8_t link_idx; /*!< Index of the provisioning link */
} provisioner_prov_read_oob_pub_key; /*!< Event parameter of ESP_BLE_MESH_PROVISIONER_PROV_READ_OOB_PUB_KEY_EVT */
/**
* @brief ESP_BLE_MESH_PROVISIONER_PROV_INPUT_EVT
*/
struct ble_mesh_provisioner_prov_input_evt_param {
esp_ble_mesh_oob_method_t method;
esp_ble_mesh_output_action_t action;
uint8_t size;
uint8_t link_idx;
} provisioner_prov_input;
esp_ble_mesh_oob_method_t method; /*!< Method of device Output OOB Authentication */
esp_ble_mesh_output_action_t action; /*!< Action of device Output OOB Authentication */
uint8_t size; /*!< Size of device Output OOB Authentication */
uint8_t link_idx; /*!< Index of the provisioning link */
} provisioner_prov_input; /*!< Event parameter of ESP_BLE_MESH_PROVISIONER_PROV_INPUT_EVT */
/**
* @brief ESP_BLE_MESH_PROVISIONER_PROV_OUTPUT_EVT
*/
struct ble_mesh_provisioner_prov_output_evt_param {
esp_ble_mesh_oob_method_t method;
esp_ble_mesh_input_action_t action;
uint8_t size;
uint8_t link_idx;
esp_ble_mesh_oob_method_t method; /*!< Method of device Input OOB Authentication */
esp_ble_mesh_input_action_t action; /*!< Action of device Input OOB Authentication */
uint8_t size; /*!< Size of device Input OOB Authentication */
uint8_t link_idx; /*!< Index of the provisioning link */
union {
char string[8];
uint32_t number;
char string[8]; /*!< String output by the Provisioner */
uint32_t number; /*!< Number output by the Provisioner */
};
} provisioner_prov_output;
} provisioner_prov_output; /*!< Event parameter of ESP_BLE_MESH_PROVISIONER_PROV_OUTPUT_EVT */
/**
* @brief ESP_BLE_MESH_PROVISIONER_PROV_LINK_CLOSE_EVT
*/
struct ble_mesh_provisioner_link_close_evt_param {
esp_ble_mesh_prov_bearer_t bearer;
uint8_t reason;
} provisioner_prov_link_close;
esp_ble_mesh_prov_bearer_t bearer; /*!< Type of the bearer used when Provisioner link is closed */
uint8_t reason; /*!< Reason of the closed provisioning link */
} provisioner_prov_link_close; /*!< Event parameter of ESP_BLE_MESH_PROVISIONER_PROV_LINK_CLOSE_EVT */
/**
* @brief ESP_BLE_MESH_PROVISIONER_PROV_COMPLETE_EVT
*/
struct ble_mesh_provisioner_prov_comp_param {
int node_idx;
esp_ble_mesh_octet16_t device_uuid;
uint16_t unicast_addr;
uint8_t element_num;
uint16_t netkey_idx;
} provisioner_prov_complete;
int node_idx; /*!< Index of the provisioned device */
esp_ble_mesh_octet16_t device_uuid; /*!< Device UUID of the provisioned device */
uint16_t unicast_addr; /*!< Primary address of the provisioned device */
uint8_t element_num; /*!< Element count of the provisioned device */
uint16_t netkey_idx; /*!< NetKey Index of the provisioned device */
} provisioner_prov_complete; /*!< Event parameter of ESP_BLE_MESH_PROVISIONER_PROV_COMPLETE_EVT */
/**
* @brief ESP_BLE_MESH_PROVISIONER_ADD_UNPROV_DEV_COMP_EVT
*/
struct ble_mesh_provisioner_add_unprov_dev_comp_param {
int err_code;
} provisioner_add_unprov_dev_comp;
int err_code; /*!< Indicate the result of adding device into queue by the Provisioner */
} provisioner_add_unprov_dev_comp; /*!< Event parameter of ESP_BLE_MESH_PROVISIONER_ADD_UNPROV_DEV_COMP_EVT */
/**
* @brief ESP_BLE_MESH_PROVISIONER_DELETE_DEV_COMP_EVT
*/
struct ble_mesh_provisioner_delete_dev_comp_param {
int err_code;
} provisioner_delete_dev_comp;
int err_code; /*!< Indicate the result of deleting device by the Provisioner */
} provisioner_delete_dev_comp; /*!< Event parameter of ESP_BLE_MESH_PROVISIONER_DELETE_DEV_COMP_EVT */
/**
* @brief ESP_BLE_MESH_PROVISIONER_SET_DEV_UUID_MATCH_COMP_EVT
*/
struct ble_mesh_provisioner_set_dev_uuid_match_comp_param {
int err_code;
} provisioner_set_dev_uuid_match_comp;
int err_code; /*!< Indicate the result of setting Device UUID match value by the Provisioner */
} provisioner_set_dev_uuid_match_comp; /*!< Event parameter of ESP_BLE_MESH_PROVISIONER_SET_DEV_UUID_MATCH_COMP_EVT */
/**
* @brief ESP_BLE_MESH_PROVISIONER_SET_PROV_DATA_INFO_COMP_EVT
*/
struct ble_mesh_provisioner_set_prov_data_info_comp_param {
int err_code;
} provisioner_set_prov_data_info_comp;
int err_code; /*!< Indicate the result of setting provisioning info by the Provisioner */
} provisioner_set_prov_data_info_comp; /*!< Event parameter of ESP_BLE_MESH_PROVISIONER_SET_PROV_DATA_INFO_COMP_EVT */
/**
* @brief ESP_BLE_MESH_PROVISIONER_PROV_READ_OOB_PUB_KEY_COMP_EVT
*/
struct ble_mesh_provisioner_prov_read_oob_pub_key_comp_param {
int err_code;
} provisioner_prov_read_oob_pub_key_comp;
int err_code; /*!< Indicate the result of setting OOB Public Key by the Provisioner */
} provisioner_prov_read_oob_pub_key_comp; /*!< Event parameter of ESP_BLE_MESH_PROVISIONER_PROV_READ_OOB_PUB_KEY_COMP_EVT */
/**
* @brief ESP_BLE_MESH_PROVISIONER_PROV_INPUT_NUMBER_COMP_EVT
*/
struct ble_mesh_provisioner_prov_input_num_comp_param {
int err_code;
} provisioner_prov_input_num_comp;
int err_code; /*!< Indicate the result of inputting number by the Provisioner */
} provisioner_prov_input_num_comp; /*!< Event parameter of ESP_BLE_MESH_PROVISIONER_PROV_INPUT_NUMBER_COMP_EVT */
/**
* @brief ESP_BLE_MESH_PROVISIONER_PROV_INPUT_STRING_COMP_EVT
*/
struct ble_mesh_provisioner_prov_input_str_comp_param {
int err_code;
} provisioner_prov_input_str_comp;
int err_code; /*!< Indicate the result of inputting string by the Provisioner */
} provisioner_prov_input_str_comp; /*!< Event parameter of ESP_BLE_MESH_PROVISIONER_PROV_INPUT_STRING_COMP_EVT */
/**
* @brief ESP_BLE_MESH_PROVISIONER_SET_NODE_NAME_COMP_EVT
*/
struct ble_mesh_provisioner_set_node_name_comp_param {
int err_code;
int node_index;
} provisioner_set_node_name_comp;
int err_code; /*!< Indicate the result of setting provisioned device name by the Provisioner */
int node_index; /*!< Index of the provisioned device */
} provisioner_set_node_name_comp; /*!< Event parameter of ESP_BLE_MESH_PROVISIONER_SET_NODE_NAME_COMP_EVT */
/**
* @brief ESP_BLE_MESH_PROVISIONER_ADD_LOCAL_APP_KEY_COMP_EVT
*/
struct ble_mesh_provisioner_add_local_app_key_comp_param {
int err_code;
uint16_t app_idx;
} provisioner_add_app_key_comp;
int err_code; /*!< Indicate the result of adding local AppKey by the Provisioner */
uint16_t app_idx; /*!< AppKey Index */
} provisioner_add_app_key_comp; /*!< Event parameter of ESP_BLE_MESH_PROVISIONER_ADD_LOCAL_APP_KEY_COMP_EVT */
/**
* @brief ESP_BLE_MESH_PROVISIONER_BIND_APP_KEY_TO_MODEL_COMP_EVT
*/
struct ble_mesh_provisioner_bind_local_mod_app_comp_param {
int err_code;
} provisioner_bind_app_key_to_model_comp;
int err_code; /*!< Indicate the result of binding AppKey with model by the Provisioner */
} provisioner_bind_app_key_to_model_comp; /*!< Event parameter of ESP_BLE_MESH_PROVISIONER_BIND_APP_KEY_TO_MODEL_COMP_EVT */
/**
* @brief ESP_BLE_MESH_PROVISIONER_ADD_LOCAL_NET_KEY_COMP_EVT
*/
struct ble_mesh_provisioner_add_local_net_key_comp_param {
int err_code;
uint16_t net_idx;
} provisioner_add_net_key_comp;
int err_code; /*!< Indicate the result of adding local NetKey by the Provisioner */
uint16_t net_idx; /*!< NetKey Index */
} provisioner_add_net_key_comp; /*!< Event parameter of ESP_BLE_MESH_PROVISIONER_ADD_LOCAL_NET_KEY_COMP_EVT */
/**
* @brief ESP_BLE_MESH_SET_FAST_PROV_INFO_COMP_EVT
*/
struct ble_mesh_set_fast_prov_info_comp_param {
uint8_t status_unicast;
uint8_t status_net_idx;
uint8_t status_match;
} set_fast_prov_info_comp;
uint8_t status_unicast; /*!< Indicate the result of setting unicast address range of fast provisioning */
uint8_t status_net_idx; /*!< Indicate the result of setting NetKey Index of fast provisioning */
uint8_t status_match; /*!< Indicate the result of setting matching Device UUID of fast provisioning */
} set_fast_prov_info_comp; /*!< Event parameter of ESP_BLE_MESH_SET_FAST_PROV_INFO_COMP_EVT */
/**
* @brief ESP_BLE_MESH_SET_FAST_PROV_ACTION_COMP_EVT
*/
struct ble_mesh_set_fast_prov_action_comp_param {
uint8_t status_action;
} set_fast_prov_action_comp;
uint8_t status_action; /*!< Indicate the result of setting action of fast provisioning */
} set_fast_prov_action_comp; /*!< Event parameter of ESP_BLE_MESH_SET_FAST_PROV_ACTION_COMP_EVT */
} esp_ble_mesh_prov_cb_param_t;
/**
* @brief BLE Mesh model callback parameters union
*/
typedef union {
/**
* @brief ESP_BLE_MESH_MODEL_OPERATION_EVT
*/
struct ble_mesh_model_operation_evt_param {
uint32_t opcode;
esp_ble_mesh_model_t *model;
esp_ble_mesh_msg_ctx_t *ctx;
uint16_t length;
uint8_t *msg;
} model_operation;
uint32_t opcode; /*!< Opcode of the recieved message */
esp_ble_mesh_model_t *model; /*!< Pointer to the model which receives the message */
esp_ble_mesh_msg_ctx_t *ctx; /*!< Pointer to the context of the received message */
uint16_t length; /*!< Length of the received message */
uint8_t *msg; /*!< Value of the received message */
} model_operation; /*!< Event parameter of ESP_BLE_MESH_MODEL_OPERATION_EVT */
/**
* @brief ESP_BLE_MESH_MODEL_SEND_COMP_EVT
*/
struct ble_mesh_model_send_comp_param {
int err_code;
uint32_t opcode;
esp_ble_mesh_model_t *model;
esp_ble_mesh_msg_ctx_t *ctx;
} model_send_comp;
int err_code; /*!< Indicate the result of sending a message */
uint32_t opcode; /*!< Opcode of the message */
esp_ble_mesh_model_t *model; /*!< Pointer to the model which sends the message */
esp_ble_mesh_msg_ctx_t *ctx; /*!< Context of the message */
} model_send_comp; /*!< Event parameter of ESP_BLE_MESH_MODEL_SEND_COMP_EVT */
/**
* @brief ESP_BLE_MESH_MODEL_PUBLISH_COMP_EVT
*/
* @brief ESP_BLE_MESH_MODEL_PUBLISH_COMP_EVT
*/
struct ble_mesh_model_publish_comp_param {
int err_code;
esp_ble_mesh_model_t *model;
} model_publish_comp;
int err_code; /*!< Indicate the result of publishing a message */
esp_ble_mesh_model_t *model; /*!< Pointer to the model which publishes the message */
} model_publish_comp; /*!< Event parameter of ESP_BLE_MESH_MODEL_PUBLISH_COMP_EVT */
/**
* @brief ESP_BLE_MESH_CLIENT_MODEL_RECV_PUBLISH_MSG_EVT
*/
struct ble_mesh_mod_recv_publish_msg_param {
uint32_t opcode;
esp_ble_mesh_model_t *model;
esp_ble_mesh_msg_ctx_t *ctx;
uint16_t length;
uint8_t *msg;
} client_recv_publish_msg;
uint32_t opcode; /*!< Opcode of the unsoliciated received message */
esp_ble_mesh_model_t *model; /*!< Pointer to the model which receives the message */
esp_ble_mesh_msg_ctx_t *ctx; /*!< Pointer to the context of the message */
uint16_t length; /*!< Length of the received message */
uint8_t *msg; /*!< Value of the received message */
} client_recv_publish_msg; /*!< Event parameter of ESP_BLE_MESH_CLIENT_MODEL_RECV_PUBLISH_MSG_EVT */
/**
* @brief ESP_BLE_MESH_CLIENT_MODEL_SEND_TIMEOUT_EVT
*/
struct ble_mesh_client_model_send_timeout_param {
uint32_t opcode;
esp_ble_mesh_model_t *model;
esp_ble_mesh_msg_ctx_t *ctx;
} client_send_timeout;
uint32_t opcode; /*!< Opcode of the previously sent message */
esp_ble_mesh_model_t *model; /*!< Pointer to the model which sends the previous message */
esp_ble_mesh_msg_ctx_t *ctx; /*!< Pointer to the context of the previous message */
} client_send_timeout; /*!< Event parameter of ESP_BLE_MESH_CLIENT_MODEL_SEND_TIMEOUT_EVT */
/**
* @brief ESP_BLE_MESH_MODEL_PUBLISH_UPDATE_EVT
*/
* @brief ESP_BLE_MESH_MODEL_PUBLISH_UPDATE_EVT
*/
struct ble_mesh_model_publish_update_evt_param {
esp_ble_mesh_model_t *model;
} model_publish_update;
esp_ble_mesh_model_t *model; /*!< Pointer to the model which is going to update its publish message */
} model_publish_update; /*!< Event parameter of ESP_BLE_MESH_MODEL_PUBLISH_UPDATE_EVT */
} esp_ble_mesh_model_cb_param_t;
/** Client Model Get/Set message opcode and corresponding Status message opcode */
typedef struct {
uint32_t cli_op; /*!< The client message opcode */
uint32_t status_op; /*!< The server status opcode corresponding to the client message opcode */
} esp_ble_mesh_client_op_pair_t;
/*!< Mesh Client Model Context */
/** Client Model user data context. */
typedef struct {
esp_ble_mesh_model_t *model;
esp_ble_mesh_model_t *model; /*!< Pointer to the client model. Initialized by the stack. */
int op_pair_size; /*!< Size of the op_pair */
const esp_ble_mesh_client_op_pair_t *op_pair; /*!< Table containing get/set message opcode and corresponding status message opcode */
uint32_t publish_status; /*!< This variable is reserved for BLE Mesh Stack, does not require initializing on the application layer */
void *internal_data; /*!< Pointer to the structure of the client model internal data */
uint32_t publish_status; /*!< Callback used to handle the received unsoliciated message. Initialized by the stack. */
void *internal_data; /*!< Pointer to the internal data of client model */
uint8_t msg_role; /*!< Role of the device (Node/Provisioner) that is going to send messages */
} esp_ble_mesh_client_t;

View file

@ -1,4 +1,4 @@
// Copyright 2017-2018 Espressif Systems (Shanghai) PTE LTD
// Copyright 2017-2019 Espressif Systems (Shanghai) PTE LTD
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.

View file

@ -1,4 +1,4 @@
// Copyright 2017-2018 Espressif Systems (Shanghai) PTE LTD
// Copyright 2017-2019 Espressif Systems (Shanghai) PTE LTD
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.

View file

@ -1,4 +1,4 @@
// Copyright 2017-2018 Espressif Systems (Shanghai) PTE LTD
// Copyright 2017-2019 Espressif Systems (Shanghai) PTE LTD
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.

View file

@ -1,4 +1,4 @@
// Copyright 2017-2018 Espressif Systems (Shanghai) PTE LTD
// Copyright 2017-2019 Espressif Systems (Shanghai) PTE LTD
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.

View file

@ -1,4 +1,4 @@
// Copyright 2017-2018 Espressif Systems (Shanghai) PTE LTD
// Copyright 2017-2019 Espressif Systems (Shanghai) PTE LTD
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.

View file

@ -1,4 +1,4 @@
// Copyright 2017-2018 Espressif Systems (Shanghai) PTE LTD
// Copyright 2017-2019 Espressif Systems (Shanghai) PTE LTD
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.

View file

@ -1,4 +1,4 @@
// Copyright 2017-2018 Espressif Systems (Shanghai) PTE LTD
// Copyright 2017-2019 Espressif Systems (Shanghai) PTE LTD
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@ -45,142 +45,143 @@
ESP_BLE_MESH_SIG_MODEL(ESP_BLE_MESH_MODEL_ID_CONFIG_CLI, \
NULL, NULL, cli_data)
/** Configuration Server Model context */
typedef struct esp_ble_mesh_cfg_srv {
esp_ble_mesh_model_t *model;
esp_ble_mesh_model_t *model; /*!< Pointer to Configuration Server Model */
uint8_t net_transmit; /*!< Network Transmit state */
uint8_t relay; /*!< Relay Mode state */
uint8_t relay_retransmit; /*!< Relay Retransmit state */
uint8_t beacon; /*!< Secure Network Beacon state */
uint8_t gatt_proxy; /*!< GATT Proxy state */
uint8_t friend_state; /*!< Friend state */
uint8_t default_ttl; /*!< Default TTL */
uint8_t net_transmit; /*!< Network Transmit state */
uint8_t relay; /*!< Relay Mode state */
uint8_t relay_retransmit; /*!< Relay Retransmit state */
uint8_t beacon; /*!< Secure Network Beacon state */
uint8_t gatt_proxy; /*!< GATT Proxy state */
uint8_t friend_state; /*!< Friend state */
uint8_t default_ttl; /*!< Default TTL */
/** Heartbeat Publication */
struct {
struct k_delayed_work timer;
struct k_delayed_work timer; /*!< Heartbeat Publication timer */
uint16_t dst;
uint16_t count;
uint8_t period;
uint8_t ttl;
uint16_t feature;
uint16_t net_idx;
uint16_t dst; /*!< Destination address for Heartbeat messages */
uint16_t count; /*!< Number of Heartbeat messages to be sent */
uint8_t period; /*!< Period for sending Heartbeat messages */
uint8_t ttl; /*!< TTL to be used when sending Heartbeat messages */
uint16_t feature; /*!< Bit field indicating features that trigger Heartbeat messages when changed */
uint16_t net_idx; /*!< NetKey Index used by Heartbeat Publication */
} heartbeat_pub;
/** Heartbeat Subscription */
struct {
int64_t expiry;
int64_t expiry; /*!< Timestamp when Heartbeat subscription period is expired */
uint16_t src;
uint16_t dst;
uint16_t count;
uint8_t min_hops;
uint8_t max_hops;
uint16_t src; /*!< Source address for Heartbeat messages */
uint16_t dst; /*!< Destination address for Heartbeat messages */
uint16_t count; /*!< Number of Heartbeat messages received */
uint8_t min_hops; /*!< Minimum hops when receiving Heartbeat messages */
uint8_t max_hops; /*!< Maximum hops when receiving Heartbeat messages */
/** Optional subscription tracking function */
void (*func)(uint8_t hops, uint16_t feature);
} heartbeat_sub;
} esp_ble_mesh_cfg_srv_t;
/** Parameters of Composition Data Get. */
/** Parameters of Config Composition Data Get. */
typedef struct {
uint8_t page; /*!< Page number of the Composition Data. */
} esp_ble_mesh_cfg_composition_data_get_t;
/** Parameters of Model Publication Get. */
/** Parameters of Config Model Publication Get. */
typedef struct {
uint16_t element_addr; /*!< The element address */
uint16_t model_id; /*!< The model id */
uint16_t company_id; /*!< The company id, if not a vendor model, shall set to 0xFFFF */
} esp_ble_mesh_cfg_model_pub_get_t;
/** Parameters of SIG Model Subscription Get. */
/** Parameters of Config SIG Model Subscription Get. */
typedef struct {
uint16_t element_addr; /*!< The element address */
uint16_t model_id; /*!< The model id */
} esp_ble_mesh_cfg_sig_model_sub_get_t;
/** Parameters of Vendor Model Subscription Get. */
/** Parameters of Config Vendor Model Subscription Get. */
typedef struct {
uint16_t element_addr; /*!< The element address */
uint16_t model_id; /*!< The model id */
uint16_t company_id; /*!< The company id, if not a vendor model, shall set to 0xFFFF */
} esp_ble_mesh_cfg_vnd_model_sub_get_t;
/** Parameters of Application Key Get. */
/** Parameters of Config AppKey Get. */
typedef struct {
uint16_t net_idx; /*!< The network key index */
} esp_ble_mesh_cfg_app_key_get_t;
/** Parameters of Node Identity Get. */
/** Parameters of Config Node Identity Get. */
typedef struct {
uint16_t net_idx; /*!< The network key index */
} esp_ble_mesh_cfg_node_identity_get_t;
/** Parameters of SIG Model App Get. */
/** Parameters of Config SIG Model App Get. */
typedef struct {
uint16_t element_addr; /*!< The element address */
uint16_t model_id; /*!< The model id */
} esp_ble_mesh_cfg_sig_model_app_get_t;
/** Parameters of Vendor Model App Get. */
/** Parameters of Config Vendor Model App Get. */
typedef struct {
uint16_t element_addr; /*!< The element address */
uint16_t model_id; /*!< The model id */
uint16_t company_id; /*!< The company id, if not a vendor model, shall set to 0xFFFF */
} esp_ble_mesh_cfg_vnd_model_app_get_t;
/** Parameters of Key Refresh Phase Get. */
/** Parameters of Config Key Refresh Phase Get. */
typedef struct {
uint16_t net_idx; /*!< The network key index */
} esp_ble_mesh_cfg_kr_phase_get_t;
/** Parameters of Low Power Node PollTimeout Get. */
/** Parameters of Config Low Power Node PollTimeout Get. */
typedef struct {
uint16_t lpn_addr; /*!< The unicast address of the Low Power node */
} esp_ble_mesh_cfg_lpn_polltimeout_get_t;
/** Parameters of Beacon Set. */
/** Parameters of Config Beacon Set. */
typedef struct {
uint8_t beacon;
uint8_t beacon; /*!< New Secure Network Beacon state */
} esp_ble_mesh_cfg_beacon_set_t;
/** Parameters of Default TTL Set. */
/** Parameters of Config Default TTL Set. */
typedef struct {
uint8_t ttl; /*!< The default TTL state value */
} esp_ble_mesh_cfg_default_ttl_set_t;
/** Parameters of Friend Set. */
/** Parameters of Config Friend Set. */
typedef struct {
uint8_t friend_state; /*!< The friend state value */
} esp_ble_mesh_cfg_friend_set_t;
/** Parameters of GATT Proxy Set. */
/** Parameters of Config GATT Proxy Set. */
typedef struct {
uint8_t gatt_proxy; /*!< The GATT Proxy state value */
} esp_ble_mesh_cfg_gatt_proxy_set_t;
/** Parameters of Relay Set. */
/** Parameters of Config Relay Set. */
typedef struct {
uint8_t relay; /*!< The relay value */
uint8_t relay_retransmit; /*!< The relay retransmit value */
} esp_ble_mesh_cfg_relay_set_t;
/** Parameters of Network Key Add. */
/** Parameters of Config NetKey Add. */
typedef struct {
uint16_t net_idx; /*!< The network key index */
uint8_t net_key[16]; /*!< The network key value */
} esp_ble_mesh_cfg_net_key_add_t;
/** Parameters of Application Key Add. */
/** Parameters of Config AppKey Add. */
typedef struct {
uint16_t net_idx; /*!< The network key index */
uint16_t app_idx; /*!< The app key index */
uint8_t app_key[16]; /*!< The app key value */
} esp_ble_mesh_cfg_app_key_add_t;
/** Parameters of Model Application Key Bind. */
/** Parameters of Config Model App Bind. */
typedef struct {
uint16_t element_addr; /*!< The element address */
uint16_t model_app_idx; /*!< Index of the app key to bind with the model */
@ -188,7 +189,7 @@ typedef struct {
uint16_t company_id; /*!< The company id, if not a vendor model, shall set to 0xFFFF */
} esp_ble_mesh_cfg_model_app_bind_t;
/** Parameters of Model Publication Set. */
/** Parameters of Config Model Publication Set. */
typedef struct {
uint16_t element_addr; /*!< The element address */
uint16_t publish_addr; /*!< Value of the publish address */
@ -201,7 +202,7 @@ typedef struct {
uint16_t company_id; /*!< The company id, if not a vendor model, shall set to 0xFFFF */
} esp_ble_mesh_cfg_model_pub_set_t;
/** Parameters of Model Subscription Add. */
/** Parameters of Config Model Subscription Add. */
typedef struct {
uint16_t element_addr; /*!< The element address */
uint16_t sub_addr; /*!< The address to be added to the Subscription List */
@ -209,7 +210,7 @@ typedef struct {
uint16_t company_id; /*!< The company id, if not a vendor model, shall set to 0xFFFF */
} esp_ble_mesh_cfg_model_sub_add_t;
/** Parameters of Model Subscription Delete. */
/** Parameters of Config Model Subscription Delete. */
typedef struct {
uint16_t element_addr; /*!< The element address */
uint16_t sub_addr; /*!< The address to be removed from the Subscription List */
@ -217,7 +218,7 @@ typedef struct {
uint16_t company_id; /*!< The company id, if not a vendor model, shall set to 0xFFFF */
} esp_ble_mesh_cfg_model_sub_delete_t;
/** Parameters of Model Subscription Overwrite. */
/** Parameters of Config Model Subscription Overwrite. */
typedef struct {
uint16_t element_addr; /*!< The element address */
uint16_t sub_addr; /*!< The address to be added to the Subscription List */
@ -225,7 +226,7 @@ typedef struct {
uint16_t company_id; /*!< The company id, if not a vendor model, shall set to 0xFFFF */
} esp_ble_mesh_cfg_model_sub_overwrite_t;
/** Parameters of Model Subscription Virtual Address Add. */
/** Parameters of Config Model Subscription Virtual Address Add. */
typedef struct {
uint16_t element_addr; /*!< The element address */
uint8_t label_uuid[16]; /*!< The Label UUID of the virtual address to be added to the Subscription List */
@ -233,7 +234,7 @@ typedef struct {
uint16_t company_id; /*!< The company id, if not a vendor model, shall set to 0xFFFF */
} esp_ble_mesh_cfg_model_sub_va_add_t;
/** Parameters of Model Subscription Virtual Address Delete. */
/** Parameters of Config Model Subscription Virtual Address Delete. */
typedef struct {
uint16_t element_addr; /*!< The element address */
uint8_t label_uuid[16]; /*!< The Label UUID of the virtual address to be removed from the Subscription List */
@ -241,7 +242,7 @@ typedef struct {
uint16_t company_id; /*!< The company id, if not a vendor model, shall set to 0xFFFF */
} esp_ble_mesh_cfg_model_sub_va_delete_t;
/** Parameters of Model Subscription Virtual Address Overwrite. */
/** Parameters of Config Model Subscription Virtual Address Overwrite. */
typedef struct {
uint16_t element_addr; /*!< The element address */
uint8_t label_uuid[16]; /*!< The Label UUID of the virtual address to be added to the Subscription List */
@ -249,7 +250,7 @@ typedef struct {
uint16_t company_id; /*!< The company id, if not a vendor model, shall set to 0xFFFF */
} esp_ble_mesh_cfg_model_sub_va_overwrite_t;
/** Parameters of Model Publication Virtual Address Set. */
/** Parameters of Config Model Publication Virtual Address Set. */
typedef struct {
uint16_t element_addr; /*!< The element address */
uint8_t label_uuid[16]; /*!< Value of the Label UUID publish address */
@ -262,44 +263,44 @@ typedef struct {
uint16_t company_id; /*!< The company id, if not a vendor model, shall set to 0xFFFF */
} esp_ble_mesh_cfg_model_pub_va_set_t;
/** Parameters of Model Subscription Delete All. */
/** Parameters of Config Model Subscription Delete All. */
typedef struct {
uint16_t element_addr; /*!< The element address */
uint16_t model_id; /*!< The model id */
uint16_t company_id; /*!< The company id, if not a vendor model, shall set to 0xFFFF */
} esp_ble_mesh_cfg_model_sub_delete_all_t;
/** Parameters of Network Key Update. */
/** Parameters of Config NetKey Update. */
typedef struct {
uint16_t net_idx; /*!< The network key index */
uint8_t net_key[16]; /*!< The network key value */
} esp_ble_mesh_cfg_net_key_update_t;
/** Parameters of Network Key Delete. */
/** Parameters of Config NetKey Delete. */
typedef struct {
uint16_t net_idx; /*!< The network key index */
} esp_ble_mesh_cfg_net_key_delete_t;
/** Parameters of Application Key Update. */
/** Parameters of Config AppKey Update. */
typedef struct {
uint16_t net_idx; /*!< The network key index */
uint16_t app_idx; /*!< The app key index */
uint8_t app_key[16]; /*!< The app key value */
} esp_ble_mesh_cfg_app_key_update_t;
/** Parameters of Application Key Delete. */
/** Parameters of Config AppKey Delete. */
typedef struct {
uint16_t net_idx; /*!< The network key index */
uint16_t app_idx; /*!< The app key index */
} esp_ble_mesh_cfg_app_key_delete_t;
/** Parameters of Node Identity Set. */
/** Parameters of Config Node Identity Set. */
typedef struct {
uint16_t net_idx; /*!< The network key index */
uint8_t identity; /*!< New Node Identity state */
} esp_ble_mesh_cfg_node_identity_set_t;
/** Parameters of Model Application Key Unbind. */
/** Parameters of Config Model App Unbind. */
typedef struct {
uint16_t element_addr; /*!< The element address */
uint16_t model_app_idx; /*!< Index of the app key to bind with the model */
@ -307,32 +308,32 @@ typedef struct {
uint16_t company_id; /*!< The company id, if not a vendor model, shall set to 0xFFFF */
} esp_ble_mesh_cfg_model_app_unbind_t;
/** Parameters of Key Refresh Phase Set. */
/** Parameters of Config Key Refresh Phase Set. */
typedef struct {
uint16_t net_idx; /*!< The network key index */
uint8_t transition; /*!< New Key Refresh Phase Transition */
} esp_ble_mesh_cfg_kr_phase_set_t;
/** Parameters of Network Transmit Set. */
/** Parameters of Config Network Transmit Set. */
typedef struct {
uint8_t net_transmit; /*!< Network Transmit State */
} esp_ble_mesh_cfg_net_transmit_set_t;
/** Parameters of Model Heartbeat Publication Set. */
/** Parameters of Config Model Heartbeat Publication Set. */
typedef struct {
uint16_t dst;
uint8_t count;
uint8_t period;
uint8_t ttl;
uint16_t feature;
uint16_t net_idx;
uint16_t dst; /*!< Destination address for Heartbeat messages */
uint8_t count; /*!< Number of Heartbeat messages to be sent */
uint8_t period; /*!< Period for sending Heartbeat messages */
uint8_t ttl; /*!< TTL to be used when sending Heartbeat messages */
uint16_t feature; /*!< Bit field indicating features that trigger Heartbeat messages when changed */
uint16_t net_idx; /*!< NetKey Index */
} esp_ble_mesh_cfg_heartbeat_pub_set_t;
/** Parameters of Model Heartbeat Subscription Set. */
/** Parameters of Config Model Heartbeat Subscription Set. */
typedef struct {
uint16_t src;
uint16_t dst;
uint8_t period;
uint16_t src; /*!< Source address for Heartbeat messages */
uint16_t dst; /*!< Destination address for Heartbeat messages */
uint8_t period; /*!< Period for receiving Heartbeat messages */
} esp_ble_mesh_cfg_heartbeat_sub_set_t;
/**
@ -411,28 +412,34 @@ typedef union {
esp_ble_mesh_cfg_net_transmit_set_t net_transmit_set; /*!< For ESP_BLE_MESH_MODEL_OP_NETWORK_TRANSMIT_SET */
} esp_ble_mesh_cfg_client_set_state_t;
/** Parameter of Config Beacon Status */
typedef struct {
uint8_t beacon; /*!< Secure Network Beacon state value */
} esp_ble_mesh_cfg_beacon_status_cb_t;
/** Parameters of Config Composition Data Status */
typedef struct {
uint8_t page; /*!< Page number of the Composition Data */
struct net_buf_simple *composition_data; /*!< Pointer to Composition Data for the identified page */
} esp_ble_mesh_cfg_comp_data_status_cb_t;
/** Parameter of Config Default TTL Status */
typedef struct {
uint8_t default_ttl; /*!< Default TTL state value */
} esp_ble_mesh_cfg_default_ttl_status_cb_t;
/** Parameter of Config GATT Proxy Status */
typedef struct {
uint8_t gatt_proxy; /*!< GATT Proxy state value */
} esp_ble_mesh_cfg_gatt_proxy_status_cb_t;
/** Parameters of Config Relay Status */
typedef struct {
uint8_t relay; /*!< Relay state value */
uint8_t retransmit; /*!< Relay retransmit value(number of retransmissions and number of 10-millisecond steps between retransmissions) */
} esp_ble_mesh_cfg_relay_status_cb_t;
/** Parameters of Config Model Publication Status */
typedef struct {
uint8_t status; /*!< Status Code for the request message */
uint16_t element_addr; /*!< Address of the element */
@ -446,6 +453,7 @@ typedef struct {
uint16_t model_id; /*!< Model ID */
} esp_ble_mesh_cfg_model_pub_status_cb_t;
/** Parameters of Config Model Subscription Status */
typedef struct {
uint8_t status; /*!< Status Code for the request message */
uint16_t element_addr; /*!< Address of the element */
@ -454,17 +462,20 @@ typedef struct {
uint16_t model_id; /*!< Model ID */
} esp_ble_mesh_cfg_model_sub_status_cb_t;
/** Parameters of Config NetKey Status */
typedef struct {
uint8_t status; /*!< Status Code for the request message */
uint16_t net_idx; /*!< Index of the NetKey */
} esp_ble_mesh_cfg_net_key_status_cb_t;
/** Parameters of Config AppKey Status */
typedef struct {
uint8_t status; /*!< Status Code for the request message */
uint16_t net_idx; /*!< Index of the NetKey */
uint16_t app_idx; /*!< Index of the application key */
} esp_ble_mesh_cfg_app_key_status_cb_t;
/** Parameters of Config Model App Status */
typedef struct {
uint8_t status; /*!< Status Code for the request message */
uint16_t element_addr; /*!< Address of the element */
@ -473,10 +484,12 @@ typedef struct {
uint16_t model_id; /*!< Model ID */
} esp_ble_mesh_cfg_mod_app_status_cb_t;
/** Parameter of Config Friend Status */
typedef struct {
uint8_t friend_state; /*!< Friend state value */
} esp_ble_mesh_cfg_friend_status_cb_t;
/** Parameters of Config Heartbeat Publication Status */
typedef struct {
uint8_t status; /*!< Status Code for the request message */
uint16_t dst; /*!< Destination address for Heartbeat messages */
@ -487,6 +500,7 @@ typedef struct {
uint16_t net_idx; /*!< Index of the NetKey */
} esp_ble_mesh_cfg_hb_pub_status_cb_t;
/** Parameters of Config Heartbeat Subscription Status */
typedef struct {
uint8_t status; /*!< Status Code for the request message */
uint16_t src; /*!< Source address for Heartbeat messages */
@ -497,11 +511,13 @@ typedef struct {
uint8_t max_hops; /*!< Maximum hops when receiving Heartbeat messages */
} esp_ble_mesh_cfg_hb_sub_status_cb_t;
/** Parameters of Config Network Transmit Status */
typedef struct {
uint8_t net_trans_count:3; /*!< Number of transmissions for each Network PDU originating from the node */
uint8_t net_trans_step :5; /*!< Maximum hops when receiving Heartbeat messages */
} esp_ble_mesh_cfg_net_trans_status_cb_t;
/** Parameters of Config SIG/Vendor Subscription List */
typedef struct {
uint8_t status; /*!< Status Code for the request message */
uint16_t element_addr; /*!< Address of the element */
@ -510,41 +526,50 @@ typedef struct {
struct net_buf_simple *sub_addr; /*!< A block of all addresses from the Subscription List */
} esp_ble_mesh_cfg_model_sub_list_cb_t;
/** Parameter of Config NetKey List */
typedef struct {
struct net_buf_simple *net_idx; /*!< A list of NetKey Indexes known to the node */
} esp_ble_mesh_cfg_net_key_list_cb_t;
/** Parameters of Config AppKey List */
typedef struct {
uint8_t status; /*!< Status Code for the request message */
uint16_t net_idx; /*!< NetKey Index of the NetKey that the AppKeys are bound to */
struct net_buf_simple *app_idx; /*!< A list of AppKey indexes that are bound to the NetKey identified by NetKeyIndex */
} esp_ble_mesh_cfg_app_key_list_cb_t;
/** Parameters of Config Node Identity Status */
typedef struct {
uint8_t status; /*!< Status Code for the request message */
uint16_t net_idx; /*!< Index of the NetKey */
uint8_t identity; /*!< Node Identity state */
} esp_ble_mesh_cfg_node_id_status_cb_t;
/** Parameters of Config SIG/Vendor Model App List */
typedef struct {
uint8_t status; /*!< Status Code for the request message */
uint16_t element_addr; /*!< Address of the element */
uint16_t company_id; /*!< Company ID */
uint16_t model_id; /*!< Model ID */
struct net_buf_simple *app_idx; /*!< All AppKey indexes bound to the Model */
struct net_buf_simple *app_idx; /*!< All AppKey indexes bound to the Model */
} esp_ble_mesh_cfg_model_app_list_cb_t;
/** Parameters of Config Key Refresh Phase Status */
typedef struct {
uint8_t status; /*!< Status Code for the request message */
uint16_t net_idx; /*!< Index of the NetKey */
uint8_t phase; /*!< Key Refresh Phase state */
} esp_ble_mesh_cfg_kr_phase_status_cb_t;
/** Parameters of Config Low Power Node PollTimeout Status */
typedef struct {
uint16_t lpn_addr; /*!< The unicast address of the Low Power node */
int32_t poll_timeout; /*!< The current value of the PollTimeout timer of the Low Power node */
} esp_ble_mesh_cfg_lpn_pollto_status_cb_t;
/**
* @brief Configuration Client Model received message union
*/
typedef union {
esp_ble_mesh_cfg_beacon_status_cb_t beacon_status; /*!< The beacon status value */
esp_ble_mesh_cfg_comp_data_status_cb_t comp_data_status; /*!< The composition data status value */
@ -569,12 +594,14 @@ typedef union {
esp_ble_mesh_cfg_lpn_pollto_status_cb_t lpn_timeout_status; /*!< The low power node poll timeout status value */
} esp_ble_mesh_cfg_client_common_cb_param_t;
/** Configuration Client Model callback parameters */
typedef struct {
int error_code; /*!< Appropriate error code */
esp_ble_mesh_client_common_param_t *params; /*!< The client common parameters */
esp_ble_mesh_cfg_client_common_cb_param_t status_cb; /*!< The config status message callback values */
} esp_ble_mesh_cfg_client_cb_param_t;
/** This enum value is the event of Configuration Client Model */
typedef enum {
ESP_BLE_MESH_CFG_CLIENT_GET_STATE_EVT,
ESP_BLE_MESH_CFG_CLIENT_SET_STATE_EVT,
@ -583,20 +610,26 @@ typedef enum {
ESP_BLE_MESH_CFG_CLIENT_EVT_MAX,
} esp_ble_mesh_cfg_client_cb_event_t;
/** Parameter of Config AppKey Add */
typedef struct {
uint16_t app_idx; /* AppKey Index of the Config AppKey Add */
uint16_t app_idx; /*!< AppKey Index of the Config AppKey Add */
} esp_ble_mesh_cfg_srv_app_key_add_cb_t;
/**
* @brief Configuration Server Model received message union
*/
typedef union {
esp_ble_mesh_cfg_srv_app_key_add_cb_t app_key_add; /* !< The Config AppKey Add event value */
esp_ble_mesh_cfg_srv_app_key_add_cb_t app_key_add; /*!< The Config AppKey Add event value */
} esp_ble_mesh_cfg_server_common_cb_param_t;
/** Configuration Server Model callback parameters */
typedef struct {
esp_ble_mesh_model_t *model; /*!< Pointer to the server model structure */
esp_ble_mesh_msg_ctx_t ctx; /*!< The context of the received message */
esp_ble_mesh_cfg_server_common_cb_param_t status_cb; /*!< The received configuration message callback values */
} esp_ble_mesh_cfg_server_cb_param_t;
/** This enum value is the event of Configuration Server Model */
typedef enum {
ESP_BLE_MESH_CFG_SERVER_RECV_MSG_EVT,
ESP_BLE_MESH_CFG_SERVER_EVT_MAX,
@ -606,11 +639,19 @@ typedef enum {
* @brief Bluetooth Mesh Config Client and Server Model functions.
*/
/** @brief: event, event code of Config Client Model events; param, parameters of Config Client Model events */
/**
* @brief Configuration Client Model callback function type
* @param event: Event type
* @param param: Pointer to callback parameter
*/
typedef void (* esp_ble_mesh_cfg_client_cb_t)(esp_ble_mesh_cfg_client_cb_event_t event,
esp_ble_mesh_cfg_client_cb_param_t *param);
/** @brief: event, event code of Config Client Model events; param, parameters of Config Client Model events */
/**
* @brief Configuration Server Model callback function type
* @param event: Event type
* @param param: Pointer to callback parameter
*/
typedef void (* esp_ble_mesh_cfg_server_cb_t)(esp_ble_mesh_cfg_server_cb_event_t event,
esp_ble_mesh_cfg_server_cb_param_t *param);
@ -638,7 +679,7 @@ esp_err_t esp_ble_mesh_register_config_server_callback(esp_ble_mesh_cfg_server_c
* @brief Get the value of Config Server Model states using the Config Client Model get messages.
*
* @note If you want to find the opcodes and corresponding meanings accepted by this API,
* please refer to (@ref esp_ble_mesh_opcode_config_client_get_t).
* please refer to esp_ble_mesh_opcode_config_client_get_t in esp_ble_mesh_defs.h
*
* @param[in] params: Pointer to BLE Mesh common client parameters.
* @param[in] get_state: Pointer to a union, each kind of opcode corresponds to one structure inside.
@ -654,7 +695,7 @@ esp_err_t esp_ble_mesh_config_client_get_state(esp_ble_mesh_client_common_param_
* @brief Set the value of the Configuration Server Model states using the Config Client Model set messages.
*
* @note If you want to find the opcodes and corresponding meanings accepted by this API,
* please refer to (@ref esp_ble_mesh_opcode_config_client_set_t).
* please refer to esp_ble_mesh_opcode_config_client_set_t in esp_ble_mesh_defs.h
*
* @param[in] params: Pointer to BLE Mesh common client parameters.
* @param[in] set_state: Pointer to a union, each kind of opcode corresponds to one structure inside.

View file

@ -1,4 +1,4 @@
// Copyright 2017-2018 Espressif Systems (Shanghai) PTE LTD
// Copyright 2017-2019 Espressif Systems (Shanghai) PTE LTD
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@ -156,109 +156,130 @@
* @brief Bluetooth Mesh Generic Client Model Get and Set parameters structure.
*/
/** Parameters of Generic OnOff Set. */
typedef struct {
bool op_en; /* Indicate if optional parameters are included */
uint8_t onoff; /* Target value of Generic OnOff state */
uint8_t tid; /* Transaction ID */
uint8_t trans_time; /* Time to complete state transition (optional) */
uint8_t delay; /* Indicate message execution delay (C.1) */
bool op_en; /*!< Indicate if optional parameters are included */
uint8_t onoff; /*!< Target value of Generic OnOff state */
uint8_t tid; /*!< Transaction ID */
uint8_t trans_time; /*!< Time to complete state transition (optional) */
uint8_t delay; /*!< Indicate message execution delay (C.1) */
} esp_ble_mesh_gen_onoff_set_t;
/** Parameters of Generic Level Set. */
typedef struct {
bool op_en; /* Indicate if optional parameters are included */
int16_t level; /* Target value of Generic Level state */
uint8_t tid; /* Transaction ID */
uint8_t trans_time; /* Time to complete state transition (optional) */
uint8_t delay; /* Indicate message execution delay (C.1) */
bool op_en; /*!< Indicate if optional parameters are included */
int16_t level; /*!< Target value of Generic Level state */
uint8_t tid; /*!< Transaction ID */
uint8_t trans_time; /*!< Time to complete state transition (optional) */
uint8_t delay; /*!< Indicate message execution delay (C.1) */
} esp_ble_mesh_gen_level_set_t;
/** Parameters of Generic Delta Set. */
typedef struct {
bool op_en; /* Indicate if optional parameters are included */
int32_t level; /* Delta change of Generic Level state */
uint8_t tid; /* Transaction ID */
uint8_t trans_time; /* Time to complete state transition (optional) */
uint8_t delay; /* Indicate message execution delay (C.1) */
bool op_en; /*!< Indicate if optional parameters are included */
int32_t level; /*!< Delta change of Generic Level state */
uint8_t tid; /*!< Transaction ID */
uint8_t trans_time; /*!< Time to complete state transition (optional) */
uint8_t delay; /*!< Indicate message execution delay (C.1) */
} esp_ble_mesh_gen_delta_set_t;
/** Parameters of Generic Move Set. */
typedef struct {
bool op_en; /* Indicate if optional parameters are included */
int16_t delta_level;/* Delta Level step to calculate Move speed for Generic Level state */
uint8_t tid; /* Transaction ID */
uint8_t trans_time; /* Time to complete state transition (optional) */
uint8_t delay; /* Indicate message execution delay (C.1) */
bool op_en; /*!< Indicate if optional parameters are included */
int16_t delta_level; /*!< Delta Level step to calculate Move speed for Generic Level state */
uint8_t tid; /*!< Transaction ID */
uint8_t trans_time; /*!< Time to complete state transition (optional) */
uint8_t delay; /*!< Indicate message execution delay (C.1) */
} esp_ble_mesh_gen_move_set_t;
/** Parameter of Generic Default Transition Time Set. */
typedef struct {
uint8_t trans_time; /* The value of the Generic Default Transition Time state */
uint8_t trans_time; /*!< The value of the Generic Default Transition Time state */
} esp_ble_mesh_gen_def_trans_time_set_t;
/** Parameter of Generic OnPowerUp Set. */
typedef struct {
uint8_t onpowerup; /* The value of the Generic OnPowerUp state */
uint8_t onpowerup; /*!< The value of the Generic OnPowerUp state */
} esp_ble_mesh_gen_onpowerup_set_t;
/** Parameters of Generic Power Level Set. */
typedef struct {
bool op_en; /* Indicate if optional parameters are included */
uint16_t power; /* Target value of Generic Power Actual state */
uint8_t tid; /* Transaction ID */
uint8_t trans_time; /* Time to complete state transition (optional) */
uint8_t delay; /* Indicate message execution delay (C.1) */
bool op_en; /*!< Indicate if optional parameters are included */
uint16_t power; /*!< Target value of Generic Power Actual state */
uint8_t tid; /*!< Transaction ID */
uint8_t trans_time; /*!< Time to complete state transition (optional) */
uint8_t delay; /*!< Indicate message execution delay (C.1) */
} esp_ble_mesh_gen_power_level_set_t;
/** Parameter of Generic Power Default Set. */
typedef struct {
uint16_t power; /* The value of the Generic Power Default state */
uint16_t power; /*!< The value of the Generic Power Default state */
} esp_ble_mesh_gen_power_default_set_t;
/** Parameters of Generic Power Range Set. */
typedef struct {
uint16_t range_min; /* Value of Range Min field of Generic Power Range state */
uint16_t range_max; /* Value of Range Max field of Generic Power Range state */
uint16_t range_min; /*!< Value of Range Min field of Generic Power Range state */
uint16_t range_max; /*!< Value of Range Max field of Generic Power Range state */
} esp_ble_mesh_gen_power_range_set_t;
/** Parameters of Generic Location Global Set. */
typedef struct {
int32_t global_latitude; /* Global Coordinates (Latitude) */
int32_t global_longitude; /* Global Coordinates (Longitude) */
int16_t global_altitude; /* Global Altitude */
int32_t global_latitude; /*!< Global Coordinates (Latitude) */
int32_t global_longitude; /*!< Global Coordinates (Longitude) */
int16_t global_altitude; /*!< Global Altitude */
} esp_ble_mesh_gen_loc_global_set_t;
/** Parameters of Generic Location Local Set. */
typedef struct {
int16_t local_north; /* Local Coordinates (North) */
int16_t local_east; /* Local Coordinates (East) */
int16_t local_altitude; /* Local Altitude */
uint8_t floor_number; /* Floor Number */
uint16_t uncertainty; /* Uncertainty */
int16_t local_north; /*!< Local Coordinates (North) */
int16_t local_east; /*!< Local Coordinates (East) */
int16_t local_altitude; /*!< Local Altitude */
uint8_t floor_number; /*!< Floor Number */
uint16_t uncertainty; /*!< Uncertainty */
} esp_ble_mesh_gen_loc_local_set_t;
/** Parameter of Generic User Property Get. */
typedef struct {
uint16_t property_id; /* Property ID identifying a Generic User Property */
uint16_t property_id; /*!< Property ID identifying a Generic User Property */
} esp_ble_mesh_gen_user_property_get_t;
/** Parameters of Generic User Property Set. */
typedef struct {
uint16_t property_id; /* Property ID identifying a Generic User Property */
struct net_buf_simple *property_value; /* Raw value for the User Property */
uint16_t property_id; /*!< Property ID identifying a Generic User Property */
struct net_buf_simple *property_value; /*!< Raw value for the User Property */
} esp_ble_mesh_gen_user_property_set_t;
/** Parameter of Generic Admin Property Get. */
typedef struct {
uint16_t property_id; /* Property ID identifying a Generic Admin Property */
uint16_t property_id; /*!< Property ID identifying a Generic Admin Property */
} esp_ble_mesh_gen_admin_property_get_t;
/** Parameters of Generic Admin Property Set. */
typedef struct {
uint16_t property_id; /* Property ID identifying a Generic Admin Property */
uint8_t user_access; /* Enumeration indicating user access */
struct net_buf_simple *property_value; /* Raw value for the Admin Property */
uint16_t property_id; /*!< Property ID identifying a Generic Admin Property */
uint8_t user_access; /*!< Enumeration indicating user accessn */
struct net_buf_simple *property_value; /*!< Raw value for the Admin Property */
} esp_ble_mesh_gen_admin_property_set_t;
/** Parameter of Generic Manufacturer Property Get. */
typedef struct {
uint16_t property_id; /* Property ID identifying a Generic Manufacturer Property */
uint16_t property_id; /*!< Property ID identifying a Generic Manufacturer Property */
} esp_ble_mesh_gen_manufacturer_property_get_t;
/** Parameters of Generic Manufacturer Property Set. */
typedef struct {
uint16_t property_id; /* Property ID identifying a Generic Manufacturer Property */
uint8_t user_access; /* Enumeration indicating user access */
uint16_t property_id; /*!< Property ID identifying a Generic Manufacturer Property */
uint8_t user_access; /*!< Enumeration indicating user access */
} esp_ble_mesh_gen_manufacturer_property_set_t;
/** Parameter of Generic Client Properties Get. */
typedef struct {
uint16_t property_id; /* A starting Client Property ID present within an element */
uint16_t property_id; /*!< A starting Client Property ID present within an element */
} esp_ble_mesh_gen_client_properties_get_t;
/**
* @brief Generic Client Model get message union
*/
typedef union {
esp_ble_mesh_gen_user_property_get_t user_property_get; /*!< For ESP_BLE_MESH_MODEL_OP_GEN_USER_PROPERTY_GET */
esp_ble_mesh_gen_admin_property_get_t admin_property_get; /*!< For ESP_BLE_MESH_MODEL_OP_GEN_ADMIN_PROPERTY_GET*/
@ -266,6 +287,9 @@ typedef union {
esp_ble_mesh_gen_client_properties_get_t client_properties_get; /*!< For ESP_BLE_MESH_MODEL_OP_GEN_CLIENT_PROPERTIES_GET */
} esp_ble_mesh_generic_client_get_state_t;
/**
* @brief Generic Client Model set message union
*/
typedef union {
esp_ble_mesh_gen_onoff_set_t onoff_set; /*!< For ESP_BLE_MESH_MODEL_OP_GEN_ONOFF_SET & ESP_BLE_MESH_MODEL_OP_GEN_ONOFF_SET_UNACK */
esp_ble_mesh_gen_level_set_t level_set; /*!< For ESP_BLE_MESH_MODEL_OP_GEN_LEVEL_SET & ESP_BLE_MESH_MODEL_OP_GEN_LEVEL_SET_UNACK */
@ -287,107 +311,128 @@ typedef union {
* @brief Bluetooth Mesh Generic Client Model Get and Set callback parameters structure.
*/
/** Parameters of Generic OnOff Status. */
typedef struct {
bool op_en; /* Indicate if optional parameters are included */
uint8_t present_onoff; /* Current value of Generic OnOff state */
uint8_t target_onoff; /* Target value of Generic OnOff state (optional) */
uint8_t remain_time; /* Time to complete state transition (C.1) */
bool op_en; /*!< Indicate if optional parameters are included */
uint8_t present_onoff; /*!< Current value of Generic OnOff state */
uint8_t target_onoff; /*!< Target value of Generic OnOff state (optional) */
uint8_t remain_time; /*!< Time to complete state transition (C.1) */
} esp_ble_mesh_gen_onoff_status_cb_t;
/** Parameters of Generic Level Status. */
typedef struct {
bool op_en; /* Indicate if optional parameters are included */
int16_t present_level; /* Current value of Generic Level state */
int16_t target_level; /* Target value of the Generic Level state (optional) */
uint8_t remain_time; /* Time to complete state transition (C.1) */
bool op_en; /*!< Indicate if optional parameters are included */
int16_t present_level; /*!< Current value of Generic Level state */
int16_t target_level; /*!< Target value of the Generic Level state (optional) */
uint8_t remain_time; /*!< Time to complete state transition (C.1) */
} esp_ble_mesh_gen_level_status_cb_t;
/** Parameter of Generic Default Transition Time Status. */
typedef struct {
uint8_t trans_time; /* The value of the Generic Default Transition Time state */
uint8_t trans_time; /*!< The value of the Generic Default Transition Time state */
} esp_ble_mesh_gen_def_trans_time_status_cb_t;
/** Parameter of Generic OnPowerUp Status. */
typedef struct {
uint8_t onpowerup; /* The value of the Generic OnPowerUp state */
uint8_t onpowerup; /*!< The value of the Generic OnPowerUp state */
} esp_ble_mesh_gen_onpowerup_status_cb_t;
/** Parameters of Generic Power Level Status. */
typedef struct {
bool op_en; /* Indicate if optional parameters are included */
uint16_t present_power; /* Current value of Generic Power Actual state */
uint16_t target_power; /* Target value of Generic Power Actual state (optional) */
uint8_t remain_time; /* Time to complete state transition (C.1) */
bool op_en; /*!< Indicate if optional parameters are included */
uint16_t present_power; /*!< Current value of Generic Power Actual state */
uint16_t target_power; /*!< Target value of Generic Power Actual state (optional) */
uint8_t remain_time; /*!< Time to complete state transition (C.1) */
} esp_ble_mesh_gen_power_level_status_cb_t;
/** Parameter of Generic Power Last Status. */
typedef struct {
uint16_t power; /* The value of the Generic Power Last state */
uint16_t power; /*!< The value of the Generic Power Last state */
} esp_ble_mesh_gen_power_last_status_cb_t;
/** Parameter of Generic Power Default Status. */
typedef struct {
uint16_t power; /* The value of the Generic Default Last state */
uint16_t power; /*!< The value of the Generic Default Last state */
} esp_ble_mesh_gen_power_default_status_cb_t;
/** Parameters of Generic Power Range Status. */
typedef struct {
uint8_t status_code; /* Status Code for the request message */
uint16_t range_min; /* Value of Range Min field of Generic Power Range state */
uint16_t range_max; /* Value of Range Max field of Generic Power Range state */
uint8_t status_code; /*!< Status Code for the request message */
uint16_t range_min; /*!< Value of Range Min field of Generic Power Range state */
uint16_t range_max; /*!< Value of Range Max field of Generic Power Range state */
} esp_ble_mesh_gen_power_range_status_cb_t;
/** Parameters of Generic Battery Status. */
typedef struct {
u32_t battery_level : 8; /* Value of Generic Battery Level state */
u32_t time_to_discharge : 24; /* Value of Generic Battery Time to Discharge state */
u32_t time_to_charge : 24; /* Value of Generic Battery Time to Charge state */
u32_t flags : 8; /* Value of Generic Battery Flags state */
u32_t battery_level : 8; /*!< Value of Generic Battery Level state */
u32_t time_to_discharge : 24; /*!< Value of Generic Battery Time to Discharge state */
u32_t time_to_charge : 24; /*!< Value of Generic Battery Time to Charge state */
u32_t flags : 8; /*!< Value of Generic Battery Flags state */
} esp_ble_mesh_gen_battery_status_cb_t;
/** Parameters of Generic Location Global Status. */
typedef struct {
int32_t global_latitude; /* Global Coordinates (Latitude) */
int32_t global_longitude; /* Global Coordinates (Longitude) */
int16_t global_altitude; /* Global Altitude */
int32_t global_latitude; /*!< Global Coordinates (Latitude) */
int32_t global_longitude; /*!< Global Coordinates (Longitude) */
int16_t global_altitude; /*!< Global Altitude */
} esp_ble_mesh_gen_loc_global_status_cb_t;
/** Parameters of Generic Location Local Status. */
typedef struct {
int16_t local_north; /* Local Coordinates (North) */
int16_t local_east; /* Local Coordinates (East) */
int16_t local_altitude; /* Local Altitude */
uint8_t floor_number; /* Floor Number */
uint16_t uncertainty; /* Uncertainty */
int16_t local_north; /*!< Local Coordinates (North) */
int16_t local_east; /*!< Local Coordinates (East) */
int16_t local_altitude; /*!< Local Altitude */
uint8_t floor_number; /*!< Floor Number */
uint16_t uncertainty; /*!< Uncertainty */
} esp_ble_mesh_gen_loc_local_status_cb_t;
/** Parameter of Generic User Properties Status. */
typedef struct {
struct net_buf_simple *property_ids; /* Buffer contains a sequence of N User Property IDs */
struct net_buf_simple *property_ids; /*!< Buffer contains a sequence of N User Property IDs */
} esp_ble_mesh_gen_user_properties_status_cb_t;
/** Parameters of Generic User Property Status. */
typedef struct {
bool op_en; /* Indicate if optional parameters are included */
uint16_t property_id; /* Property ID identifying a Generic User Property */
uint8_t user_access; /* Enumeration indicating user access (optional) */
struct net_buf_simple *property_value; /* Raw value for the User Property (C.1) */
bool op_en; /*!< Indicate if optional parameters are included */
uint16_t property_id; /*!< Property ID identifying a Generic User Property */
uint8_t user_access; /*!< Enumeration indicating user access (optional) */
struct net_buf_simple *property_value; /*!< Raw value for the User Property (C.1) */
} esp_ble_mesh_gen_user_property_status_cb_t;
/** Parameter of Generic Admin Properties Status. */
typedef struct {
struct net_buf_simple *property_ids; /* Buffer contains a sequence of N Admin Property IDs */
struct net_buf_simple *property_ids; /*!< Buffer contains a sequence of N Admin Property IDs */
} esp_ble_mesh_gen_admin_properties_status_cb_t;
/** Parameters of Generic Admin Property Status. */
typedef struct {
bool op_en; /* Indicate if optional parameters are included */
uint16_t property_id; /* Property ID identifying a Generic Admin Property */
uint8_t user_access; /* Enumeration indicating user access (optional) */
struct net_buf_simple *property_value; /* Raw value for the Admin Property (C.1) */
bool op_en; /*!< Indicate if optional parameters are included */
uint16_t property_id; /*!< Property ID identifying a Generic Admin Property */
uint8_t user_access; /*!< Enumeration indicating user access (optional) */
struct net_buf_simple *property_value; /*!< Raw value for the Admin Property (C.1) */
} esp_ble_mesh_gen_admin_property_status_cb_t;
/** Parameter of Generic Manufacturer Properties Status. */
typedef struct {
struct net_buf_simple *property_ids; /* Buffer contains a sequence of N Manufacturer Property IDs */
struct net_buf_simple *property_ids; /*!< Buffer contains a sequence of N Manufacturer Property IDs */
} esp_ble_mesh_gen_manufacturer_properties_status_cb_t;
/** Parameters of Generic Manufacturer Property Status. */
typedef struct {
bool op_en; /* Indicate if optional parameters are included */
uint16_t property_id; /* Property ID identifying a Generic Manufacturer Property */
uint8_t user_access; /* Enumeration indicating user access (optional) */
struct net_buf_simple *property_value; /* Raw value for the Manufacturer Property (C.1) */
bool op_en; /*!< Indicate if optional parameters are included */
uint16_t property_id; /*!< Property ID identifying a Generic Manufacturer Property */
uint8_t user_access; /*!< Enumeration indicating user access (optional) */
struct net_buf_simple *property_value; /*!< Raw value for the Manufacturer Property (C.1) */
} esp_ble_mesh_gen_manufacturer_property_status_cb_t;
/** Parameter of Generic Client Properties Status. */
typedef struct {
struct net_buf_simple *property_ids; /* Buffer contains a sequence of N Client Property IDs */
struct net_buf_simple *property_ids; /*!< Buffer contains a sequence of N Client Property IDs */
} esp_ble_mesh_gen_client_properties_status_cb_t;
/**
* @brief Generic Client Model received message union
*/
typedef union {
esp_ble_mesh_gen_onoff_status_cb_t onoff_status; /*!< For ESP_BLE_MESH_MODEL_OP_GEN_ONOFF_STATUS */
esp_ble_mesh_gen_level_status_cb_t level_status; /*!< For ESP_BLE_MESH_MODEL_OP_GEN_LEVEL_STATUS */
@ -409,12 +454,14 @@ typedef union {
esp_ble_mesh_gen_client_properties_status_cb_t client_properties_status; /*!< ESP_BLE_MESH_MODEL_OP_GEN_CLIENT_PROPERTIES_STATUS */
} esp_ble_mesh_gen_client_status_cb_t;
/** Generic Client Model callback parameters */
typedef struct {
int error_code; /*!< Appropriate error code */
esp_ble_mesh_client_common_param_t *params; /*!< The client common parameters. */
esp_ble_mesh_gen_client_status_cb_t status_cb; /*!< The generic status message callback values */
} esp_ble_mesh_generic_client_cb_param_t;
/** This enum value is the event of Generic Client Model */
typedef enum {
ESP_BLE_MESH_GENERIC_CLIENT_GET_STATE_EVT,
ESP_BLE_MESH_GENERIC_CLIENT_SET_STATE_EVT,
@ -427,7 +474,11 @@ typedef enum {
* @brief Bluetooth Mesh Generic Client Model function.
*/
/** @brief: event, event code of Generic Client Model events; param, parameters of Generic Client Model events */
/**
* @brief Generic Client Model callback function type
* @param event: Event type
* @param param: Pointer to callback parameter
*/
typedef void (* esp_ble_mesh_generic_client_cb_t)(esp_ble_mesh_generic_client_cb_event_t event,
esp_ble_mesh_generic_client_cb_param_t *param);
@ -445,7 +496,7 @@ esp_err_t esp_ble_mesh_register_generic_client_callback(esp_ble_mesh_generic_cli
* @brief Get the value of Generic Server Model states using the Generic Client Model get messages.
*
* @note If you want to find the opcodes and corresponding meanings accepted by this API,
* please refer to (@ref esp_ble_mesh_generic_message_opcode_t).
* please refer to esp_ble_mesh_generic_message_opcode_t in esp_ble_mesh_defs.h
*
* @param[in] params: Pointer to BLE Mesh common client parameters.
* @param[in] get_state: Pointer to generic get message value.
@ -461,7 +512,7 @@ esp_err_t esp_ble_mesh_generic_client_get_state(esp_ble_mesh_client_common_param
* @brief Set the value of Generic Server Model states using the Generic Client Model set messages.
*
* @note If you want to find the opcodes and corresponding meanings accepted by this API,
* please refer to (@ref esp_ble_mesh_generic_message_opcode_t).
* please refer to esp_ble_mesh_generic_message_opcode_t in esp_ble_mesh_defs.h
*
* @param[in] params: Pointer to BLE Mesh common client parameters.
* @param[in] set_state: Pointer to generic set message value.

View file

@ -1,4 +1,4 @@
// Copyright 2017-2018 Espressif Systems (Shanghai) PTE LTD
// Copyright 2017-2019 Espressif Systems (Shanghai) PTE LTD
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@ -47,63 +47,65 @@
ESP_BLE_MESH_SIG_MODEL(ESP_BLE_MESH_MODEL_ID_HEALTH_CLI, \
NULL, NULL, cli_data)
/** Health Server Model callbacks */
typedef struct {
/* Fetch current faults */
/** Fetch current faults */
int (*fault_get_cur)(esp_ble_mesh_model_t *model, uint8_t *test_id,
uint16_t *company_id, uint8_t *faults, uint8_t *fault_count);
/* Fetch registered faults */
/** Fetch registered faults */
int (*fault_get_reg)(esp_ble_mesh_model_t *model, uint16_t company_id,
uint8_t *test_id, uint8_t *faults, uint8_t *fault_count);
/* Clear registered faults */
/** Clear registered faults */
int (*fault_clear)(esp_ble_mesh_model_t *model, uint16_t company_id);
/* Run a specific test */
/** Run a specific test */
int (*fault_test)(esp_ble_mesh_model_t *model, uint8_t test_id, uint16_t company_id);
/* Attention on */
/** Attention on */
void (*attn_on)(esp_ble_mesh_model_t *model);
/* Attention off */
/** Attention off */
void (*attn_off)(esp_ble_mesh_model_t *model);
} esp_ble_mesh_health_srv_cb_t;
/** ESP BLE Mesh Health Server Model Context */
/** Health Server Model Context */
typedef struct {
/** Pointer to Health Server Model */
esp_ble_mesh_model_t *model;
/* Optional callback struct */
/** Optional callback struct */
const esp_ble_mesh_health_srv_cb_t *cb;
/* Attention Timer state */
/** Attention Timer state */
struct k_delayed_work attn_timer;
} esp_ble_mesh_health_srv_t;
/** BLE Mesh Health Client Model fault get Context */
/** Parameter of Health Fault Get */
typedef struct {
uint16_t company_id; /*!< Bluetooth assigned 16-bit Company ID */
uint16_t company_id; /*!< Bluetooth assigned 16-bit Company ID */
} esp_ble_mesh_health_fault_get_t;
/** Mesh Health Client Model attention set Context */
/** Parameter of Health Attention Set */
typedef struct {
uint8_t attention; /*!< Value of the Attention Timer state */
uint8_t attention; /*!< Value of the Attention Timer state */
} esp_ble_mesh_health_attention_set_t;
/** Mesh Health client Model period set Context */
/** Parameter of Health Period Set */
typedef struct {
uint8_t fast_period_divisor; /*!< Divider for the Publish Period */
uint8_t fast_period_divisor; /*!< Divider for the Publish Period */
} esp_ble_mesh_health_period_set_t;
/** BLE Mesh Health Client Model fault test Context */
/** Parameter of Health Fault Test */
typedef struct {
uint16_t company_id; /*!< Bluetooth assigned 16-bit Company ID */
uint8_t test_id; /*!< ID of a specific test to be performed */
uint16_t company_id; /*!< Bluetooth assigned 16-bit Company ID */
uint8_t test_id; /*!< ID of a specific test to be performed */
} esp_ble_mesh_health_fault_test_t;
/** BLE Mesh Health Client Model fault clear Context */
/** Parameter of Health Fault Clear */
typedef struct {
uint16_t company_id; /*!< Bluetooth assigned 16-bit Company ID */
uint16_t company_id; /*!< Bluetooth assigned 16-bit Company ID */
} esp_ble_mesh_health_fault_clear_t;
/**
@ -134,26 +136,33 @@ typedef union {
esp_ble_mesh_health_fault_clear_t fault_clear; /*!< For ESP_BLE_MESH_MODEL_OP_HEALTH_FAULT_CLEAR or ESP_BLE_MESH_MODEL_OP_HEALTH_FAULT_CLEAR_UNACK. */
} esp_ble_mesh_health_client_set_state_t;
/** Parameters of Health Current Status */
typedef struct {
uint8_t test_id; /*!< ID of a most recently performed test */
uint16_t company_id; /*!< Bluetooth assigned 16-bit Company ID */
struct net_buf_simple *fault_array; /*!< FaultArray field contains a sequence of 1-octet fault values */
} esp_ble_mesh_health_current_status_cb_t;
/** Parameters of Health Fault Status */
typedef struct {
uint8_t test_id; /*!< ID of a most recently performed test */
uint16_t company_id; /*!< Bluetooth assigned 16-bit Company ID */
struct net_buf_simple *fault_array; /*!< FaultArray field contains a sequence of 1-octet fault values */
} esp_ble_mesh_health_fault_status_cb_t;
/** Parameter of Health Period Status */
typedef struct {
uint8_t fast_period_divisor; /*!< Divider for the Publish Period */
} esp_ble_mesh_health_period_status_cb_t;
/** Parameter of Health Attention Status */
typedef struct {
uint8_t attention; /*!< Value of the Attention Timer state */
} esp_ble_mesh_health_attention_status_cb_t;
/**
* @brief Health Client Model received message union
*/
typedef union {
esp_ble_mesh_health_current_status_cb_t current_status; /*!< The health current status value */
esp_ble_mesh_health_fault_status_cb_t fault_status; /*!< The health fault status value */
@ -161,12 +170,14 @@ typedef union {
esp_ble_mesh_health_attention_status_cb_t attention_status; /*!< The health attention status value */
} esp_ble_mesh_health_client_common_cb_param_t;
/** Health Client Model callback parameters */
typedef struct {
int error_code; /*!< Appropriate error code */
esp_ble_mesh_client_common_param_t *params; /*!< The client common parameters. */
esp_ble_mesh_health_client_common_cb_param_t status_cb; /*!< The health message status callback values */
} esp_ble_mesh_health_client_cb_param_t;
/** This enum value is the event of Health Client Model */
typedef enum {
ESP_BLE_MESH_HEALTH_CLIENT_GET_STATE_EVT,
ESP_BLE_MESH_HEALTH_CLIENT_SET_STATE_EVT,
@ -175,10 +186,12 @@ typedef enum {
ESP_BLE_MESH_HEALTH_CLIENT_EVT_MAX,
} esp_ble_mesh_health_client_cb_event_t;
/** Health Server Model callback parameter */
typedef struct {
int error_code; /*!< Appropriate error code */
} esp_ble_mesh_health_server_cb_param_t;
/** This enum value is the event of Health Server Model */
typedef enum {
ESP_BLE_MESH_HEALTH_SERVER_FAULT_UPDATE_COMPLETE_EVT,
ESP_BLE_MESH_HEALTH_SERVER_EVT_MAX,
@ -188,11 +201,19 @@ typedef enum {
* @brief Bluetooth Mesh Health Client and Server Model function.
*/
/** @brief: event, event code of Health Client Model event; param, parameters of Health Client Model event) */
/**
* @brief Health Client Model callback function type
* @param event: Event type
* @param param: Pointer to callback parameter
*/
typedef void (* esp_ble_mesh_health_client_cb_t)(esp_ble_mesh_health_client_cb_event_t event,
esp_ble_mesh_health_client_cb_param_t *param);
/** @brief: event, event code of Health Server Model event; param, parameters of Health Server Model event) */
/**
* @brief Health Server Model callback function type
* @param event: Event type
* @param param: Pointer to callback parameter
*/
typedef void (* esp_ble_mesh_health_server_cb_t)(esp_ble_mesh_health_server_cb_event_t event,
esp_ble_mesh_health_server_cb_param_t *param);
@ -220,7 +241,7 @@ esp_err_t esp_ble_mesh_register_health_server_callback(esp_ble_mesh_health_serve
* @brief This function is called to get the Health Server states using the Health Client Model get messages.
*
* @note If you want to find the opcodes and corresponding meanings accepted by this API,
* please refer to (@ref esp_ble_mesh_opcode_health_client_get_t).
* please refer to esp_ble_mesh_opcode_health_client_get_t in esp_ble_mesh_defs.h
*
* @param[in] params: Pointer to BLE Mesh common client parameters.
* @param[in] get_state: Pointer to a union, each kind of opcode corresponds to one structure inside.
@ -236,7 +257,7 @@ esp_err_t esp_ble_mesh_health_client_get_state(esp_ble_mesh_client_common_param_
* @brief This function is called to set the Health Server states using the Health Client Model set messages.
*
* @note If you want to find the opcodes and corresponding meanings accepted by this API,
* please refer to (@ref esp_ble_mesh_opcode_health_client_set_t).
* please refer to esp_ble_mesh_opcode_health_client_set_t in esp_ble_mesh_defs.h
*
* @param[in] params: Pointer to BLE Mesh common client parameters.
* @param[in] set_state: Pointer to a union, each kind of opcode corresponds to one structure inside.

View file

@ -1,4 +1,4 @@
// Copyright 2017-2018 Espressif Systems (Shanghai) PTE LTD
// Copyright 2017-2019 Espressif Systems (Shanghai) PTE LTD
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@ -106,152 +106,179 @@
* @brief Bluetooth Mesh Light Lightness Client Model Get and Set parameters structure.
*/
/** Parameters of Light Lightness Set */
typedef struct {
bool op_en; /* Indicate if optional parameters are included */
u16_t lightness; /* Target value of light lightness actual state */
u8_t tid; /* Transaction ID */
u8_t trans_time; /* Time to complete state transition (optional) */
u8_t delay; /* Indicate message execution delay (C.1) */
bool op_en; /*!< Indicate if optional parameters are included */
u16_t lightness; /*!< Target value of light lightness actual state */
u8_t tid; /*!< Transaction ID */
u8_t trans_time; /*!< Time to complete state transition (optional) */
u8_t delay; /*!< Indicate message execution delay (C.1) */
} esp_ble_mesh_light_lightness_set_t;
/** Parameters of Light Lightness Linear Set */
typedef struct {
bool op_en; /* Indicate if optional parameters are included */
u16_t lightness; /* Target value of light lightness linear state */
u8_t tid; /* Transaction ID */
u8_t trans_time; /* Time to complete state transition (optional) */
u8_t delay; /* Indicate message execution delay (C.1) */
bool op_en; /*!< Indicate if optional parameters are included */
u16_t lightness; /*!< Target value of light lightness linear state */
u8_t tid; /*!< Transaction ID */
u8_t trans_time; /*!< Time to complete state transition (optional) */
u8_t delay; /*!< Indicate message execution delay (C.1) */
} esp_ble_mesh_light_lightness_linear_set_t;
/** Parameter of Light Lightness Default Set */
typedef struct {
u16_t lightness; /* The value of the Light Lightness Default state */
u16_t lightness; /*!< The value of the Light Lightness Default state */
} esp_ble_mesh_light_lightness_default_set_t;
/** Parameters of Light Lightness Range Set */
typedef struct {
u16_t range_min; /* Value of range min field of light lightness range state */
u16_t range_max; /* Value of range max field of light lightness range state */
u16_t range_min; /*!< Value of range min field of light lightness range state */
u16_t range_max; /*!< Value of range max field of light lightness range state */
} esp_ble_mesh_light_lightness_range_set_t;
/** Parameters of Light CTL Set */
typedef struct {
bool op_en; /* Indicate if optional parameters are included */
u16_t ctl_lightness; /* Target value of light ctl lightness state */
u16_t ctl_temperatrue; /* Target value of light ctl temperature state */
s16_t ctl_delta_uv; /* Target value of light ctl delta UV state */
u8_t tid; /* Transaction ID */
u8_t trans_time; /* Time to complete state transition (optional) */
u8_t delay; /* Indicate message execution delay (C.1) */
bool op_en; /*!< Indicate if optional parameters are included */
u16_t ctl_lightness; /*!< Target value of light ctl lightness state */
u16_t ctl_temperatrue; /*!< Target value of light ctl temperature state */
s16_t ctl_delta_uv; /*!< Target value of light ctl delta UV state */
u8_t tid; /*!< Transaction ID */
u8_t trans_time; /*!< Time to complete state transition (optional) */
u8_t delay; /*!< Indicate message execution delay (C.1) */
} esp_ble_mesh_light_ctl_set_t;
/** Parameters of Light CTL Temperature Set */
typedef struct {
bool op_en; /* Indicate if optional parameters are included */
u16_t ctl_temperatrue; /* Target value of light ctl temperature state */
s16_t ctl_delta_uv; /* Target value of light ctl delta UV state */
u8_t tid; /* Transaction ID */
u8_t trans_time; /* Time to complete state transition (optional) */
u8_t delay; /* Indicate message execution delay (C.1) */
bool op_en; /*!< Indicate if optional parameters are included */
u16_t ctl_temperatrue; /*!< Target value of light ctl temperature state */
s16_t ctl_delta_uv; /*!< Target value of light ctl delta UV state */
u8_t tid; /*!< Transaction ID */
u8_t trans_time; /*!< Time to complete state transition (optional) */
u8_t delay; /*!< Indicate message execution delay (C.1) */
} esp_ble_mesh_light_ctl_temperature_set_t;
/** Parameters of Light CTL Temperature Range Set */
typedef struct {
u16_t range_min; /* Value of temperature range min field of light ctl temperature range state */
u16_t range_max; /* Value of temperature range max field of light ctl temperature range state */
u16_t range_min; /*!< Value of temperature range min field of light ctl temperature range state */
u16_t range_max; /*!< Value of temperature range max field of light ctl temperature range state */
} esp_ble_mesh_light_ctl_temperature_range_set_t;
/** Parameters of Light CTL Default Set */
typedef struct {
u16_t lightness; /* Value of light lightness default state */
u16_t temperature; /* Value of light temperature default state */
s16_t delta_uv; /* Value of light delta UV default state */
u16_t lightness; /*!< Value of light lightness default state */
u16_t temperature; /*!< Value of light temperature default state */
s16_t delta_uv; /*!< Value of light delta UV default state */
} esp_ble_mesh_light_ctl_default_set_t;
/** Parameters of Light HSL Set */
typedef struct {
bool op_en; /* Indicate if optional parameters are included */
u16_t hsl_lightness; /* Target value of light hsl lightness state */
u16_t hsl_hue; /* Target value of light hsl hue state */
u16_t hsl_saturation; /* Target value of light hsl saturation state */
u8_t tid; /* Transaction ID */
u8_t trans_time; /* Time to complete state transition (optional) */
u8_t delay; /* Indicate message execution delay (C.1) */
bool op_en; /*!< Indicate if optional parameters are included */
u16_t hsl_lightness; /*!< Target value of light hsl lightness state */
u16_t hsl_hue; /*!< Target value of light hsl hue state */
u16_t hsl_saturation; /*!< Target value of light hsl saturation state */
u8_t tid; /*!< Transaction ID */
u8_t trans_time; /*!< Time to complete state transition (optional) */
u8_t delay; /*!< Indicate message execution delay (C.1) */
} esp_ble_mesh_light_hsl_set_t;
/** Parameters of Light HSL Hue Set */
typedef struct {
bool op_en; /* Indicate if optional parameters are included */
u16_t hue; /* Target value of light hsl hue state */
u8_t tid; /* Transaction ID */
u8_t trans_time; /* Time to complete state transition (optional) */
u8_t delay; /* Indicate message execution delay (C.1) */
bool op_en; /*!< Indicate if optional parameters are included */
u16_t hue; /*!< Target value of light hsl hue state */
u8_t tid; /*!< Transaction ID */
u8_t trans_time; /*!< Time to complete state transition (optional) */
u8_t delay; /*!< Indicate message execution delay (C.1) */
} esp_ble_mesh_light_hsl_hue_set_t;
/** Parameters of Light HSL Saturation Set */
typedef struct {
bool op_en; /* Indicate if optional parameters are included */
u16_t saturation; /* Target value of light hsl hue state */
u8_t tid; /* Transaction ID */
u8_t trans_time; /* Time to complete state transition (optional) */
u8_t delay; /* Indicate message execution delay (C.1) */
bool op_en; /*!< Indicate if optional parameters are included */
u16_t saturation; /*!< Target value of light hsl hue state */
u8_t tid; /*!< Transaction ID */
u8_t trans_time; /*!< Time to complete state transition (optional) */
u8_t delay; /*!< Indicate message execution delay (C.1) */
} esp_ble_mesh_light_hsl_saturation_set_t;
/** Parameters of Light HSL Default Set */
typedef struct {
u16_t lightness; /* Value of light lightness default state */
u16_t hue; /* Value of light hue default state */
u16_t saturation; /* Value of light saturation default state */
u16_t lightness; /*!< Value of light lightness default state */
u16_t hue; /*!< Value of light hue default state */
u16_t saturation; /*!< Value of light saturation default state */
} esp_ble_mesh_light_hsl_default_set_t;
typedef struct {
u16_t hue_range_min; /* Value of hue range min field of light hsl hue range state */
u16_t hue_range_max; /* Value of hue range max field of light hsl hue range state */
u16_t saturation_range_min; /* Value of saturation range min field of light hsl saturation range state */
u16_t saturation_range_max; /* Value of saturation range max field of light hsl saturation range state */
/** Parameters of Light HSL Range Set */
typedef struct {
u16_t hue_range_min; /*!< Value of hue range min field of light hsl hue range state */
u16_t hue_range_max; /*!< Value of hue range max field of light hsl hue range state */
u16_t saturation_range_min; /*!< Value of saturation range min field of light hsl saturation range state */
u16_t saturation_range_max; /*!< Value of saturation range max field of light hsl saturation range state */
} esp_ble_mesh_light_hsl_range_set_t;
typedef struct {
bool op_en; /* Indicate whether optional parameters included */
u16_t xyl_lightness; /* The target value of the Light xyL Lightness state */
u16_t xyl_x; /* The target value of the Light xyL x state */
u16_t xyl_y; /* The target value of the Light xyL y state */
u8_t tid; /* Transaction Identifier */
u8_t trans_time; /* Time to complete state transition (optional) */
u8_t delay; /* Indicate message execution delay (C.1) */
/** Parameters of Light xyL Set */
typedef struct {
bool op_en; /*!< Indicate whether optional parameters included */
u16_t xyl_lightness; /*!< The target value of the Light xyL Lightness state */
u16_t xyl_x; /*!< The target value of the Light xyL x state */
u16_t xyl_y; /*!< The target value of the Light xyL y state */
u8_t tid; /*!< Transaction Identifier */
u8_t trans_time; /*!< Time to complete state transition (optional) */
u8_t delay; /*!< Indicate message execution delay (C.1) */
} esp_ble_mesh_light_xyl_set_t;
typedef struct {
u16_t lightness; /* The value of the Light Lightness Default state */
u16_t xyl_x; /* The value of the Light xyL x Default state */
u16_t xyl_y; /* The value of the Light xyL y Default state */
/** Parameters of Light xyL Default Set */
typedef struct {
u16_t lightness; /*!< The value of the Light Lightness Default state */
u16_t xyl_x; /*!< The value of the Light xyL x Default state */
u16_t xyl_y; /*!< The value of the Light xyL y Default state */
} esp_ble_mesh_light_xyl_default_set_t;
typedef struct {
u16_t xyl_x_range_min; /* The value of the xyL x Range Min field of the Light xyL x Range state */
u16_t xyl_x_range_max; /* The value of the xyL x Range Max field of the Light xyL x Range state */
u16_t xyl_y_range_min; /* The value of the xyL y Range Min field of the Light xyL y Range state */
u16_t xyl_y_range_max; /* The value of the xyL y Range Max field of the Light xyL y Range state */
/** Parameters of Light xyL Range Set */
typedef struct {
u16_t xyl_x_range_min; /*!< The value of the xyL x Range Min field of the Light xyL x Range state */
u16_t xyl_x_range_max; /*!< The value of the xyL x Range Max field of the Light xyL x Range state */
u16_t xyl_y_range_min; /*!< The value of the xyL y Range Min field of the Light xyL y Range state */
u16_t xyl_y_range_max; /*!< The value of the xyL y Range Max field of the Light xyL y Range state */
} esp_ble_mesh_light_xyl_range_set_t;
typedef struct {
u8_t mode; /* The target value of the Light LC Mode state */
/** Parameter of Light LC Mode Set */
typedef struct {
u8_t mode; /*!< The target value of the Light LC Mode state */
} esp_ble_mesh_light_lc_mode_set_t;
typedef struct {
u8_t mode; /* The target value of the Light LC Occupancy Mode state */
/** Parameter of Light LC OM Set */
typedef struct {
u8_t mode; /*!< The target value of the Light LC Occupancy Mode state */
} esp_ble_mesh_light_lc_om_set_t;
typedef struct {
bool op_en; /* Indicate whether optional parameters included */
u8_t light_onoff; /* The target value of the Light LC Light OnOff state */
u8_t tid; /* Transaction Identifier */
u8_t trans_time; /* Time to complete state transition (optional) */
u8_t delay; /* Indicate message execution delay (C.1) */
/** Parameters of Light LC Light OnOff Set */
typedef struct {
bool op_en; /*!< Indicate whether optional parameters included */
u8_t light_onoff; /*!< The target value of the Light LC Light OnOff state */
u8_t tid; /*!< Transaction Identifier */
u8_t trans_time; /*!< Time to complete state transition (optional) */
u8_t delay; /*!< Indicate message execution delay (C.1) */
} esp_ble_mesh_light_lc_light_onoff_set_t;
typedef struct {
u16_t property_id; /* Property ID identifying a Light LC Property */
/** Parameter of Light LC Property Get */
typedef struct {
u16_t property_id; /*!< Property ID identifying a Light LC Property */
} esp_ble_mesh_light_lc_property_get_t;
typedef struct {
u16_t property_id; /* Property ID identifying a Light LC Property */
struct net_buf_simple *property_value; /* Raw value for the Light LC Property */
/** Parameters of Light LC Property Set */
typedef struct {
u16_t property_id; /*!< Property ID identifying a Light LC Property */
struct net_buf_simple *property_value; /*!< Raw value for the Light LC Property */
} esp_ble_mesh_light_lc_property_set_t;
/**
* @brief Lighting Client Model get message union
*/
typedef union {
esp_ble_mesh_light_lc_property_get_t lc_property_get; /*!< For ESP_BLE_MESH_MODEL_OP_LIGHT_LC_PROPERTY_GET */
} esp_ble_mesh_light_client_get_state_t;
/**
* @brief Lighting Client Model set message union
*/
typedef union {
esp_ble_mesh_light_lightness_set_t lightness_set; /*!< For ESP_BLE_MESH_MODEL_OP_LIGHT_LIGHTNESS_SET & ESP_BLE_MESH_MODEL_OP_LIGHT_LIGHTNESS_SET_UNACK */
esp_ble_mesh_light_lightness_linear_set_t lightness_linear_set; /*!< For ESP_BLE_MESH_MODEL_OP_LIGHT_LIGHTNESS_LINEAR_SET & ESP_BLE_MESH_MODEL_OP_LIGHT_LIGHTNESS_LINEAR_SET_UNACK */
@ -279,158 +306,184 @@ typedef union {
* @brief Bluetooth Mesh Light Lightness Client Model Get and Set callback parameters structure.
*/
/** Parameters of Light Lightness Status */
typedef struct {
bool op_en; /* Indicate if optional parameters are included */
u16_t present_lightness; /* Current value of light lightness actual state */
u16_t target_lightness; /* Target value of light lightness actual state (optional) */
u8_t remain_time; /* Time to complete state transition (C.1) */
bool op_en; /*!< Indicate if optional parameters are included */
u16_t present_lightness; /*!< Current value of light lightness actual state */
u16_t target_lightness; /*!< Target value of light lightness actual state (optional) */
u8_t remain_time; /*!< Time to complete state transition (C.1) */
} esp_ble_mesh_light_lightness_status_cb_t;
/** Parameters of Light Lightness Linear Status */
typedef struct {
bool op_en; /* Indicate if optional parameters are included */
u16_t present_lightness; /* Current value of light lightness linear state */
u16_t target_lightness; /* Target value of light lightness linear state (optional) */
u8_t remain_time; /* Time to complete state transition (C.1) */
bool op_en; /*!< Indicate if optional parameters are included */
u16_t present_lightness; /*!< Current value of light lightness linear state */
u16_t target_lightness; /*!< Target value of light lightness linear state (optional) */
u8_t remain_time; /*!< Time to complete state transition (C.1) */
} esp_ble_mesh_light_lightness_linear_status_cb_t;
/** Parameter of Light Lightness Last Status */
typedef struct {
u16_t lightness; /* The value of the Light Lightness Last state */
u16_t lightness; /*!< The value of the Light Lightness Last state */
} esp_ble_mesh_light_lightness_last_status_cb_t;
/** Parameter of Light Lightness Default Status */
typedef struct {
u16_t lightness; /* The value of the Light Lightness default State */
u16_t lightness; /*!< The value of the Light Lightness default State */
} esp_ble_mesh_light_lightness_default_status_cb_t;
/** Parameters of Light Lightness Range Status */
typedef struct {
u8_t status_code; /* Status Code for the request message */
u16_t range_min; /* Value of range min field of light lightness range state */
u16_t range_max; /* Value of range max field of light lightness range state */
u8_t status_code; /*!< Status Code for the request message */
u16_t range_min; /*!< Value of range min field of light lightness range state */
u16_t range_max; /*!< Value of range max field of light lightness range state */
} esp_ble_mesh_light_lightness_range_status_cb_t;
/** Parameters of Light CTL Status */
typedef struct {
bool op_en; /* Indicate if optional parameters are included */
u16_t present_ctl_lightness; /* Current value of light ctl lightness state */
u16_t present_ctl_temperature; /* Current value of light ctl temperature state */
u16_t target_ctl_lightness; /* Target value of light ctl lightness state (optional) */
u16_t target_ctl_temperature; /* Target value of light ctl temperature state (C.1) */
u8_t remain_time; /* Time to complete state transition (C.1) */
bool op_en; /*!< Indicate if optional parameters are included */
u16_t present_ctl_lightness; /*!< Current value of light ctl lightness state */
u16_t present_ctl_temperature; /*!< Current value of light ctl temperature state */
u16_t target_ctl_lightness; /*!< Target value of light ctl lightness state (optional) */
u16_t target_ctl_temperature; /*!< Target value of light ctl temperature state (C.1) */
u8_t remain_time; /*!< Time to complete state transition (C.1) */
} esp_ble_mesh_light_ctl_status_cb_t;
/** Parameters of Light CTL Temperature Status */
typedef struct {
bool op_en; /* Indicate if optional parameters are included */
u16_t present_ctl_temperature; /* Current value of light ctl temperature state */
u16_t present_ctl_delta_uv; /* Current value of light ctl delta UV state */
u16_t target_ctl_temperature; /* Target value of light ctl temperature state (optional) */
u16_t target_ctl_delta_uv; /* Target value of light ctl delta UV state (C.1) */
u8_t remain_time; /* Time to complete state transition (C.1) */
bool op_en; /*!< Indicate if optional parameters are included */
u16_t present_ctl_temperature; /*!< Current value of light ctl temperature state */
u16_t present_ctl_delta_uv; /*!< Current value of light ctl delta UV state */
u16_t target_ctl_temperature; /*!< Target value of light ctl temperature state (optional) */
u16_t target_ctl_delta_uv; /*!< Target value of light ctl delta UV state (C.1) */
u8_t remain_time; /*!< Time to complete state transition (C.1) */
} esp_ble_mesh_light_ctl_temperature_status_cb_t;
/** Parameters of Light CTL Temperature Range Status */
typedef struct {
u8_t status_code; /* Status code for the request message */
u16_t range_min; /* Value of temperature range min field of light ctl temperature range state */
u16_t range_max; /* Value of temperature range max field of light ctl temperature range state */
u8_t status_code; /*!< Status code for the request message */
u16_t range_min; /*!< Value of temperature range min field of light ctl temperature range state */
u16_t range_max; /*!< Value of temperature range max field of light ctl temperature range state */
} esp_ble_mesh_light_ctl_temperature_range_status_cb_t;
/** Parameters of Light CTL Default Status */
typedef struct {
u16_t lightness; /* Value of light lightness default state */
u16_t temperature; /* Value of light temperature default state */
s16_t delta_uv; /* Value of light delta UV default state */
u16_t lightness; /*!< Value of light lightness default state */
u16_t temperature; /*!< Value of light temperature default state */
s16_t delta_uv; /*!< Value of light delta UV default state */
} esp_ble_mesh_light_ctl_default_status_cb_t;
/** Parameters of Light HSL Status */
typedef struct {
bool op_en; /* Indicate if optional parameters are included */
u16_t hsl_lightness; /* Current value of light hsl lightness state */
u16_t hsl_hue; /* Current value of light hsl hue state */
u16_t hsl_saturation; /* Current value of light hsl saturation state */
u8_t remain_time; /* Time to complete state transition (optional) */
bool op_en; /*!< Indicate if optional parameters are included */
u16_t hsl_lightness; /*!< Current value of light hsl lightness state */
u16_t hsl_hue; /*!< Current value of light hsl hue state */
u16_t hsl_saturation; /*!< Current value of light hsl saturation state */
u8_t remain_time; /*!< Time to complete state transition (optional) */
} esp_ble_mesh_light_hsl_status_cb_t;
/** Parameters of Light HSL Target Status */
typedef struct {
bool op_en; /* Indicate if optional parameters are included */
u16_t hsl_lightness_target; /* Target value of light hsl lightness state */
u16_t hsl_hue_target; /* Target value of light hsl hue state */
u16_t hsl_saturation_target; /* Target value of light hsl saturation state */
u8_t remain_time; /* Time to complete state transition (optional) */
bool op_en; /*!< Indicate if optional parameters are included */
u16_t hsl_lightness_target; /*!< Target value of light hsl lightness state */
u16_t hsl_hue_target; /*!< Target value of light hsl hue state */
u16_t hsl_saturation_target; /*!< Target value of light hsl saturation state */
u8_t remain_time; /*!< Time to complete state transition (optional) */
} esp_ble_mesh_light_hsl_target_status_cb_t;
/** Parameters of Light HSL Hue Status */
typedef struct {
bool op_en; /* Indicate if optional parameters are included */
u16_t present_hue; /* Current value of light hsl hue state */
u16_t target_hue; /* Target value of light hsl hue state (optional) */
u8_t remain_time; /* Time to complete state transition (C.1) */
bool op_en; /*!< Indicate if optional parameters are included */
u16_t present_hue; /*!< Current value of light hsl hue state */
u16_t target_hue; /*!< Target value of light hsl hue state (optional) */
u8_t remain_time; /*!< Time to complete state transition (C.1) */
} esp_ble_mesh_light_hsl_hue_status_cb_t;
/** Parameters of Light HSL Saturation Status */
typedef struct {
bool op_en; /* Indicate if optional parameters are included */
u16_t present_saturation; /* Current value of light hsl saturation state */
u16_t target_saturation; /* Target value of light hsl saturation state (optional) */
u8_t remain_time; /* Time to complete state transition (C.1) */
bool op_en; /*!< Indicate if optional parameters are included */
u16_t present_saturation; /*!< Current value of light hsl saturation state */
u16_t target_saturation; /*!< Target value of light hsl saturation state (optional) */
u8_t remain_time; /*!< Time to complete state transition (C.1) */
} esp_ble_mesh_light_hsl_saturation_status_cb_t;
/** Parameters of Light HSL Default Status */
typedef struct {
u16_t lightness; /* Value of light lightness default state */
u16_t hue; /* Value of light hue default state */
u16_t saturation; /* Value of light saturation default state */
u16_t lightness; /*!< Value of light lightness default state */
u16_t hue; /*!< Value of light hue default state */
u16_t saturation; /*!< Value of light saturation default state */
} esp_ble_mesh_light_hsl_default_status_cb_t;
/** Parameters of Light HSL Range Status */
typedef struct {
u8_t status_code; /* Status code for the request message */
u16_t hue_range_min; /* Value of hue range min field of light hsl hue range state */
u16_t hue_range_max; /* Value of hue range max field of light hsl hue range state */
u16_t saturation_range_min; /* Value of saturation range min field of light hsl saturation range state */
u16_t saturation_range_max; /* Value of saturation range max field of light hsl saturation range state */
u8_t status_code; /*!< Status code for the request message */
u16_t hue_range_min; /*!< Value of hue range min field of light hsl hue range state */
u16_t hue_range_max; /*!< Value of hue range max field of light hsl hue range state */
u16_t saturation_range_min; /*!< Value of saturation range min field of light hsl saturation range state */
u16_t saturation_range_max; /*!< Value of saturation range max field of light hsl saturation range state */
} esp_ble_mesh_light_hsl_range_status_cb_t;
/** Parameters of Light xyL Status */
typedef struct {
bool op_en; /* Indicate whether optional parameters included */
u16_t xyl_lightness; /* The present value of the Light xyL Lightness state */
u16_t xyl_x; /* The present value of the Light xyL x state */
u16_t xyl_y; /* The present value of the Light xyL y state */
u8_t remain_time; /* Time to complete state transition (optional) */
bool op_en; /*!< Indicate whether optional parameters included */
u16_t xyl_lightness; /*!< The present value of the Light xyL Lightness state */
u16_t xyl_x; /*!< The present value of the Light xyL x state */
u16_t xyl_y; /*!< The present value of the Light xyL y state */
u8_t remain_time; /*!< Time to complete state transition (optional) */
} esp_ble_mesh_light_xyl_status_cb_t;
/** Parameters of Light xyL Target Status */
typedef struct {
bool op_en; /* Indicate whether optional parameters included */
u16_t target_xyl_lightness; /* The target value of the Light xyL Lightness state */
u16_t target_xyl_x; /* The target value of the Light xyL x state */
u16_t target_xyl_y; /* The target value of the Light xyL y state */
u8_t remain_time; /* Time to complete state transition (optional) */
bool op_en; /*!< Indicate whether optional parameters included */
u16_t target_xyl_lightness; /*!< The target value of the Light xyL Lightness state */
u16_t target_xyl_x; /*!< The target value of the Light xyL x state */
u16_t target_xyl_y; /*!< The target value of the Light xyL y state */
u8_t remain_time; /*!< Time to complete state transition (optional) */
} esp_ble_mesh_light_xyl_target_status_cb_t;
/** Parameters of Light xyL Default Status */
typedef struct {
u16_t lightness; /* The value of the Light Lightness Default state */
u16_t xyl_x; /* The value of the Light xyL x Default state */
u16_t xyl_y; /* The value of the Light xyL y Default state */
u16_t lightness; /*!< The value of the Light Lightness Default state */
u16_t xyl_x; /*!< The value of the Light xyL x Default state */
u16_t xyl_y; /*!< The value of the Light xyL y Default state */
} esp_ble_mesh_light_xyl_default_status_cb_t;
/** Parameters of Light xyL Range Status */
typedef struct {
u8_t status_code; /* Status Code for the requesting message */
u16_t xyl_x_range_min; /* The value of the xyL x Range Min field of the Light xyL x Range state */
u16_t xyl_x_range_max; /* The value of the xyL x Range Max field of the Light xyL x Range state */
u16_t xyl_y_range_min; /* The value of the xyL y Range Min field of the Light xyL y Range state */
u16_t xyl_y_range_max; /* The value of the xyL y Range Max field of the Light xyL y Range state */
u8_t status_code; /*!< Status Code for the requesting message */
u16_t xyl_x_range_min; /*!< The value of the xyL x Range Min field of the Light xyL x Range state */
u16_t xyl_x_range_max; /*!< The value of the xyL x Range Max field of the Light xyL x Range state */
u16_t xyl_y_range_min; /*!< The value of the xyL y Range Min field of the Light xyL y Range state */
u16_t xyl_y_range_max; /*!< The value of the xyL y Range Max field of the Light xyL y Range state */
} esp_ble_mesh_light_xyl_range_status_cb_t;
/** Parameter of Light LC Mode Status */
typedef struct {
u8_t mode; /* The present value of the Light LC Mode state */
u8_t mode; /*!< The present value of the Light LC Mode state */
} esp_ble_mesh_light_lc_mode_status_cb_t;
/** Parameter of Light LC OM Status */
typedef struct {
u8_t mode; /* The present value of the Light LC Occupancy Mode state */
u8_t mode; /*!< The present value of the Light LC Occupancy Mode state */
} esp_ble_mesh_light_lc_om_status_cb_t;
/** Parameters of Light LC Light OnOff Status */
typedef struct {
bool op_en; /* Indicate whether optional parameters included */
u8_t present_light_onoff; /* The present value of the Light LC Light OnOff state */
u8_t target_light_onoff; /* The target value of the Light LC Light OnOff state (Optional) */
u8_t remain_time; /* Time to complete state transition (C.1) */
bool op_en; /*!< Indicate whether optional parameters included */
u8_t present_light_onoff; /*!< The present value of the Light LC Light OnOff state */
u8_t target_light_onoff; /*!< The target value of the Light LC Light OnOff state (Optional) */
u8_t remain_time; /*!< Time to complete state transition (C.1) */
} esp_ble_mesh_light_lc_light_onoff_status_cb_t;
/** Parameters of Light LC Property Status */
typedef struct {
u16_t property_id; /* Property ID identifying a Light LC Property */
struct net_buf_simple *property_value; /* Raw value for the Light LC Property */
u16_t property_id; /*!< Property ID identifying a Light LC Property */
struct net_buf_simple *property_value; /*!< Raw value for the Light LC Property */
} esp_ble_mesh_light_lc_property_status_cb_t;
/**
* @brief Lighting Client Model received message union
*/
typedef union {
esp_ble_mesh_light_lightness_status_cb_t lightness_status; /*!< For ESP_BLE_MESH_MODEL_OP_LIGHT_LIGHTNESS_STATUS */
esp_ble_mesh_light_lightness_linear_status_cb_t lightness_linear_status; /*!< For ESP_BLE_MESH_MODEL_OP_LIGHT_LIGHTNESS_LINEAR_STATUS */
@ -457,12 +510,14 @@ typedef union {
esp_ble_mesh_light_lc_property_status_cb_t lc_property_status; /*!< For ESP_BLE_MESH_MODEL_OP_LIGHT_LC_PROPERTY_STATUS */
} esp_ble_mesh_light_client_status_cb_t;
/** Lighting Client Model callback parameters */
typedef struct {
int error_code; /*!< Appropriate error code */
esp_ble_mesh_client_common_param_t *params; /*!< The client common parameters. */
esp_ble_mesh_light_client_status_cb_t status_cb; /*!< The light status message callback values */
} esp_ble_mesh_light_client_cb_param_t;
/** This enum value is the event of Lighting Client Model */
typedef enum {
ESP_BLE_MESH_LIGHT_CLIENT_GET_STATE_EVT,
ESP_BLE_MESH_LIGHT_CLIENT_SET_STATE_EVT,
@ -475,7 +530,11 @@ typedef enum {
* @brief Bluetooth Mesh Light Client Model function.
*/
/** @brief: event, event code of Light Client Model events; param, parameters of Light Client Model events */
/**
* @brief Lighting Client Model callback function type
* @param event: Event type
* @param param: Pointer to callback parameter
*/
typedef void (* esp_ble_mesh_light_client_cb_t)(esp_ble_mesh_light_client_cb_event_t event,
esp_ble_mesh_light_client_cb_param_t *param);
@ -493,7 +552,7 @@ esp_err_t esp_ble_mesh_register_light_client_callback(esp_ble_mesh_light_client_
* @brief Get the value of Light Server Model states using the Light Client Model get messages.
*
* @note If you want to know the opcodes and corresponding meanings accepted by this API,
* please refer to (@ref esp_ble_mesh_light_message_opcode_t).
* please refer to esp_ble_mesh_light_message_opcode_t in esp_ble_mesh_defs.h
*
* @param[in] params: Pointer to BLE Mesh common client parameters.
* @param[in] get_state: Pointer of light get message value.
@ -509,7 +568,7 @@ esp_err_t esp_ble_mesh_light_client_get_state(esp_ble_mesh_client_common_param_t
* @brief Set the value of Light Server Model states using the Light Client Model set messages.
*
* @note If you want to know the opcodes and corresponding meanings accepted by this API,
* please refer to (@ref esp_ble_mesh_light_message_opcode_t).
* please refer to esp_ble_mesh_light_message_opcode_t in esp_ble_mesh_defs.h
*
* @param[in] params: Pointer to BLE Mesh common client parameters.
* @param[in] set_state: Pointer of generic set message value.

View file

@ -1,4 +1,4 @@
// Copyright 2017-2018 Espressif Systems (Shanghai) PTE LTD
// Copyright 2017-2019 Espressif Systems (Shanghai) PTE LTD
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@ -41,58 +41,71 @@
/**
* @brief Bluetooth Mesh Sensor Client Model Get and Set parameters structure.
*/
/** Parameters of Sensor Descriptor Get */
typedef struct {
bool op_en; /* Indicate if optional parameters are included */
u16_t property_id; /* Property ID of a sensor (optional) */
bool op_en; /*!< Indicate if optional parameters are included */
u16_t property_id; /*!< Property ID of a sensor (optional) */
} esp_ble_mesh_sensor_descriptor_get_t;
/** Parameter of Sensor Cadence Get */
typedef struct {
u16_t property_id; /* Property ID of a sensor */
u16_t property_id; /*!< Property ID of a sensor */
} esp_ble_mesh_sensor_cadence_get_t;
/** Parameters of Sensor Cadence Set */
typedef struct {
u16_t property_id; /* Property ID for the sensor */
u8_t fast_cadence_period_divisor : 7, /* Divisor for the publish period */
status_trigger_type : 1; /* The unit and format of the Status Trigger Delta fields */
struct net_buf_simple *status_trigger_delta_down; /* Delta down value that triggers a status message */
struct net_buf_simple *status_trigger_delta_up; /* Delta up value that triggers a status message */
u8_t status_min_interval; /* Minimum interval between two consecutive Status messages */
struct net_buf_simple *fast_cadence_low; /* Low value for the fast cadence range */
struct net_buf_simple *fast_cadence_high; /* Fast value for the fast cadence range */
u16_t property_id; /*!< Property ID for the sensor */
u8_t fast_cadence_period_divisor : 7, /*!< Divisor for the publish period */
status_trigger_type : 1; /*!< The unit and format of the Status Trigger Delta fields */
struct net_buf_simple *status_trigger_delta_down; /*!< Delta down value that triggers a status message */
struct net_buf_simple *status_trigger_delta_up; /*!< Delta up value that triggers a status message */
u8_t status_min_interval; /*!< Minimum interval between two consecutive Status messages */
struct net_buf_simple *fast_cadence_low; /*!< Low value for the fast cadence range */
struct net_buf_simple *fast_cadence_high; /*!< Fast value for the fast cadence range */
} esp_ble_mesh_sensor_cadence_set_t;
/** Parameter of Sensor Settings Get */
typedef struct {
u16_t sensor_property_id; /* Property ID of a sensor */
u16_t sensor_property_id; /*!< Property ID of a sensor */
} esp_ble_mesh_sensor_settings_get_t;
/** Parameters of Sensor Setting Get */
typedef struct {
u16_t sensor_property_id; /* Property ID of a sensor */
u16_t sensor_setting_property_id; /* Setting ID identifying a setting within a sensor */
u16_t sensor_property_id; /*!< Property ID of a sensor */
u16_t sensor_setting_property_id; /*!< Setting ID identifying a setting within a sensor */
} esp_ble_mesh_sensor_setting_get_t;
/** Parameters of Sensor Setting Set */
typedef struct {
u16_t sensor_property_id; /* Property ID identifying a sensor */
u16_t sensor_setting_property_id; /* Setting ID identifying a setting within a sensor */
struct net_buf_simple *sensor_setting_raw; /* Raw value for the setting */
u16_t sensor_property_id; /*!< Property ID identifying a sensor */
u16_t sensor_setting_property_id; /*!< Setting ID identifying a setting within a sensor */
struct net_buf_simple *sensor_setting_raw; /*!< Raw value for the setting */
} esp_ble_mesh_sensor_setting_set_t;
/** Parameters of Sensor Get */
typedef struct {
bool op_en; /* Indicate if optional parameters are included */
u16_t property_id; /* Property ID for the sensor (optional) */
bool op_en; /*!< Indicate if optional parameters are included */
u16_t property_id; /*!< Property ID for the sensor (optional) */
} esp_ble_mesh_sensor_get_t;
/** Parameters of Sensor Column Get */
typedef struct {
u16_t property_id; /* Property identifying a sensor */
struct net_buf_simple *raw_value_x; /* Raw value identifying a column */
u16_t property_id; /*!< Property identifying a sensor */
struct net_buf_simple *raw_value_x; /*!< Raw value identifying a column */
} esp_ble_mesh_sensor_column_get_t;
/** Parameters of Sensor Series Get */
typedef struct {
bool op_en; /* Indicate if optional parameters are included */
u16_t property_id; /* Property identifying a sensor */
struct net_buf_simple *raw_value_x1; /* Raw value identifying a starting column (optional) */
struct net_buf_simple *raw_value_x2; /* Raw value identifying an ending column (C.1) */
bool op_en; /*!< Indicate if optional parameters are included */
u16_t property_id; /*!< Property identifying a sensor */
struct net_buf_simple *raw_value_x1; /*!< Raw value identifying a starting column (optional) */
struct net_buf_simple *raw_value_x2; /*!< Raw value identifying an ending column (C.1) */
} esp_ble_mesh_sensor_series_get_t;
/**
* @brief Sensor Client Model get message union
*/
typedef union {
esp_ble_mesh_sensor_descriptor_get_t descriptor_get; /*!< For ESP_BLE_MESH_MODEL_OP_SENSOR_DESCRIPTOR_GET */
esp_ble_mesh_sensor_cadence_get_t cadence_get; /*!< For ESP_BLE_MESH_MODEL_OP_SENSOR_CADENCE_GET */
@ -103,6 +116,9 @@ typedef union {
esp_ble_mesh_sensor_series_get_t series_get; /*!< For ESP_BLE_MESH_MODEL_OP_SENSOR_SERIES_GET */
} esp_ble_mesh_sensor_client_get_state_t;
/**
* @brief Sensor Client Model set message union
*/
typedef union {
esp_ble_mesh_sensor_cadence_set_t cadence_set; /*!< For ESP_BLE_MESH_MODEL_OP_SENSOR_CADENCE_SET & ESP_BLE_MESH_MODEL_OP_SENSOR_CADENCE_SET_UNACK */
esp_ble_mesh_sensor_setting_set_t setting_set; /*!< For ESP_BLE_MESH_MODEL_OP_SENSOR_SETTING_SET & ESP_BLE_MESH_MODEL_OP_SENSOR_SETTING_SET_UNACK */
@ -112,43 +128,52 @@ typedef union {
* @brief Bluetooth Mesh Sensor Client Model Get and Set callback parameters structure.
*/
/** Parameter of Sensor Descriptor Status */
typedef struct {
struct net_buf_simple *descriptor; /* Sequence of 8-octet sensor descriptors (optional) */
struct net_buf_simple *descriptor; /*!< Sequence of 8-octet sensor descriptors (optional) */
} esp_ble_mesh_sensor_descriptor_status_cb_t;
/** Parameters of Sensor Cadence Status */
typedef struct {
u16_t property_id; /* Property for the sensor */
struct net_buf_simple *sensor_cadence_value; /* Value of sensor cadence state */
u16_t property_id; /*!< Property for the sensor */
struct net_buf_simple *sensor_cadence_value; /*!< Value of sensor cadence state */
} esp_ble_mesh_sensor_cadence_status_cb_t;
/** Parameters of Sensor Settings Status */
typedef struct {
u16_t sensor_property_id; /* Property ID identifying a sensor */
struct net_buf_simple *sensor_setting_property_ids; /* A sequence of N sensor setting property IDs (optional) */
u16_t sensor_property_id; /*!< Property ID identifying a sensor */
struct net_buf_simple *sensor_setting_property_ids; /*!< A sequence of N sensor setting property IDs (optional) */
} esp_ble_mesh_sensor_settings_status_cb_t;
/** Parameters of Sensor Setting Status */
typedef struct {
bool op_en; /* Indicate id optional parameters are included */
u16_t sensor_property_id; /* Property ID identifying a sensor */
u16_t sensor_setting_property_id; /* Setting ID identifying a setting within a sensor */
u8_t sensor_setting_access; /* Read/Write access rights for the setting (optional) */
struct net_buf_simple *sensor_setting_raw; /* Raw value for the setting */
bool op_en; /*!< Indicate id optional parameters are included */
u16_t sensor_property_id; /*!< Property ID identifying a sensor */
u16_t sensor_setting_property_id; /*!< Setting ID identifying a setting within a sensor */
u8_t sensor_setting_access; /*!< Read/Write access rights for the setting (optional) */
struct net_buf_simple *sensor_setting_raw; /*!< Raw value for the setting */
} esp_ble_mesh_sensor_setting_status_cb_t;
/** Parameter of Sensor Status */
typedef struct {
struct net_buf_simple *marshalled_sensor_data; /* Value of sensor data state (optional) */
struct net_buf_simple *marshalled_sensor_data; /*!< Value of sensor data state (optional) */
} esp_ble_mesh_sensor_status_cb_t;
/** Parameters of Sensor Column Status */
typedef struct {
u16_t property_id; /* Property identifying a sensor and the Y axis */
struct net_buf_simple *sensor_column_value; /* Left values of sensor column status */
u16_t property_id; /*!< Property identifying a sensor and the Y axis */
struct net_buf_simple *sensor_column_value; /*!< Left values of sensor column status */
} esp_ble_mesh_sensor_column_status_cb_t;
/** Parameters of Sensor Series Status */
typedef struct {
u16_t property_id; /* Property identifying a sensor and the Y axis */
struct net_buf_simple *sensor_series_value; /* Left values of sensor series status */
u16_t property_id; /*!< Property identifying a sensor and the Y axis */
struct net_buf_simple *sensor_series_value; /*!< Left values of sensor series status */
} esp_ble_mesh_sensor_series_status_cb_t;
/**
* @brief Sensor Client Model received message union
*/
typedef union {
esp_ble_mesh_sensor_descriptor_status_cb_t descriptor_status; /*!< For ESP_BLE_MESH_MODEL_OP_SENSOR_DESCRIPTOR_STATUS */
esp_ble_mesh_sensor_cadence_status_cb_t cadence_status; /*!< For ESP_BLE_MESH_MODEL_OP_SENSOR_CADENCE_STATUS */
@ -159,6 +184,7 @@ typedef union {
esp_ble_mesh_sensor_series_status_cb_t series_status; /*!< For ESP_BLE_MESH_MODEL_OP_SENSOR_SERIES_STATUS */
} esp_ble_mesh_sensor_client_status_cb_t;
/** Sensor Client Model callback parameters */
typedef struct {
int error_code; /*!< 0: success,
* otherwise failure. For the error code values please refer to errno.h file.
@ -167,6 +193,7 @@ typedef struct {
esp_ble_mesh_sensor_client_status_cb_t status_cb; /*!< The sensor status message callback values */
} esp_ble_mesh_sensor_client_cb_param_t;
/** This enum value is the event of Sensor Client Model */
typedef enum {
ESP_BLE_MESH_SENSOR_CLIENT_GET_STATE_EVT,
ESP_BLE_MESH_SENSOR_CLIENT_SET_STATE_EVT,
@ -179,7 +206,11 @@ typedef enum {
* @brief Bluetooth Mesh Sensor Client Model function.
*/
/** @brief: event, event code of Sensor Client Model events; param, parameters of Sensor Client Model events */
/**
* @brief Sensor Client Model callback function type
* @param event: Event type
* @param param: Pointer to callback parameter
*/
typedef void (* esp_ble_mesh_sensor_client_cb_t)(esp_ble_mesh_sensor_client_cb_event_t event,
esp_ble_mesh_sensor_client_cb_param_t *param);
@ -197,7 +228,7 @@ esp_err_t esp_ble_mesh_register_sensor_client_callback(esp_ble_mesh_sensor_clien
* @brief Get the value of Sensor Server Model states using the Sensor Client Model get messages.
*
* @note If you want to know the opcodes and corresponding meanings accepted by this API,
* please refer to (@ref esp_ble_mesh_sensor_message_opcode_t).
* please refer to esp_ble_mesh_sensor_message_opcode_t in esp_ble_mesh_defs.h
*
* @param[in] params: Pointer to BLE Mesh common client parameters.
* @param[in] get_state: Pointer to sensor get message value.
@ -213,7 +244,7 @@ esp_err_t esp_ble_mesh_sensor_client_get_state(esp_ble_mesh_client_common_param_
* @brief Set the value of Sensor Server Model states using the Sensor Client Model set messages.
*
* @note If you want to know the opcodes and corresponding meanings accepted by this API,
* please refer to (@ref esp_ble_mesh_sensor_message_opcode_t).
* please refer to esp_ble_mesh_sensor_message_opcode_t in esp_ble_mesh_defs.h
*
* @param[in] params: Pointer to BLE Mesh common client parameters.
* @param[in] set_state: Pointer to sensor set message value.

View file

@ -1,4 +1,4 @@
// Copyright 2017-2018 Espressif Systems (Shanghai) PTE LTD
// Copyright 2017-2019 Espressif Systems (Shanghai) PTE LTD
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@ -74,73 +74,83 @@
* @brief Bluetooth Mesh Time Scene Client Model Get and Set parameters structure.
*/
/** Parameters of Time Set */
typedef struct {
u8_t tai_seconds[5]; /* The current TAI time in seconds */
u8_t sub_second; /* The sub-second time in units of 1/256 second */
u8_t uncertainty; /* The estimated uncertainty in 10-millisecond steps */
u16_t time_authority : 1; /* 0 = No Time Authority, 1 = Time Authority */
u16_t tai_utc_delta : 15; /* Current difference between TAI and UTC in seconds */
u8_t time_zone_offset; /* The local time zone offset in 15-minute increments */
u8_t tai_seconds[5]; /*!< The current TAI time in seconds */
u8_t sub_second; /*!< The sub-second time in units of 1/256 second */
u8_t uncertainty; /*!< The estimated uncertainty in 10-millisecond steps */
u16_t time_authority : 1; /*!< 0 = No Time Authority, 1 = Time Authority */
u16_t tai_utc_delta : 15; /*!< Current difference between TAI and UTC in seconds */
u8_t time_zone_offset; /*!< The local time zone offset in 15-minute increments */
} esp_ble_mesh_time_set_t;
/** Parameters of Time Zone Set */
typedef struct {
u8_t time_zone_offset_new; /* Upcoming local time zone offset */
u8_t tai_zone_change[5]; /* TAI Seconds time of the upcoming Time Zone Offset change */
u8_t time_zone_offset_new; /*!< Upcoming local time zone offset */
u8_t tai_zone_change[5]; /*!< TAI Seconds time of the upcoming Time Zone Offset change */
} esp_ble_mesh_time_zone_set_t;
/** Parameters of TAI-UTC Delta Set */
typedef struct {
u16_t tai_utc_delta_new : 15; /* Upcoming difference between TAI and UTC in seconds */
u16_t padding : 1; /* Always 0b0. Other values are Prohibited. */
u8_t tai_delta_change[5]; /* TAI Seconds time of the upcoming TAI-UTC Delta change */
u16_t tai_utc_delta_new : 15; /*!< Upcoming difference between TAI and UTC in seconds */
u16_t padding : 1; /*!< Always 0b0. Other values are Prohibited. */
u8_t tai_delta_change[5]; /*!< TAI Seconds time of the upcoming TAI-UTC Delta change */
} esp_ble_mesh_tai_utc_delta_set_t;
/** Parameter of Time Role Set */
typedef struct {
u8_t time_role; /* The Time Role for the element */
u8_t time_role; /*!< The Time Role for the element */
} esp_ble_mesh_time_role_set_t;
/** Parameter of Scene Store */
typedef struct {
u16_t scene_number; /* The number of scenes to be stored */
u16_t scene_number; /*!< The number of scenes to be stored */
} esp_ble_mesh_scene_store_t;
/** Parameters of Scene Recall */
typedef struct {
bool op_en; /* Indicate if optional parameters are included */
u16_t scene_number; /* The number of scenes to be recalled */
u8_t tid; /* Transaction ID */
u8_t trans_time; /* Time to complete state transition (optional) */
u8_t delay; /* Indicate message execution delay (C.1) */
bool op_en; /*!< Indicate if optional parameters are included */
u16_t scene_number; /*!< The number of scenes to be recalled */
u8_t tid; /*!< Transaction ID */
u8_t trans_time; /*!< Time to complete state transition (optional) */
u8_t delay; /*!< Indicate message execution delay (C.1) */
} esp_ble_mesh_scene_recall_t;
/** Parameter of Scene Delete */
typedef struct {
u16_t scene_number; /* The number of scenes to be deleted */
u16_t scene_number; /*!< The number of scenes to be deleted */
} esp_ble_mesh_scene_delete_t;
/** Parameter of Scheduler Action Get */
typedef struct {
u8_t index; /* Index of the Schedule Register entry to get */
u8_t index; /*!< Index of the Schedule Register entry to get */
} esp_ble_mesh_scheduler_act_get_t;
/** Parameters of Scheduler Action Set */
typedef struct {
u64_t index : 4; /* Index of the Schedule Register entry to set */
u64_t year : 7; /* Scheduled year for the action */
u64_t month : 12; /* Scheduled month for the action */
u64_t day : 5; /* Scheduled day of the month for the action */
u64_t hour : 5; /* Scheduled hour for the action */
u64_t minute : 6; /* Scheduled minute for the action */
u64_t second : 6; /* Scheduled second for the action */
u64_t day_of_week : 7; /* Schedule days of the week for the action */
u64_t action : 4; /* Action to be performed at the scheduled time */
u64_t trans_time : 8; /* Transition time for this action */
u16_t scene_number; /* Transition time for this action */
u64_t index : 4; /*!< Index of the Schedule Register entry to set */
u64_t year : 7; /*!< Scheduled year for the action */
u64_t month : 12; /*!< Scheduled month for the action */
u64_t day : 5; /*!< Scheduled day of the month for the action */
u64_t hour : 5; /*!< Scheduled hour for the action */
u64_t minute : 6; /*!< Scheduled minute for the action */
u64_t second : 6; /*!< Scheduled second for the action */
u64_t day_of_week : 7; /*!< Schedule days of the week for the action */
u64_t action : 4; /*!< Action to be performed at the scheduled time */
u64_t trans_time : 8; /*!< Transition time for this action */
u16_t scene_number; /*!< Transition time for this action */
} esp_ble_mesh_scheduler_act_set_t;
/**
* @brief For
*
* the get_state parameter in the esp_ble_mesh_time_scene_client_get_state function should be set to NULL.
* @brief Time Scene Client Model get message union
*/
typedef union {
esp_ble_mesh_scheduler_act_get_t scheduler_act_get; /*!< For ESP_BLE_MESH_MODEL_OP_SCHEDULER_ACT_GET */
} esp_ble_mesh_time_scene_client_get_state_t;
/**
* @brief Time Scene Client Model set message union
*/
typedef union {
esp_ble_mesh_time_set_t time_set; /*!< For ESP_BLE_MESH_MODEL_OP_TIME_SET */
esp_ble_mesh_time_zone_set_t time_zone_set; /*!< For ESP_BLE_MESH_MODEL_OP_TIME_ZONE_SET */
@ -156,65 +166,76 @@ typedef union {
* @brief Bluetooth Mesh Time Scene Client Model Get and Set callback parameters structure.
*/
/** Parameters of Time Status */
typedef struct {
u8_t tai_seconds[5]; /* The current TAI time in seconds */
u8_t sub_second; /* The sub-second time in units of 1/256 second */
u8_t uncertainty; /* The estimated uncertainty in 10-millisecond steps */
u16_t time_authority : 1; /* 0 = No Time Authority, 1 = Time Authority */
u16_t tai_utc_delta : 15; /* Current difference between TAI and UTC in seconds */
u8_t time_zone_offset; /* The local time zone offset in 15-minute increments */
u8_t tai_seconds[5]; /*!< The current TAI time in seconds */
u8_t sub_second; /*!< The sub-second time in units of 1/256 second */
u8_t uncertainty; /*!< The estimated uncertainty in 10-millisecond steps */
u16_t time_authority : 1; /*!< 0 = No Time Authority, 1 = Time Authority */
u16_t tai_utc_delta : 15; /*!< Current difference between TAI and UTC in seconds */
u8_t time_zone_offset; /*!< The local time zone offset in 15-minute increments */
} esp_ble_mesh_time_status_cb_t;
/** Parameters of Time Zone Status */
typedef struct {
u8_t time_zone_offset_curr; /* Current local time zone offset */
u8_t time_zone_offset_new; /* Upcoming local time zone offset */
u8_t tai_zone_change[5]; /* TAI Seconds time of the upcoming Time Zone Offset change */
u8_t time_zone_offset_curr; /*!< Current local time zone offset */
u8_t time_zone_offset_new; /*!< Upcoming local time zone offset */
u8_t tai_zone_change[5]; /*!< TAI Seconds time of the upcoming Time Zone Offset change */
} esp_ble_mesh_time_zone_status_cb_t;
/** Parameters of TAI-UTC Delta Status */
typedef struct {
u16_t tai_utc_delta_curr : 15; /* Current difference between TAI and UTC in seconds */
u16_t padding_1 : 1; /* Always 0b0. Other values are Prohibited. */
u16_t tai_utc_delta_new : 15; /* Upcoming difference between TAI and UTC in seconds */
u16_t padding_2 : 1; /* Always 0b0. Other values are Prohibited. */
u8_t tai_delta_change[5]; /* TAI Seconds time of the upcoming TAI-UTC Delta change */
u16_t tai_utc_delta_curr : 15; /*!< Current difference between TAI and UTC in seconds */
u16_t padding_1 : 1; /*!< Always 0b0. Other values are Prohibited. */
u16_t tai_utc_delta_new : 15; /*!< Upcoming difference between TAI and UTC in seconds */
u16_t padding_2 : 1; /*!< Always 0b0. Other values are Prohibited. */
u8_t tai_delta_change[5]; /*!< TAI Seconds time of the upcoming TAI-UTC Delta change */
} esp_ble_mesh_tai_utc_delta_status_cb_t;
/** Parameter of Time Role Status */
typedef struct {
u8_t time_role; /* The Time Role for the element */
u8_t time_role; /*!< The Time Role for the element */
} esp_ble_mesh_time_role_status_cb_t;
/** Parameters of Scene Status */
typedef struct {
bool op_en; /* Indicate if optional parameters are included */
u8_t status_code; /* Status code of the last operation */
u16_t current_scene; /* Scene Number of the current scene */
u16_t target_scene; /* Scene Number of the target scene (optional) */
u8_t remain_time; /* Time to complete state transition (C.1) */
bool op_en; /*!< Indicate if optional parameters are included */
u8_t status_code; /*!< Status code of the last operation */
u16_t current_scene; /*!< Scene Number of the current scene */
u16_t target_scene; /*!< Scene Number of the target scene (optional) */
u8_t remain_time; /*!< Time to complete state transition (C.1) */
} esp_ble_mesh_scene_status_cb_t;
/** Parameters of Scene Register Status */
typedef struct {
u8_t status_code; /* Status code for the previous operation */
u16_t current_scene; /* Scene Number of the current scene */
struct net_buf_simple *scenes; /* A list of scenes stored within an element */
u8_t status_code; /*!< Status code for the previous operation */
u16_t current_scene; /*!< Scene Number of the current scene */
struct net_buf_simple *scenes; /*!< A list of scenes stored within an element */
} esp_ble_mesh_scene_register_status_cb_t;
/** Parameter of Scheduler Status */
typedef struct {
u16_t schedules; /* Bit field indicating defined Actions in the Schedule Register */
u16_t schedules; /*!< Bit field indicating defined Actions in the Schedule Register */
} esp_ble_mesh_scheduler_status_cb_t;
/** Parameters of Scheduler Action Status */
typedef struct {
u64_t index : 4; /* Enumerates (selects) a Schedule Register entry */
u64_t year : 7; /* Scheduled year for the action */
u64_t month : 12; /* Scheduled month for the action */
u64_t day : 5; /* Scheduled day of the month for the action */
u64_t hour : 5; /* Scheduled hour for the action */
u64_t minute : 6; /* Scheduled minute for the action */
u64_t second : 6; /* Scheduled second for the action */
u64_t day_of_week : 7; /* Schedule days of the week for the action */
u64_t action : 4; /* Action to be performed at the scheduled time */
u64_t trans_time : 8; /* Transition time for this action */
u16_t scene_number; /* Transition time for this action */
u64_t index : 4; /*!< Enumerates (selects) a Schedule Register entry */
u64_t year : 7; /*!< Scheduled year for the action */
u64_t month : 12; /*!< Scheduled month for the action */
u64_t day : 5; /*!< Scheduled day of the month for the action */
u64_t hour : 5; /*!< Scheduled hour for the action */
u64_t minute : 6; /*!< Scheduled minute for the action */
u64_t second : 6; /*!< Scheduled second for the action */
u64_t day_of_week : 7; /*!< Schedule days of the week for the action */
u64_t action : 4; /*!< Action to be performed at the scheduled time */
u64_t trans_time : 8; /*!< Transition time for this action */
u16_t scene_number; /*!< Transition time for this action */
} esp_ble_mesh_scheduler_act_status_cb_t;
/**
* @brief Time Scene Client Model received message union
*/
typedef union {
esp_ble_mesh_time_status_cb_t time_status; /*!< For ESP_BLE_MESH_MODEL_OP_TIME_STATUS */
esp_ble_mesh_time_zone_status_cb_t time_zone_status; /*!< For ESP_BLE_MESH_MODEL_OP_TIME_ZONE_STATUS */
@ -226,12 +247,14 @@ typedef union {
esp_ble_mesh_scheduler_act_status_cb_t scheduler_act_status; /*!< For ESP_BLE_MESH_MODEL_OP_SCHEDULER_ACT_STATUS */
} esp_ble_mesh_time_scene_client_status_cb_t;
/** Time Scene Client Model callback parameters */
typedef struct {
int error_code; /*!< Appropriate error code */
esp_ble_mesh_client_common_param_t *params; /*!< The client common parameters. */
esp_ble_mesh_time_scene_client_status_cb_t status_cb; /*!< The scene status message callback values */
} esp_ble_mesh_time_scene_client_cb_param_t;
/** This enum value is the event of Time Scene Client Model */
typedef enum {
ESP_BLE_MESH_TIME_SCENE_CLIENT_GET_STATE_EVT,
ESP_BLE_MESH_TIME_SCENE_CLIENT_SET_STATE_EVT,
@ -244,7 +267,11 @@ typedef enum {
* @brief Bluetooth Mesh Time Scene Client Model function.
*/
/** @brief: event, event code of Time Scene Client Model events; param, parameters of Time Scene Client Model events */
/**
* @brief Time Scene Client Model callback function type
* @param event: Event type
* @param param: Pointer to callback parameter
*/
typedef void (* esp_ble_mesh_time_scene_client_cb_t)(esp_ble_mesh_time_scene_client_cb_event_t event,
esp_ble_mesh_time_scene_client_cb_param_t *param);
@ -262,7 +289,7 @@ esp_err_t esp_ble_mesh_register_time_scene_client_callback(esp_ble_mesh_time_sce
* @brief Get the value of Time Scene Server Model states using the Time Scene Client Model get messages.
*
* @note If you want to know the opcodes and corresponding meanings accepted by this API,
* please refer to (@ref esp_ble_mesh_time_scene_message_opcode_t).
* please refer to esp_ble_mesh_time_scene_message_opcode_t in esp_ble_mesh_defs.h
*
* @param[in] params: Pointer to BLE Mesh common client parameters.
* @param[in] get_state: Pointer to time scene get message value.
@ -277,7 +304,7 @@ esp_err_t esp_ble_mesh_time_scene_client_get_state(esp_ble_mesh_client_common_pa
* @brief Set the value of Time Scene Server Model states using the Time Scene Client Model set messages.
*
* @note If you want to know the opcodes and corresponding meanings accepted by this API,
* please refer to (@ref esp_ble_mesh_time_scene_message_opcode_t).
* please refer to esp_ble_mesh_time_scene_message_opcode_t in esp_ble_mesh_defs.h
*
* @param[in] params: Pointer to BLE Mesh common client parameters.
* @param[in] set_state: Pointer to time scene set message value.

View file

@ -1,4 +1,4 @@
// Copyright 2017-2018 Espressif Systems (Shanghai) PTE LTD
// Copyright 2017-2019 Espressif Systems (Shanghai) PTE LTD
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.

View file

@ -1,4 +1,4 @@
// Copyright 2017-2018 Espressif Systems (Shanghai) PTE LTD
// Copyright 2017-2019 Espressif Systems (Shanghai) PTE LTD
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.

View file

@ -1,4 +1,4 @@
// Copyright 2017-2018 Espressif Systems (Shanghai) PTE LTD
// Copyright 2017-2019 Espressif Systems (Shanghai) PTE LTD
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.

View file

@ -1,4 +1,4 @@
// Copyright 2017-2018 Espressif Systems (Shanghai) PTE LTD
// Copyright 2017-2019 Espressif Systems (Shanghai) PTE LTD
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.

View file

@ -1,4 +1,4 @@
// Copyright 2017-2018 Espressif Systems (Shanghai) PTE LTD
// Copyright 2017-2019 Espressif Systems (Shanghai) PTE LTD
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.

View file

@ -1,4 +1,4 @@
// Copyright 2017-2018 Espressif Systems (Shanghai) PTE LTD
// Copyright 2017-2019 Espressif Systems (Shanghai) PTE LTD
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.

View file

@ -1,4 +1,4 @@
// Copyright 2017-2018 Espressif Systems (Shanghai) PTE LTD
// Copyright 2017-2019 Espressif Systems (Shanghai) PTE LTD
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.

View file

@ -1,4 +1,4 @@
// Copyright 2017-2018 Espressif Systems (Shanghai) PTE LTD
// Copyright 2017-2019 Espressif Systems (Shanghai) PTE LTD
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.

View file

@ -1,4 +1,4 @@
// Copyright 2017-2018 Espressif Systems (Shanghai) PTE LTD
// Copyright 2017-2019 Espressif Systems (Shanghai) PTE LTD
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.

View file

@ -1,4 +1,4 @@
// Copyright 2017-2018 Espressif Systems (Shanghai) PTE LTD
// Copyright 2017-2019 Espressif Systems (Shanghai) PTE LTD
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.

View file

@ -1,4 +1,4 @@
// Copyright 2017-2018 Espressif Systems (Shanghai) PTE LTD
// Copyright 2017-2019 Espressif Systems (Shanghai) PTE LTD
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.

View file

@ -1,4 +1,4 @@
// Copyright 2017-2018 Espressif Systems (Shanghai) PTE LTD
// Copyright 2017-2019 Espressif Systems (Shanghai) PTE LTD
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.

View file

@ -1,4 +1,4 @@
// Copyright 2017-2018 Espressif Systems (Shanghai) PTE LTD
// Copyright 2017-2019 Espressif Systems (Shanghai) PTE LTD
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.

View file

@ -1,4 +1,4 @@
// Copyright 2017-2018 Espressif Systems (Shanghai) PTE LTD
// Copyright 2017-2019 Espressif Systems (Shanghai) PTE LTD
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.

View file

@ -1,4 +1,4 @@
// Copyright 2017-2018 Espressif Systems (Shanghai) PTE LTD
// Copyright 2017-2019 Espressif Systems (Shanghai) PTE LTD
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.

View file

@ -1,4 +1,4 @@
// Copyright 2017-2018 Espressif Systems (Shanghai) PTE LTD
// Copyright 2017-2019 Espressif Systems (Shanghai) PTE LTD
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.

View file

@ -1,4 +1,4 @@
// Copyright 2017-2018 Espressif Systems (Shanghai) PTE LTD
// Copyright 2017-2019 Espressif Systems (Shanghai) PTE LTD
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.

View file

@ -1,4 +1,4 @@
// Copyright 2017-2018 Espressif Systems (Shanghai) PTE LTD
// Copyright 2017-2019 Espressif Systems (Shanghai) PTE LTD
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.

View file

@ -1,4 +1,4 @@
// Copyright 2017-2018 Espressif Systems (Shanghai) PTE LTD
// Copyright 2017-2019 Espressif Systems (Shanghai) PTE LTD
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.

View file

@ -1,4 +1,4 @@
// Copyright 2017-2018 Espressif Systems (Shanghai) PTE LTD
// Copyright 2017-2019 Espressif Systems (Shanghai) PTE LTD
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.

View file

@ -1,4 +1,4 @@
// Copyright 2017-2018 Espressif Systems (Shanghai) PTE LTD
// Copyright 2017-2019 Espressif Systems (Shanghai) PTE LTD
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.

View file

@ -1,4 +1,4 @@
// Copyright 2017-2018 Espressif Systems (Shanghai) PTE LTD
// Copyright 2017-2019 Espressif Systems (Shanghai) PTE LTD
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.

View file

@ -1,4 +1,4 @@
// Copyright 2017-2018 Espressif Systems (Shanghai) PTE LTD
// Copyright 2017-2019 Espressif Systems (Shanghai) PTE LTD
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.

View file

@ -1,4 +1,4 @@
// Copyright 2017-2018 Espressif Systems (Shanghai) PTE LTD
// Copyright 2017-2019 Espressif Systems (Shanghai) PTE LTD
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.

View file

@ -1,4 +1,4 @@
// Copyright 2017-2018 Espressif Systems (Shanghai) PTE LTD
// Copyright 2017-2019 Espressif Systems (Shanghai) PTE LTD
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.

View file

@ -1,4 +1,4 @@
// Copyright 2017-2018 Espressif Systems (Shanghai) PTE LTD
// Copyright 2017-2019 Espressif Systems (Shanghai) PTE LTD
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.

View file

@ -1,4 +1,4 @@
// Copyright 2017-2018 Espressif Systems (Shanghai) PTE LTD
// Copyright 2017-2019 Espressif Systems (Shanghai) PTE LTD
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.

View file

@ -1,4 +1,4 @@
// Copyright 2017-2018 Espressif Systems (Shanghai) PTE LTD
// Copyright 2017-2019 Espressif Systems (Shanghai) PTE LTD
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.

View file

@ -1,4 +1,4 @@
// Copyright 2017-2018 Espressif Systems (Shanghai) PTE LTD
// Copyright 2017-2019 Espressif Systems (Shanghai) PTE LTD
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.

View file

@ -1,4 +1,4 @@
// Copyright 2017-2018 Espressif Systems (Shanghai) PTE LTD
// Copyright 2017-2019 Espressif Systems (Shanghai) PTE LTD
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.

View file

@ -1,4 +1,4 @@
// Copyright 2017-2018 Espressif Systems (Shanghai) PTE LTD
// Copyright 2017-2019 Espressif Systems (Shanghai) PTE LTD
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.

View file

@ -1,4 +1,4 @@
// Copyright 2017-2018 Espressif Systems (Shanghai) PTE LTD
// Copyright 2017-2019 Espressif Systems (Shanghai) PTE LTD
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.

View file

@ -1,4 +1,4 @@
// Copyright 2017-2018 Espressif Systems (Shanghai) PTE LTD
// Copyright 2017-2019 Espressif Systems (Shanghai) PTE LTD
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.

View file

@ -1,4 +1,4 @@
// Copyright 2017-2018 Espressif Systems (Shanghai) PTE LTD
// Copyright 2017-2019 Espressif Systems (Shanghai) PTE LTD
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.

View file

@ -1,4 +1,4 @@
// Copyright 2017-2018 Espressif Systems (Shanghai) PTE LTD
// Copyright 2017-2019 Espressif Systems (Shanghai) PTE LTD
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.

View file

@ -1,4 +1,4 @@
// Copyright 2017-2018 Espressif Systems (Shanghai) PTE LTD
// Copyright 2017-2019 Espressif Systems (Shanghai) PTE LTD
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.

View file

@ -1,4 +1,4 @@
// Copyright 2017-2018 Espressif Systems (Shanghai) PTE LTD
// Copyright 2017-2019 Espressif Systems (Shanghai) PTE LTD
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.

View file

@ -59,6 +59,20 @@ INPUT = \
../../components/bt/host/bluedroid/api/include/api/esp_hf_client_api.h \
## NimBLE related Bluetooth APIs
../../components/bt/host/nimble/esp-hci/include/esp_nimble_hci.h \
## ESP BLE Mesh APIs
../../components/bt/esp_ble_mesh/api/core/include/esp_ble_mesh_common_api.h \
../../components/bt/esp_ble_mesh/api/core/include/esp_ble_mesh_local_data_operation_api.h \
../../components/bt/esp_ble_mesh/api/core/include/esp_ble_mesh_low_power_api.h \
../../components/bt/esp_ble_mesh/api/core/include/esp_ble_mesh_networking_api.h \
../../components/bt/esp_ble_mesh/api/core/include/esp_ble_mesh_provisioning_api.h \
../../components/bt/esp_ble_mesh/api/core/include/esp_ble_mesh_proxy_api.h \
../../components/bt/esp_ble_mesh/api/models/include/esp_ble_mesh_config_model_api.h \
../../components/bt/esp_ble_mesh/api/models/include/esp_ble_mesh_generic_model_api.h \
../../components/bt/esp_ble_mesh/api/models/include/esp_ble_mesh_health_model_api.h \
../../components/bt/esp_ble_mesh/api/models/include/esp_ble_mesh_lighting_model_api.h \
../../components/bt/esp_ble_mesh/api/models/include/esp_ble_mesh_sensor_model_api.h \
../../components/bt/esp_ble_mesh/api/models/include/esp_ble_mesh_time_scene_model_api.h \
../../components/bt/esp_ble_mesh/api/esp_ble_mesh_defs.h \
##
## Ethernet - API Reference
##

View file

@ -1,4 +1,4 @@
// Copyright 2017-2018 Espressif Systems (Shanghai) PTE LTD
// Copyright 2017-2019 Espressif Systems (Shanghai) PTE LTD
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.

View file

@ -1,4 +1,4 @@
// Copyright 2017-2018 Espressif Systems (Shanghai) PTE LTD
// Copyright 2017-2019 Espressif Systems (Shanghai) PTE LTD
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.

View file

@ -1,4 +1,4 @@
// Copyright 2017-2018 Espressif Systems (Shanghai) PTE LTD
// Copyright 2017-2019 Espressif Systems (Shanghai) PTE LTD
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.

View file

@ -1,4 +1,4 @@
// Copyright 2017-2018 Espressif Systems (Shanghai) PTE LTD
// Copyright 2017-2019 Espressif Systems (Shanghai) PTE LTD
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.

View file

@ -1,4 +1,4 @@
// Copyright 2017-2018 Espressif Systems (Shanghai) PTE LTD
// Copyright 2017-2019 Espressif Systems (Shanghai) PTE LTD
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.

View file

@ -1,4 +1,4 @@
// Copyright 2017-2018 Espressif Systems (Shanghai) PTE LTD
// Copyright 2017-2019 Espressif Systems (Shanghai) PTE LTD
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.

View file

@ -1,4 +1,4 @@
// Copyright 2017-2018 Espressif Systems (Shanghai) PTE LTD
// Copyright 2017-2019 Espressif Systems (Shanghai) PTE LTD
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.

View file

@ -1,4 +1,4 @@
// Copyright 2017-2018 Espressif Systems (Shanghai) PTE LTD
// Copyright 2017-2019 Espressif Systems (Shanghai) PTE LTD
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.

View file

@ -1,4 +1,4 @@
// Copyright 2017-2018 Espressif Systems (Shanghai) PTE LTD
// Copyright 2017-2019 Espressif Systems (Shanghai) PTE LTD
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.

View file

@ -1,4 +1,4 @@
// Copyright 2017-2018 Espressif Systems (Shanghai) PTE LTD
// Copyright 2017-2019 Espressif Systems (Shanghai) PTE LTD
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.

View file

@ -1,4 +1,4 @@
// Copyright 2017-2018 Espressif Systems (Shanghai) PTE LTD
// Copyright 2017-2019 Espressif Systems (Shanghai) PTE LTD
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.

View file

@ -1,4 +1,4 @@
// Copyright 2017-2018 Espressif Systems (Shanghai) PTE LTD
// Copyright 2017-2019 Espressif Systems (Shanghai) PTE LTD
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.

View file

@ -1,4 +1,4 @@
// Copyright 2017-2018 Espressif Systems (Shanghai) PTE LTD
// Copyright 2017-2019 Espressif Systems (Shanghai) PTE LTD
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.

View file

@ -1,4 +1,4 @@
// Copyright 2017-2018 Espressif Systems (Shanghai) PTE LTD
// Copyright 2017-2019 Espressif Systems (Shanghai) PTE LTD
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.

View file

@ -1,4 +1,4 @@
// Copyright 2017-2018 Espressif Systems (Shanghai) PTE LTD
// Copyright 2017-2019 Espressif Systems (Shanghai) PTE LTD
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.

View file

@ -1,4 +1,4 @@
// Copyright 2017-2018 Espressif Systems (Shanghai) PTE LTD
// Copyright 2017-2019 Espressif Systems (Shanghai) PTE LTD
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.

View file

@ -1,4 +1,4 @@
// Copyright 2017-2018 Espressif Systems (Shanghai) PTE LTD
// Copyright 2017-2019 Espressif Systems (Shanghai) PTE LTD
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.

View file

@ -1,4 +1,4 @@
// Copyright 2017-2018 Espressif Systems (Shanghai) PTE LTD
// Copyright 2017-2019 Espressif Systems (Shanghai) PTE LTD
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.

View file

@ -1,4 +1,4 @@
// Copyright 2017-2018 Espressif Systems (Shanghai) PTE LTD
// Copyright 2017-2019 Espressif Systems (Shanghai) PTE LTD
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.

View file

@ -1,4 +1,4 @@
// Copyright 2017-2018 Espressif Systems (Shanghai) PTE LTD
// Copyright 2017-2019 Espressif Systems (Shanghai) PTE LTD
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.

View file

@ -1,4 +1,4 @@
// Copyright 2017-2018 Espressif Systems (Shanghai) PTE LTD
// Copyright 2017-2019 Espressif Systems (Shanghai) PTE LTD
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.

View file

@ -1,4 +1,4 @@
// Copyright 2017-2018 Espressif Systems (Shanghai) PTE LTD
// Copyright 2017-2019 Espressif Systems (Shanghai) PTE LTD
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.

View file

@ -1,4 +1,4 @@
// Copyright 2017-2018 Espressif Systems (Shanghai) PTE LTD
// Copyright 2017-2019 Espressif Systems (Shanghai) PTE LTD
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.

View file

@ -1,4 +1,4 @@
// Copyright 2017-2018 Espressif Systems (Shanghai) PTE LTD
// Copyright 2017-2019 Espressif Systems (Shanghai) PTE LTD
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.

View file

@ -1,4 +1,4 @@
// Copyright 2017-2018 Espressif Systems (Shanghai) PTE LTD
// Copyright 2017-2019 Espressif Systems (Shanghai) PTE LTD
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.

View file

@ -1,4 +1,4 @@
// Copyright 2017-2018 Espressif Systems (Shanghai) PTE LTD
// Copyright 2017-2019 Espressif Systems (Shanghai) PTE LTD
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.

View file

@ -1,4 +1,4 @@
// Copyright 2017-2018 Espressif Systems (Shanghai) PTE LTD
// Copyright 2017-2019 Espressif Systems (Shanghai) PTE LTD
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.

View file

@ -1,4 +1,4 @@
// Copyright 2017-2018 Espressif Systems (Shanghai) PTE LTD
// Copyright 2017-2019 Espressif Systems (Shanghai) PTE LTD
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.

View file

@ -1,4 +1,4 @@
// Copyright 2017-2018 Espressif Systems (Shanghai) PTE LTD
// Copyright 2017-2019 Espressif Systems (Shanghai) PTE LTD
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.

View file

@ -1,4 +1,4 @@
// Copyright 2017-2018 Espressif Systems (Shanghai) PTE LTD
// Copyright 2017-2019 Espressif Systems (Shanghai) PTE LTD
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.

View file

@ -1,4 +1,4 @@
// Copyright 2017-2018 Espressif Systems (Shanghai) PTE LTD
// Copyright 2017-2019 Espressif Systems (Shanghai) PTE LTD
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.

View file

@ -1,4 +1,4 @@
// Copyright 2017-2018 Espressif Systems (Shanghai) PTE LTD
// Copyright 2017-2019 Espressif Systems (Shanghai) PTE LTD
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.

View file

@ -1,4 +1,4 @@
// Copyright 2017-2018 Espressif Systems (Shanghai) PTE LTD
// Copyright 2017-2019 Espressif Systems (Shanghai) PTE LTD
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.

View file

@ -1,4 +1,4 @@
// Copyright 2017-2018 Espressif Systems (Shanghai) PTE LTD
// Copyright 2017-2019 Espressif Systems (Shanghai) PTE LTD
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.

View file

@ -1,4 +1,4 @@
// Copyright 2017-2018 Espressif Systems (Shanghai) PTE LTD
// Copyright 2017-2019 Espressif Systems (Shanghai) PTE LTD
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.

View file

@ -1,4 +1,4 @@
// Copyright 2017-2018 Espressif Systems (Shanghai) PTE LTD
// Copyright 2017-2019 Espressif Systems (Shanghai) PTE LTD
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.

View file

@ -1,4 +1,4 @@
// Copyright 2017-2018 Espressif Systems (Shanghai) PTE LTD
// Copyright 2017-2019 Espressif Systems (Shanghai) PTE LTD
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.

Some files were not shown because too many files have changed in this diff Show more