Bluetooth: Mesh: Add skeleton for Configuration Client Model

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This commit is contained in:
Johan Hedberg 2017-11-12 13:48:55 +02:00 committed by Johan Hedberg
commit 2a1e16c2a3
6 changed files with 72 additions and 0 deletions

View file

@ -19,6 +19,10 @@
#include <bluetooth/mesh/cfg_srv.h>
#include <bluetooth/mesh/health_srv.h>
#if defined(CONFIG_BT_MESH_CFG_CLI)
#include <bluetooth/mesh/cfg_cli.h>
#endif
#if defined(CONFIG_BT_MESH_GATT_PROXY)
#include <bluetooth/mesh/proxy.h>
#endif

View file

@ -0,0 +1,34 @@
/** @file
* @brief Bluetooth Mesh Configuration Client Model APIs.
*/
/*
* Copyright (c) 2017 Intel Corporation
*
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef __BT_MESH_CFG_CLI_H
#define __BT_MESH_CFG_CLI_H
/**
* @brief Bluetooth Mesh
* @defgroup bt_mesh_cfg_cli Bluetooth Mesh Configuration Client Model
* @ingroup bt_mesh
* @{
*/
/** Mesh Configuration Client Model Context */
struct bt_mesh_cli {
};
extern const struct bt_mesh_model_op bt_mesh_cfg_cli_op[];
#define BT_MESH_MODEL_CFG_CLI(cli_data) \
BT_MESH_MODEL(BT_MESH_MODEL_ID_CFG_CLI, \
bt_mesh_cfg_cli_op, NULL, cli_data)
/**
* @}
*/
#endif /* __BT_MESH_CFG_CLI_H */

View file

@ -21,6 +21,8 @@ zephyr_library_sources_ifdef(CONFIG_BT_MESH_PROV prov.c)
zephyr_library_sources_ifdef(CONFIG_BT_MESH_PROXY proxy.c)
zephyr_library_sources_ifdef(CONFIG_BT_MESH_CFG_CLI cfg_cli.c)
zephyr_library_sources_ifdef(CONFIG_BT_MESH_SELF_TEST test.c)
zephyr_library_sources_ifdef(CONFIG_BT_MESH_SHELL shell.c)

View file

@ -336,6 +336,11 @@ config BT_MESH_FRIEND_SEG_RX
endif # BT_MESH_FRIEND
config BT_MESH_CFG_CLI
bool "Support for Configuration Client Model"
help
Enable support for the configuration client model.
config BT_MESH_SHELL
bool "Enable Bluetooth Mesh shell"
select CONSOLE_SHELL

View file

@ -0,0 +1,26 @@
/* Bluetooth Mesh */
/*
* Copyright (c) 2017 Intel Corporation
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <zephyr.h>
#include <string.h>
#include <errno.h>
#include <stdbool.h>
#include <zephyr/types.h>
#include <misc/util.h>
#include <misc/byteorder.h>
#include <bluetooth/bluetooth.h>
#include <bluetooth/conn.h>
#include <bluetooth/mesh.h>
#define BT_DBG_ENABLED IS_ENABLED(CONFIG_BT_MESH_DEBUG_MODEL)
#include "common/log.h"
const struct bt_mesh_model_op bt_mesh_cfg_cli_op[] = {
BT_MESH_MODEL_OP_END,
};

View file

@ -31,6 +31,7 @@ CONFIG_BT_MESH_LPN_AUTO=n
CONFIG_BT_MESH_FRIEND=y
CONFIG_BT_MESH_FRIEND_QUEUE_SIZE=16
CONFIG_BT_MESH_ADV_BUF_COUNT=20
CONFIG_BT_MESH_CFG_CLI=y
CONFIG_BT_MESH_PB_GATT=y
CONFIG_BT_MESH_PB_ADV=y