Merge branch 'bugfix/ble_mesh_add_missing_cpp_v4.1' into 'release/v4.1'

ble_mesh: Add missing #ifdef __cplusplus (v4.1)

See merge request espressif/esp-idf!8505
This commit is contained in:
Island 2020-05-06 11:12:13 +08:00
commit 547fd926a9
63 changed files with 506 additions and 2 deletions

View file

@ -17,6 +17,10 @@
#include "esp_ble_mesh_defs.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* @brief This function is called to start BLE advertising with the corresponding data
* and parameters while BLE Mesh is working at the same time.
@ -54,4 +58,8 @@ esp_err_t esp_ble_mesh_start_ble_advertising(const esp_ble_mesh_ble_adv_param_t
*/
esp_err_t esp_ble_mesh_stop_ble_advertising(uint8_t index);
#ifdef __cplusplus
}
#endif
#endif /* _ESP_BLE_MESH_BLE_API_H_ */

View file

@ -17,6 +17,10 @@
#include "esp_ble_mesh_defs.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* @brief Initialize BLE Mesh module.
* This API initializes provisioning capabilities and composition data information.
@ -46,4 +50,8 @@ esp_err_t esp_ble_mesh_init(esp_ble_mesh_prov_t *prov, esp_ble_mesh_comp_t *comp
*/
esp_err_t esp_ble_mesh_deinit(esp_ble_mesh_deinit_param_t *param);
#ifdef __cplusplus
}
#endif
#endif /* _ESP_BLE_MESH_COMMON_API_H_ */

View file

@ -17,6 +17,10 @@
#include "esp_ble_mesh_defs.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* @brief Get the model publish period, the unit is ms.
*
@ -104,4 +108,8 @@ esp_ble_mesh_model_t *esp_ble_mesh_find_sig_model(const esp_ble_mesh_elem_t *ele
*/
const esp_ble_mesh_comp_t *esp_ble_mesh_get_composition_data(void);
#ifdef __cplusplus
}
#endif
#endif /* _ESP_BLE_MESH_LOCAL_DATA_OPERATION_API_H_ */

View file

@ -17,6 +17,10 @@
#include "esp_ble_mesh_defs.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* @brief Enable BLE Mesh device LPN functionality.
*
@ -58,4 +62,8 @@ esp_err_t esp_ble_mesh_lpn_disable(bool force);
*/
esp_err_t esp_ble_mesh_lpn_poll(void);
#ifdef __cplusplus
}
#endif
#endif /* _ESP_BLE_MESH_LOW_POWER_API_H_ */

View file

@ -17,6 +17,10 @@
#include "esp_ble_mesh_defs.h"
#ifdef __cplusplus
extern "C" {
#endif
/** @brief: event, event code of user-defined model events; param, parameters of user-defined model events */
typedef void (* esp_ble_mesh_model_cb_t)(esp_ble_mesh_model_cb_event_t event,
esp_ble_mesh_model_cb_param_t *param);
@ -381,4 +385,8 @@ uint16_t esp_ble_mesh_provisioner_get_prov_node_count(void);
*/
const uint8_t *esp_ble_mesh_get_fast_prov_app_key(uint16_t net_idx, uint16_t app_idx);
#ifdef __cplusplus
}
#endif
#endif /* _ESP_BLE_MESH_NETWORKING_API_H_ */

View file

@ -17,6 +17,10 @@
#include "esp_ble_mesh_defs.h"
#ifdef __cplusplus
extern "C" {
#endif
/** @brief: event, event code of provisioning events; param, parameters of provisioning events */
typedef void (* esp_ble_mesh_prov_cb_t)(esp_ble_mesh_prov_cb_event_t event,
esp_ble_mesh_prov_cb_param_t *param);
@ -367,4 +371,8 @@ esp_err_t esp_ble_mesh_set_fast_prov_info(esp_ble_mesh_fast_prov_info_t *fast_pr
*/
esp_err_t esp_ble_mesh_set_fast_prov_action(esp_ble_mesh_fast_prov_action_t action);
#ifdef __cplusplus
}
#endif
#endif /* _ESP_BLE_MESH_PROVISIONING_API_H_ */

View file

@ -17,6 +17,10 @@
#include "esp_ble_mesh_defs.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* @brief Enable advertising with Node Identity.
*
@ -114,5 +118,9 @@ esp_err_t esp_ble_mesh_proxy_client_add_filter_addr(uint8_t conn_handle,
esp_err_t esp_ble_mesh_proxy_client_remove_filter_addr(uint8_t conn_handle,
uint16_t net_idx, uint16_t *addr, uint16_t addr_num);
#ifdef __cplusplus
}
#endif
#endif /* _ESP_BLE_MESH_PROXY_API_H_ */

View file

@ -31,6 +31,10 @@
#define ESP_BLE_HOST_STATUS_CHECK(status) do {} while (0)
#endif
#ifdef __cplusplus
extern "C" {
#endif
/*!< The maximum length of a BLE Mesh message, including Opcode, Payload and TransMIC */
#define ESP_BLE_MESH_SDU_MAX_LEN 384
@ -2074,4 +2078,8 @@ typedef union {
} server_model_update_state; /*!< Event parameter of ESP_BLE_MESH_SERVER_MODEL_UPDATE_STATE_COMP_EVT */
} esp_ble_mesh_model_cb_param_t;
#ifdef __cplusplus
}
#endif
#endif /* _ESP_BLE_MESH_DEFS_H_ */

