nRF5 SDK for Mesh v1.0.1
nrf_mesh_node_config.h
1 /* Copyright (c) 2010 - 2017, Nordic Semiconductor ASA
2  * All rights reserved.
3  *
4  * Redistribution and use in source and binary forms, with or without modification,
5  * are permitted provided that the following conditions are met:
6  *
7  * 1. Redistributions of source code must retain the above copyright notice, this
8  * list of conditions and the following disclaimer.
9  *
10  * 2. Redistributions in binary form, except as embedded into a Nordic
11  * Semiconductor ASA integrated circuit in a product or a software update for
12  * such product, must reproduce the above copyright notice, this list of
13  * conditions and the following disclaimer in the documentation and/or other
14  * materials provided with the distribution.
15  *
16  * 3. Neither the name of Nordic Semiconductor ASA nor the names of its
17  * contributors may be used to endorse or promote products derived from this
18  * software without specific prior written permission.
19  *
20  * 4. This software, with or without modification, must only be used with a
21  * Nordic Semiconductor ASA integrated circuit.
22  *
23  * 5. Any software provided in binary form under this license must not be reverse
24  * engineered, decompiled, modified and/or disassembled.
25  *
26  * THIS SOFTWARE IS PROVIDED BY NORDIC SEMICONDUCTOR ASA "AS IS" AND ANY EXPRESS
27  * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
28  * OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE ARE
29  * DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA OR CONTRIBUTORS BE
30  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
31  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
32  * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
33  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
34  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
35  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36  */
37 
38 #ifndef NRF_MESH_NODE_CONFIG_H__
39 #define NRF_MESH_NODE_CONFIG_H__
40 
41 #include <stdint.h>
42 
43 #include "nrf.h"
44 #include "nrf_sdm.h"
45 
46 #include "nrf_mesh.h"
47 #include "nrf_mesh_defines.h"
48 #include "nrf_mesh_prov.h"
49 
50 #include "config_server_events.h"
51 #include "health_server.h"
52 
68 /* This allows us to use the same typenames for all versions of the SoftDevice: */
69 #if defined(S110)
70 #define nrf_fault_handler_t softdevice_assertion_handler_t
71 #define nrf_clock_lf_cfg_t nrf_clock_lfclksrc_t
72 #endif
73 
87 typedef void (*nrf_mesh_node_config_complete_cb_t)(void * p_data);
88 
97 typedef void (*nrf_mesh_node_config_setup_cb_t)(void * p_data);
98 
106 typedef struct
107 {
118 
126 
137 
141  void * p_data;
142 
148  nrf_clock_lf_cfg_t lf_clk_cfg;
149 
155  nrf_fault_handler_t sd_assertion_handler;
156 
165 
174 
186 
190  uint8_t num_selftests;
191 
199 
205  const char * p_device_uri;
206 
214 
221  const uint8_t * p_static_data;
222 
228  uint8_t irq_priority;
230 
247 uint32_t nrf_mesh_node_config(const nrf_mesh_node_config_params_t * p_params);
248 
253 void nrf_mesh_node_config_clear(void);
254 
259 #endif
nrf_mesh_prov_oob_caps_t prov_caps
Device capabilities for OOB authentication.
Node configuration parameters.
void * p_data
Data pointer to pass to the callback functions.
health_server_attention_cb_t attention_cb
Attention callback function.
nrf_clock_lf_cfg_t lf_clk_cfg
Low frequency clock configuration.
uint8_t irq_priority
Application IRQ priority.
config_server_evt_cb_t config_server_callback
Pointer to a function used to inform about events from the configuration server.
nrf_mesh_node_config_complete_cb_t complete_callback
Pointer to a function used to signal the completion of the node configuration procedure.
nrf_mesh_assertion_handler_t mesh_assertion_handler
Handler for mesh assertions.
nrf_fault_handler_t sd_assertion_handler
Handler for SoftDevice assertions.
void(* nrf_mesh_node_config_setup_cb_t)(void *p_data)
Setup callback.
void nrf_mesh_node_config_clear(void)
Clears the saved configuration and network state of the mesh node.
void(* config_server_evt_cb_t)(const config_server_evt_t *p_evt)
Config server event callback type.
Provisioning authentication capabilities.
uint16_t oob_info_sources
Device OOB information sources.
void(* nrf_mesh_node_config_complete_cb_t)(void *p_data)
Configuration complete callback.
void(* health_server_attention_cb_t)(const health_server_t *p_server, bool attention_state)
Callback function for the attention state.
Definition: health_server.h:71
void(* nrf_mesh_assertion_handler_t)(uint32_t pc)
Mesh assertion handler type.
Definition: nrf_mesh.h:76
nrf_mesh_node_config_setup_cb_t setup_callback
Pointer to a function used to allow initialization of application-specific models.
const uint8_t * p_static_data
Data used for OOB authentication when the static authentication method is used.
uint8_t num_selftests
Number of self-tests provided by p_selftest_array.
const char * p_device_uri
NULL-terminated device URI string.
uint32_t nrf_mesh_node_config(const nrf_mesh_node_config_params_t *p_params)
Configures the mesh node.
Structure defining a self-test function.
Definition: health_server.h:92
const health_server_selftest_t * p_selftest_array
Self-test function array.

Documentation feedback | Developer Zone | Subscribe | Updated