View file

@ -17,6 +17,10 @@
#include "esp_ble_mesh_defs.h"
#ifdef __cplusplus
extern "C" {
#endif
/** @def ESP_BLE_MESH_MODEL_CFG_SRV
*
* @brief Define a new Config Server Model.
@ -814,5 +818,9 @@ esp_err_t esp_ble_mesh_config_client_get_state(esp_ble_mesh_client_common_param_
esp_err_t esp_ble_mesh_config_client_set_state(esp_ble_mesh_client_common_param_t *params,
esp_ble_mesh_cfg_client_set_state_t *set_state);
#endif /** _ESP_BLE_MESH_CONFIG_MODEL_API_H_ */
#ifdef __cplusplus
}
#endif
#endif /* _ESP_BLE_MESH_CONFIG_MODEL_API_H_ */

View file

@ -21,6 +21,10 @@
#include "esp_ble_mesh_defs.h"
#ifdef __cplusplus
extern "C" {
#endif
/** @def ESP_BLE_MESH_MODEL_GEN_ONOFF_CLI
*
* @brief Define a new Generic OnOff Client Model.
@ -1293,5 +1297,9 @@ typedef void (* esp_ble_mesh_generic_server_cb_t)(esp_ble_mesh_generic_server_cb
*/
esp_err_t esp_ble_mesh_register_generic_server_callback(esp_ble_mesh_generic_server_cb_t callback);
#ifdef __cplusplus
}
#endif
#endif /* _ESP_BLE_MESH_GENERIC_MODEL_API_H_ */

View file

@ -17,6 +17,10 @@
#include "esp_ble_mesh_defs.h"
#ifdef __cplusplus
extern "C" {
#endif
/** @def ESP_BLE_MESH_MODEL_HEALTH_SRV
*
* @brief Define a new Health Server Model.
@ -403,4 +407,8 @@ esp_err_t esp_ble_mesh_health_client_set_state(esp_ble_mesh_client_common_param_
*/
esp_err_t esp_ble_mesh_health_server_fault_update(esp_ble_mesh_elem_t *element);
#endif /** _ESP_BLE_MESH_HEALTH_MODEL_API_H_ */
#ifdef __cplusplus
}
#endif
#endif /* _ESP_BLE_MESH_HEALTH_MODEL_API_H_ */

View file

@ -21,6 +21,10 @@
#include "esp_ble_mesh_defs.h"
#ifdef __cplusplus
extern "C" {
#endif
/** @def ESP_BLE_MESH_MODEL_LIGHT_LIGHTNESS_CLI
*
* @brief Define a new Light Lightness Client Model.
@ -1671,5 +1675,9 @@ typedef void (* esp_ble_mesh_lighting_server_cb_t)(esp_ble_mesh_lighting_server_
*/
esp_err_t esp_ble_mesh_register_lighting_server_callback(esp_ble_mesh_lighting_server_cb_t callback);
#ifdef __cplusplus
}
#endif
#endif /* _ESP_BLE_MESH_LIGHTING_MODEL_API_H_ */

View file

@ -21,6 +21,10 @@
#include "esp_ble_mesh_defs.h"
#ifdef __cplusplus
extern "C" {
#endif
/** @def ESP_BLE_MESH_MODEL_SENSOR_CLI
*
* @brief Define a new Sensor Client Model.
@ -706,6 +710,10 @@ typedef void (* esp_ble_mesh_sensor_server_cb_t)(esp_ble_mesh_sensor_server_cb_e
*/
esp_err_t esp_ble_mesh_register_sensor_server_callback(esp_ble_mesh_sensor_server_cb_t callback);
#ifdef __cplusplus
}
#endif
#endif /* _ESP_BLE_MESH_SENSOR_MODEL_API_H_ */

View file

@ -21,6 +21,10 @@
#include "esp_ble_mesh_defs.h"
#ifdef __cplusplus
extern "C" {
#endif
/** @def ESP_BLE_MESH_MODEL_TIME_CLI
*
* @brief Define a new Time Client Model.
@ -908,5 +912,9 @@ typedef void (* esp_ble_mesh_time_scene_server_cb_t)(esp_ble_mesh_time_scene_ser
*/
esp_err_t esp_ble_mesh_register_time_scene_server_callback(esp_ble_mesh_time_scene_server_cb_t callback);
#ifdef __cplusplus
}
#endif
#endif /* _ESP_BLE_MESH_TIME_SCENE_MODEL_API_H_ */

View file

@ -18,6 +18,10 @@
#include "btc/btc_manage.h"
#include "esp_ble_mesh_config_model_api.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef enum {
BTC_BLE_MESH_ACT_CONFIG_CLIENT_GET_STATE,
BTC_BLE_MESH_ACT_CONFIG_CLIENT_SET_STATE,
@ -71,4 +75,8 @@ void bt_mesh_config_server_cb_evt_to_btc(u8_t evt_type,
struct bt_mesh_msg_ctx *ctx,
const u8_t *val, size_t len);
#ifdef __cplusplus
}
#endif
#endif /* _BTC_BLE_MESH_CONFIG_MODEL_H_ */

View file

@ -18,6 +18,10 @@
#include "btc/btc_manage.h"
#include "esp_ble_mesh_generic_model_api.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef enum {
BTC_BLE_MESH_ACT_GENERIC_CLIENT_GET_STATE,
BTC_BLE_MESH_ACT_GENERIC_CLIENT_SET_STATE,
@ -73,4 +77,8 @@ void bt_mesh_generic_server_cb_evt_to_btc(u8_t evt_type,
void btc_ble_mesh_generic_server_cb_handler(btc_msg_t *msg);
#ifdef __cplusplus
}
#endif
#endif /* _BTC_BLE_MESH_GENERIC_MODEL_H_ */

View file

@ -18,6 +18,10 @@
#include "btc/btc_manage.h"
#include "esp_ble_mesh_health_model_api.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef enum {
BTC_BLE_MESH_ACT_HEALTH_CLIENT_GET_STATE,
BTC_BLE_MESH_ACT_HEALTH_CLIENT_SET_STATE,
@ -84,4 +88,8 @@ void btc_ble_mesh_health_server_attention_on(struct bt_mesh_model *model, u8_t t
void btc_ble_mesh_health_server_attention_off(struct bt_mesh_model *model);
#ifdef __cplusplus
}
#endif
#endif /* _BTC_BLE_MESH_HEALTH_MODEL_H_ */

View file

@ -18,6 +18,10 @@
#include "btc/btc_manage.h"
#include "esp_ble_mesh_lighting_model_api.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef enum {
BTC_BLE_MESH_ACT_LIGHTING_CLIENT_GET_STATE,
BTC_BLE_MESH_ACT_LIGHTING_CLIENT_SET_STATE,
@ -74,5 +78,9 @@ void bt_mesh_lighting_server_cb_evt_to_btc(u8_t evt_type,
void btc_ble_mesh_lighting_server_cb_handler(btc_msg_t *msg);
#ifdef __cplusplus
}
#endif
#endif /* _BTC_BLE_MESH_LIGHTING_MODEL_H_ */

View file

@ -20,6 +20,10 @@
#include "provisioner_prov.h"
#include "esp_ble_mesh_defs.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef enum {
BTC_BLE_MESH_ACT_MESH_INIT = 0,
BTC_BLE_MESH_ACT_PROV_ENABLE,
@ -309,4 +313,8 @@ void btc_ble_mesh_model_cb_handler(btc_msg_t *msg);
void btc_ble_mesh_prov_call_handler(btc_msg_t *msg);
void btc_ble_mesh_prov_cb_handler(btc_msg_t *msg);
#ifdef __cplusplus
}
#endif
#endif /* _BTC_BLE_MESH_PROV_H_ */

View file

@ -18,6 +18,10 @@
#include "btc/btc_manage.h"
#include "esp_ble_mesh_sensor_model_api.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef enum {
BTC_BLE_MESH_ACT_SENSOR_CLIENT_GET_STATE,
BTC_BLE_MESH_ACT_SENSOR_CLIENT_SET_STATE,
@ -73,5 +77,9 @@ void bt_mesh_sensor_server_cb_evt_to_btc(u8_t evt_type,
void btc_ble_mesh_sensor_server_cb_handler(btc_msg_t *msg);
#ifdef __cplusplus
}
#endif
#endif /* _BTC_BLE_MESH_SENSOR_MODEL_H_ */

View file

@ -18,6 +18,10 @@
#include "btc/btc_manage.h"
#include "esp_ble_mesh_time_scene_model_api.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef enum {
BTC_BLE_MESH_ACT_TIME_SCENE_CLIENT_GET_STATE,
BTC_BLE_MESH_ACT_TIME_SCENE_CLIENT_SET_STATE,
@ -74,5 +78,9 @@ void bt_mesh_time_scene_server_cb_evt_to_btc(u8_t evt_type,
void btc_ble_mesh_time_scene_server_cb_handler(btc_msg_t *msg);
#ifdef __cplusplus
}
#endif
#endif /* _BTC_BLE_MESH_TIME_SCENE_MODEL_H_ */

View file

@ -31,6 +31,10 @@
#include "mesh_access.h"
#ifdef __cplusplus
extern "C" {
#endif
#if CONFIG_BLE_MESH_ALLOC_FROM_PSRAM_FIRST
#define bt_mesh_malloc(size) heap_caps_malloc_prefer(size, 2, MALLOC_CAP_DEFAULT|MALLOC_CAP_SPIRAM, MALLOC_CAP_DEFAULT|MALLOC_CAP_INTERNAL)
#define bt_mesh_calloc(size) heap_caps_calloc_prefer(1, size, 2, MALLOC_CAP_DEFAULT|MALLOC_CAP_SPIRAM, MALLOC_CAP_DEFAULT|MALLOC_CAP_INTERNAL)
@ -87,4 +91,8 @@ void bt_mesh_mutex_lock(bt_mesh_mutex_t *mutex);
void bt_mesh_mutex_unlock(bt_mesh_mutex_t *mutex);
#ifdef __cplusplus
}
#endif
#endif /* _BLE_MESH_COMMON_H_ */

View file

@ -12,6 +12,10 @@
#include "mesh_slist.h"
#include "mesh_atomic.h"
#ifdef __cplusplus
extern "C" {
#endif
/* number of nsec per usec */
#define NSEC_PER_USEC 1000
@ -276,5 +280,9 @@ void bt_mesh_atomic_unlock(void);
void bt_mesh_k_init(void);
void bt_mesh_k_deinit(void);
#ifdef __cplusplus
}
#endif
#endif /* _BLE_MESH_KERNEL_H_ */

View file

@ -11,6 +11,10 @@
#include "esp_log.h"
#ifdef __cplusplus
extern "C" {
#endif
/* Define common tracing for all */
#ifndef LOG_LEVEL_ERROR
#define LOG_LEVEL_ERROR 1
@ -127,4 +131,8 @@
#define NET_BUF_SIMPLE_ASSERT(cond)
#endif
#ifdef __cplusplus
}
#endif
#endif /* _BLE_MESH_TRACE_H_ */

View file

@ -11,6 +11,10 @@
#include "net.h"
#ifdef __cplusplus
extern "C" {
#endif
/* bt_mesh_model.flags */
enum {
BLE_MESH_MOD_BIND_PENDING = BIT(0),
@ -74,4 +78,8 @@ size_t bt_mesh_rx_appkey_size(void);
struct bt_mesh_app_key *bt_mesh_rx_appkey_get(size_t index);
#ifdef __cplusplus
}
#endif
#endif /* _ACCESS_H_ */

View file

@ -13,6 +13,10 @@
#include "mesh_access.h"
#include "mesh_bearer_adapt.h"
#ifdef __cplusplus
extern "C" {
#endif
/* Maximum advertising data payload for a single data type */
#define BLE_MESH_ADV_DATA_SIZE 29
@ -107,4 +111,8 @@ int bt_mesh_start_ble_advertising(const struct bt_mesh_ble_adv_param *param,
int bt_mesh_stop_ble_advertising(u8_t index);
#endif /* CONFIG_BLE_MESH_SUPPORT_BLE_ADV */
#ifdef __cplusplus
}
#endif
#endif /* _ADV_H_ */

View file

@ -11,6 +11,10 @@
#include "net.h"
#ifdef __cplusplus
extern "C" {
#endif
void bt_mesh_beacon_enable(void);
void bt_mesh_beacon_disable(void);
@ -24,4 +28,8 @@ void bt_mesh_beacon_create(struct bt_mesh_subnet *sub,
void bt_mesh_beacon_init(void);
void bt_mesh_beacon_deinit(void);
#ifdef __cplusplus
}
#endif
#endif /* _BEACON_H_ */

View file

@ -13,6 +13,10 @@
#include <string.h>
#include "mesh_buf.h"
#ifdef __cplusplus
extern "C" {
#endif
struct bt_mesh_sg {
const void *data;
size_t len;
@ -163,4 +167,8 @@ int bt_mesh_prov_decrypt(const u8_t key[16], u8_t nonce[13],
int bt_mesh_prov_encrypt(const u8_t key[16], u8_t nonce[13],
const u8_t data[25], u8_t out[33]);
#ifdef __cplusplus
}
#endif
#endif /* _CRYPTO_H_ */

View file

@ -10,6 +10,10 @@
#include "net.h"
#ifdef __cplusplus
extern "C" {
#endif
#define OP_APP_KEY_ADD BLE_MESH_MODEL_OP_1(0x00)
#define OP_APP_KEY_UPDATE BLE_MESH_MODEL_OP_1(0x01)
#define OP_DEV_COMP_DATA_STATUS BLE_MESH_MODEL_OP_1(0x02)
@ -181,4 +185,8 @@ static inline void key_idx_unpack(struct net_buf_simple *buf,
net_buf_simple_pull(buf, 3);
}
#ifdef __cplusplus
}
#endif
#endif /* _FOUNDATION_H_ */

View file

@ -11,6 +11,10 @@
#include "net.h"
#ifdef __cplusplus
extern "C" {
#endif
enum bt_mesh_friend_pdu_type {
BLE_MESH_FRIEND_PDU_SINGLE,
BLE_MESH_FRIEND_PDU_PARTIAL,
@ -56,4 +60,8 @@ int bt_mesh_friend_deinit(void);
void bt_mesh_friend_remove_lpn(u16_t lpn_addr);
#ifdef __cplusplus
}
#endif
#endif /* _FRIEND_H_ */

View file

@ -20,6 +20,10 @@
* @{
*/
#ifdef __cplusplus
extern "C" {
#endif
/* Config client model common structure */
typedef bt_mesh_client_user_data_t bt_mesh_config_client_t;
typedef bt_mesh_client_internal_data_t config_internal_data_t;
@ -288,6 +292,10 @@ int bt_mesh_cfg_net_transmit_get(struct bt_mesh_msg_ctx *ctx);
int bt_mesh_cfg_net_transmit_set(struct bt_mesh_msg_ctx *ctx, u8_t transmit);
#ifdef __cplusplus
}
#endif
/**
* @}
*/

View file

@ -19,6 +19,10 @@
* @{
*/
#ifdef __cplusplus
extern "C" {
#endif
/** Mesh Configuration Server Model Context */
struct bt_mesh_cfg_srv {
struct bt_mesh_model *model;
@ -207,6 +211,10 @@ typedef union {
} cfg_net_transmit_set;
} bt_mesh_cfg_server_state_change_t;
#ifdef __cplusplus
}
#endif
/**
* @}
*/

View file

@ -20,6 +20,10 @@
* @{
*/
#ifdef __cplusplus
extern "C" {
#endif
/* Health client model common structure */
typedef bt_mesh_client_user_data_t bt_mesh_health_client_t;
typedef bt_mesh_client_internal_data_t health_internal_data_t;
@ -67,6 +71,10 @@ struct bt_mesh_health_fault_status {
struct net_buf_simple *fault_array;
};
#ifdef __cplusplus
}
#endif
/**
* @}
*/

View file

@ -19,6 +19,10 @@
* @{
*/
#ifdef __cplusplus
extern "C" {
#endif
struct bt_mesh_health_srv_cb {
/* Clear registered faults */
void (*fault_clear)(struct bt_mesh_model *model, u16_t company_id);
@ -90,6 +94,10 @@ extern const struct bt_mesh_model_op bt_mesh_health_srv_op[];
int bt_mesh_fault_update(struct bt_mesh_elem *elem);
#ifdef __cplusplus
}
#endif
/**
* @}
*/

View file

@ -23,6 +23,10 @@
* @{
*/
#ifdef __cplusplus
extern "C" {
#endif
#define BLE_MESH_ADDR_UNASSIGNED 0x0000
#define BLE_MESH_ADDR_ALL_NODES 0xffff
#define BLE_MESH_ADDR_PROXIES 0xfffc
@ -489,6 +493,10 @@ struct bt_mesh_comp {
struct bt_mesh_elem *elem;
};
#ifdef __cplusplus
}
#endif
/**
* @}
*/

View file

@ -15,6 +15,10 @@
#include "mesh_uuid.h"
#include "mesh_buf.h"
#ifdef __cplusplus
extern "C" {
#endif
/* BLE Mesh Max Connection Count */
#ifdef CONFIG_BT_BLUEDROID_ENABLED
#define BLE_MESH_MAX_CONN \
@ -813,5 +817,9 @@ enum {
int bt_mesh_update_exceptional_list(u8_t sub_code, u8_t type, void *info);
#ifdef __cplusplus
}
#endif
#endif /* _BLE_MESH_BEARER_ADRPT_H_ */

View file

@ -20,6 +20,10 @@
* @{
*/
#ifdef __cplusplus
extern "C" {
#endif
typedef enum {
BLE_MESH_NO_OUTPUT = 0,
BLE_MESH_BLINK = BIT(0),
@ -629,6 +633,10 @@ void bt_mesh_lpn_set_cb(void (*cb)(u16_t friend_addr, bool established));
*/
void bt_mesh_friend_set_cb(void (*cb)(bool establish, u16_t lpn_addr, u8_t reason));
#ifdef __cplusplus
}
#endif
/**
* @}
*/

View file

@ -19,6 +19,10 @@
* @{
*/
#ifdef __cplusplus
extern "C" {
#endif
/**
* @brief Enable advertising with Node Identity.
*
@ -30,6 +34,10 @@
*/
int bt_mesh_proxy_identity_enable(void);
#ifdef __cplusplus
}
#endif
/**
* @}
*/

View file

@ -11,6 +11,10 @@
#include "net.h"
#ifdef __cplusplus
extern "C" {
#endif
int bt_mesh_lpn_friend_update(struct bt_mesh_net_rx *rx,
struct net_buf_simple *buf);
int bt_mesh_lpn_friend_offer(struct bt_mesh_net_rx *rx,
@ -67,4 +71,8 @@ void bt_mesh_lpn_disable(bool force);
int bt_mesh_lpn_init(void);
int bt_mesh_lpn_deinit(void);
#ifdef __cplusplus
}
#endif
#endif /* _LPN_H_ */

View file

@ -11,6 +11,10 @@
#include "net.h"
#ifdef __cplusplus
extern "C" {
#endif
#define BLE_MESH_KEY_PRIMARY 0x0000
#define BLE_MESH_KEY_ANY 0xffff
@ -21,4 +25,8 @@
struct bt_mesh_net;
#ifdef __cplusplus
}
#endif
#endif /* _MESH_H_ */

View file

@ -12,6 +12,10 @@
#include "mesh_access.h"
#ifdef __cplusplus
extern "C" {
#endif
#define BLE_MESH_NET_FLAG_KR BIT(0)
#define BLE_MESH_NET_FLAG_IVU BIT(1)
@ -417,4 +421,8 @@ static inline void send_cb_finalize(const struct bt_mesh_send_cb *cb,
}
}
#ifdef __cplusplus
}
#endif
#endif /* _NET_H_ */

View file

@ -12,6 +12,10 @@
#include "mesh_main.h"
#include "mesh_bearer_adapt.h"
#ifdef __cplusplus
extern "C" {
#endif
void bt_mesh_pb_adv_recv(struct net_buf_simple *buf);
bool bt_prov_active(void);
@ -31,4 +35,8 @@ int bt_mesh_prov_deinit(void);
void bt_mesh_prov_complete(u16_t net_idx, const u8_t net_key[16], u16_t addr, u8_t flags, u32_t iv_index);
void bt_mesh_prov_reset(void);
#ifdef __cplusplus
}
#endif
#endif /* _PROV_H_ */

View file

@ -18,6 +18,10 @@
#include "net.h"
#include "mesh_bearer_adapt.h"
#ifdef __cplusplus
extern "C" {
#endif
#define BLE_MESH_INVALID_NODE_INDEX 0xFFFF
#define BLE_MESH_NODE_NAME_SIZE 31
@ -138,4 +142,8 @@ const u8_t *bt_mesh_get_fast_prov_net_key(u16_t net_idx);
const u8_t *bt_mesh_get_fast_prov_app_key(u16_t net_idx, u16_t app_idx);
#ifdef __cplusplus
}
#endif
#endif /* _PROVISIONER_MAIN_H_ */

View file

@ -18,6 +18,10 @@
#include "mesh_main.h"
#include "mesh_bearer_adapt.h"
#ifdef __cplusplus
extern "C" {
#endif
#if !CONFIG_BLE_MESH_PROVISIONER
#define CONFIG_BLE_MESH_PBA_SAME_TIME 0
@ -413,4 +417,8 @@ u8_t bt_mesh_set_fast_prov_unicast_addr_range(u16_t min, u16_t max);
*/
void bt_mesh_set_fast_prov_flags_iv_index(u8_t flags, u32_t iv_index);
#ifdef __cplusplus
}
#endif
#endif /* _PROVISIONER_PROV_H_ */

View file

@ -18,6 +18,10 @@
#include "net.h"
#include "mesh_bearer_adapt.h"
#ifdef __cplusplus
extern "C" {
#endif
#define BLE_MESH_PROXY_ADV_NET_ID 0x00
#define BLE_MESH_PROXY_ADV_NODE_ID 0x01
@ -100,4 +104,8 @@ int bt_mesh_proxy_client_send_cfg(u8_t conn_handle, u16_t net_idx, struct bt_mes
int bt_mesh_proxy_prov_client_init(void);
int bt_mesh_proxy_prov_client_deinit(void);
#ifdef __cplusplus
}
#endif
#endif /* _PROXY_CLIENT_H_ */

View file

@ -13,6 +13,10 @@
#include "net.h"
#include "mesh_bearer_adapt.h"
#ifdef __cplusplus
extern "C" {
#endif
#define BLE_MESH_PROXY_NET_PDU 0x00
#define BLE_MESH_PROXY_BEACON 0x01
#define BLE_MESH_PROXY_CONFIG 0x02
@ -62,4 +66,8 @@ void bt_mesh_proxy_addr_add(struct net_buf_simple *buf, u16_t addr);
int bt_mesh_proxy_init(void);
int bt_mesh_proxy_deinit(void);
#ifdef __cplusplus
}
#endif
#endif /* _PROXY_H_ */

View file

@ -10,6 +10,10 @@
#include "net.h"
#include "provisioner_main.h"
#ifdef __cplusplus
extern "C" {
#endif
int settings_core_init(void);
int settings_core_load(void);
int settings_core_commit(void);
@ -58,4 +62,8 @@ void bt_mesh_store_node_comp_data(struct bt_mesh_node *node, bool prov);
int bt_mesh_settings_init(void);
int bt_mesh_settings_deinit(void);
#ifdef __cplusplus
}
#endif
#endif /* _SETTINGS_H_ */

View file

@ -12,6 +12,10 @@
#include "mesh_bearer_adapt.h"
#ifdef __cplusplus
extern "C" {
#endif
int bt_mesh_test(void);
struct bt_mesh_device_network_info {
@ -41,4 +45,8 @@ int bt_mesh_test_start_scanning(bool wl_en);
int bt_mesh_test_stop_scanning(void);
#ifdef __cplusplus
}
#endif
#endif /* _BLE_MESH_TEST_H_ */

View file

@ -12,6 +12,10 @@
#include "net.h"
#ifdef __cplusplus
extern "C" {
#endif
#define TRANS_SEQ_AUTH_NVAL 0xffffffffffffffff
#define BLE_MESH_TX_SDU_MAX (CONFIG_BLE_MESH_TX_SEG_MAX * 12)
@ -114,4 +118,8 @@ void bt_mesh_heartbeat_send(void);
int bt_mesh_app_key_get(const struct bt_mesh_subnet *subnet, u16_t app_idx,
const u8_t **key, u8_t *aid, u8_t role, u16_t dst);
#ifdef __cplusplus
}
#endif
#endif /* _TRANSPORT_H_ */

View file

@ -17,6 +17,10 @@
#include "mesh_access.h"
#ifdef __cplusplus
extern "C" {
#endif
/** Client model opcode pair table */
typedef struct {
u32_t cli_op; /* Client message opcode */
@ -127,5 +131,9 @@ typedef struct {
*/
int bt_mesh_set_client_model_role(bt_mesh_role_param_t *common);
#ifdef __cplusplus
}
#endif
#endif /* _CLIENT_COMMON_H_ */

View file

@ -21,6 +21,10 @@
#include "client_common.h"
#ifdef __cplusplus
extern "C" {
#endif
/* Generic client model common structure */
typedef bt_mesh_client_user_data_t bt_mesh_generic_client_t;
typedef bt_mesh_client_internal_data_t generic_internal_data_t;
@ -566,4 +570,8 @@ int bt_mesh_generic_client_get_state(bt_mesh_client_common_param_t *common, void
*/
int bt_mesh_generic_client_set_state(bt_mesh_client_common_param_t *common, void *set, void *status);
#ifdef __cplusplus
}
#endif
#endif /* _GENERIC_CLIENT_H_ */

View file

@ -21,6 +21,10 @@
#include "client_common.h"
#ifdef __cplusplus
extern "C" {
#endif
/* Light client model common structure */
typedef bt_mesh_client_user_data_t bt_mesh_light_client_t;
typedef bt_mesh_client_internal_data_t light_internal_data_t;
@ -536,4 +540,8 @@ int bt_mesh_light_client_get_state(bt_mesh_client_common_param_t *common, void *
*/
int bt_mesh_light_client_set_state(bt_mesh_client_common_param_t *common, void *set, void *status);
#ifdef __cplusplus
}
#endif
#endif /* _LIGHTING_CLIENT_H_ */

View file

@ -21,6 +21,10 @@
#include "client_common.h"
#ifdef __cplusplus
extern "C" {
#endif
/* Sensor Client Model Context */
extern const struct bt_mesh_model_op sensor_cli_op[];
@ -171,4 +175,8 @@ int bt_mesh_sensor_client_get_state(bt_mesh_client_common_param_t *common, void
*/
int bt_mesh_sensor_client_set_state(bt_mesh_client_common_param_t *common, void *set, void *status);
#ifdef __cplusplus
}
#endif
#endif /* _SENSOR_CLIENT_H_ */

View file

@ -21,6 +21,10 @@
#include "client_common.h"
#ifdef __cplusplus
extern "C" {
#endif
/* Time scene client model common structure */
typedef bt_mesh_client_user_data_t bt_mesh_time_scene_client_t;
typedef bt_mesh_client_internal_data_t time_scene_internal_data_t;
@ -281,4 +285,8 @@ int bt_mesh_time_scene_client_get_state(bt_mesh_client_common_param_t *common, v
*/
int bt_mesh_time_scene_client_set_state(bt_mesh_client_common_param_t *common, void *set, void *status);
#ifdef __cplusplus
}
#endif
#endif /* _TIME_SCENE_CLIENT_H_ */

View file

@ -17,6 +17,10 @@
#include "mesh_access.h"
#ifdef __cplusplus
extern "C" {
#endif
/* Generic OnOff Message Opcode */
#define BLE_MESH_MODEL_OP_GEN_ONOFF_GET BLE_MESH_MODEL_OP_2(0x82, 0x01)
#define BLE_MESH_MODEL_OP_GEN_ONOFF_SET BLE_MESH_MODEL_OP_2(0x82, 0x02)
@ -273,4 +277,8 @@
#define BLE_MESH_MODEL_OP_LIGHT_LC_PROPERTY_SET_UNACK BLE_MESH_MODEL_OP_1(0x63)
#define BLE_MESH_MODEL_OP_LIGHT_LC_PROPERTY_STATUS BLE_MESH_MODEL_OP_1(0x64)
#ifdef __cplusplus
}
#endif
#endif /* _MODEL_OPCODE_H_ */

View file

@ -17,6 +17,10 @@
#include "mesh_types.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* BLE Mesh Device Properties.
*
@ -1042,4 +1046,8 @@ typedef u16_t bt_mesh_volume_flow_t;
u8_t bt_mesh_get_dev_prop_len(u16_t prop_id);
#ifdef __cplusplus
}
#endif
#endif /* _DEVICE_PROPERTY_H_ */

View file

@ -11,6 +11,10 @@
#include "server_common.h"
#ifdef __cplusplus
extern "C" {
#endif
struct bt_mesh_gen_onoff_state {
u8_t onoff;
u8_t target_onoff;
@ -386,4 +390,8 @@ int bt_mesh_gen_admin_prop_srv_deinit(struct bt_mesh_model *model, bool primary)
int bt_mesh_gen_manu_prop_srv_deinit(struct bt_mesh_model *model, bool primary);
int bt_mesh_gen_client_prop_srv_deinit(struct bt_mesh_model *model, bool primary);
#ifdef __cplusplus
}
#endif
#endif /* _GENERIC_SERVER_H_ */

View file

@ -11,6 +11,10 @@
#include "server_common.h"
#ifdef __cplusplus
extern "C" {
#endif
struct bt_mesh_light_lightness_state {
u16_t lightness_linear;
u16_t target_lightness_linear;
@ -527,4 +531,8 @@ int bt_mesh_light_xyl_setup_srv_deinit(struct bt_mesh_model *model, bool primary
int bt_mesh_light_lc_srv_deinit(struct bt_mesh_model *model, bool primary);
int bt_mesh_light_lc_setup_srv_deinit(struct bt_mesh_model *model, bool primary);
#ifdef __cplusplus
}
#endif
#endif /* _LIGHTING_SERVER_H_ */

View file

@ -17,6 +17,10 @@
#include "server_common.h"
#ifdef __cplusplus
extern "C" {
#endif
/* Sensor Property ID related */
#define INVALID_SENSOR_PROPERTY_ID 0x0000
@ -249,4 +253,8 @@ int bt_mesh_sensor_setup_srv_init(struct bt_mesh_model *model, bool primary);
int bt_mesh_sensor_srv_deinit(struct bt_mesh_model *model, bool primary);
int bt_mesh_sensor_setup_srv_deinit(struct bt_mesh_model *model, bool primary);
#ifdef __cplusplus
}
#endif
#endif /* _SENSOR_SERVER_H_ */

View file

@ -19,6 +19,10 @@
#include <stdint.h>
#include "mesh_access.h"
#ifdef __cplusplus
extern "C" {
#endif
#define BLE_MESH_SERVER_RSP_MAX_LEN 384
#define BLE_MESH_SERVER_TRANS_MIC_SIZE 4
@ -123,4 +127,8 @@ void bt_mesh_server_update_last_msg(struct bt_mesh_last_msg_info *last,
struct net_buf_simple *bt_mesh_server_get_pub_msg(struct bt_mesh_model *model, u16_t msg_len);
#ifdef __cplusplus
}
#endif
#endif /* _SERVER_COMMON_H_ */

View file

@ -11,6 +11,10 @@
#include "mesh_access.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef enum {
GENERIC_ONOFF_STATE,
GENERIC_LEVEL_STATE,
@ -91,4 +95,8 @@ int bt_mesh_update_binding_state(struct bt_mesh_model *model,
bt_mesh_server_state_type_t type,
bt_mesh_server_state_value_t *value);
#ifdef __cplusplus
}
#endif
#endif /* _STATE_BINDING_H_ */

View file

@ -15,6 +15,10 @@
#include "lighting_server.h"
#include "time_scene_server.h"
#ifdef __cplusplus
extern "C" {
#endif
void bt_mesh_server_calc_remain_time(struct bt_mesh_state_transition *transition);
/* APIs used to get server model transtion time values */
@ -89,4 +93,8 @@ void bt_mesh_server_stop_transition(struct bt_mesh_state_transition *transition)
void bt_mesh_server_start_transition(struct bt_mesh_state_transition *transition);
#ifdef __cplusplus
}
#endif
#endif /* _STATE_TRANSITION_H_ */

View file

@ -17,6 +17,10 @@
#include "server_common.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* 1. Mesh defines times based on International Atomic Time (TAI). The base
* representation of times is the number of seconds after 00:00:00 TAI
@ -395,4 +399,8 @@ int bt_mesh_scene_setup_srv_deinit(struct bt_mesh_model *model, bool primary);
int bt_mesh_scheduler_srv_deinit(struct bt_mesh_model *model, bool primary);
int bt_mesh_scheduler_setup_srv_deinit(struct bt_mesh_model *model, bool primary);
#ifdef __cplusplus
}
#endif
#endif /* _TIME_SCENE_SERVER_H_ */