nRF5 SDK for Mesh v5.0.0
access_config.h
1 /* Copyright (c) 2010 - 2020, 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 ACCESS_CONFIG_H__
39 #define ACCESS_CONFIG_H__
40 
41 #include <stdint.h>
42 #include "access.h"
43 #include "access_status.h"
44 #include "device_state_manager.h"
45 
71 uint32_t access_load_config_apply(void);
72 
80 uint32_t access_default_ttl_set(uint8_t ttl);
81 
86 uint8_t access_default_ttl_get(void);
87 
105  dsm_handle_t address_handle);
115 
126 
141  dsm_handle_t * p_address_handle);
142 
153  access_publish_retransmit_t retransmit_params);
154 
167  access_publish_retransmit_t * p_retransmit_params);
168 
183 uint32_t access_model_publish_period_divisor_set(access_model_handle_t handle, uint16_t publish_divisor);
184 
204  access_publish_resolution_t resolution,
205  uint8_t step_number);
206 
219  access_publish_resolution_t * p_resolution,
220  uint8_t * p_step_number);
221 
233 uint32_t access_model_subscription_add(access_model_handle_t handle, dsm_handle_t address_handle);
234 
247 
263  dsm_handle_t * p_address_handles,
264  uint16_t * p_count);
265 
277 
289 
304  dsm_handle_t * p_appkey_handles,
305  uint16_t * p_count);
306 
320  dsm_handle_t appkey_handle);
321 
333  dsm_handle_t * p_appkey_handle);
334 
345 
357 
368 uint32_t access_model_publish_ttl_set(access_model_handle_t handle, uint8_t ttl);
369 
380 uint32_t access_model_publish_ttl_get(access_model_handle_t handle, uint8_t * p_ttl);
381 
392 uint32_t access_model_id_get(access_model_handle_t handle, access_model_id_t * p_model_id);
393 
404 uint32_t access_model_p_args_get(access_model_handle_t handle, void ** pp_args);
405 
421 
439 
460 
481 uint32_t access_element_location_set(uint16_t element_index, uint16_t location);
482 
496 uint32_t access_element_location_get(uint16_t element_index, uint16_t * p_location);
497 
508 uint32_t access_element_sig_model_count_get(uint16_t element_index, uint8_t * p_sig_model_count);
509 
520 uint32_t access_element_vendor_model_count_get(uint16_t element_index, uint8_t * p_vendor_model_count);
521 
534 uint32_t access_element_models_get(uint16_t element_index, access_model_handle_t * p_models, uint16_t * p_count);
535 
550 uint32_t access_handle_get(uint16_t element_index, access_model_id_t model_id, access_model_handle_t * p_handle);
551 
553 #endif /* ACCESS_CONFIG_H__ */
uint32_t access_model_publish_address_get(access_model_handle_t handle, dsm_handle_t *p_address_handle)
Gets the current publish address for the given model.
uint32_t access_model_publish_application_set(access_model_handle_t handle, dsm_handle_t appkey_handle)
Sets the application key to be used when publishing for the given model.
uint32_t access_model_subscription_list_alloc(access_model_handle_t handle)
Allocates a subscription list for a model.
uint16_t access_model_handle_t
Access layer handle type.
Definition: access.h:162
uint32_t access_model_publish_retransmit_set(access_model_handle_t handle, access_publish_retransmit_t retransmit_params)
Sets the publish retransmit parameters for the given model.
uint32_t access_model_subscription_remove(access_model_handle_t handle, dsm_handle_t address_handle)
Removes a subscription from a model.
uint32_t access_model_subscriptions_get(access_model_handle_t handle, dsm_handle_t *p_address_handles, uint16_t *p_count)
Gets the address handles for the subscription addresses bound to a model.
uint32_t access_element_location_get(uint16_t element_index, uint16_t *p_location)
Gets the location descriptor for an element.
uint32_t access_model_publish_ttl_set(access_model_handle_t handle, uint8_t ttl)
Sets the default publication TTL value for the given model.
Model publish retransmit structure.
Definition: access.h:310
uint16_t dsm_handle_t
DSM handle type, used for the handles returned for the each set of data added.
uint32_t access_model_publish_ttl_get(access_model_handle_t handle, uint8_t *p_ttl)
Gets the default publication TTL value for the given model.
access_publish_resolution_t
Periodic publishing step resolution.
Definition: access.h:321
uint32_t access_model_publish_period_divisor_set(access_model_handle_t handle, uint16_t publish_divisor)
Sets the publish period divisor.
uint32_t access_model_application_bind(access_model_handle_t handle, dsm_handle_t appkey_handle)
Binds an application key to a model.
uint32_t access_model_id_get(access_model_handle_t handle, access_model_id_t *p_model_id)
Gets the model ID of for the given model.
uint32_t access_default_ttl_set(uint8_t ttl)
Sets the default TTL for the node.
uint32_t access_model_applications_get(access_model_handle_t handle, dsm_handle_t *p_appkey_handles, uint16_t *p_count)
Gets the applications bound to a model.
uint32_t access_model_application_unbind(access_model_handle_t handle, dsm_handle_t appkey_handle)
Unbinds an application key from a model.
uint32_t access_model_subscription_lists_share(access_model_handle_t owner, access_model_handle_t other)
Shares the subscription lists for two models.
uint32_t access_load_config_apply(void)
Applies data loaded from the mesh configuration system on the access layer structures.
uint32_t access_model_publish_address_set(access_model_handle_t handle, dsm_handle_t address_handle)
Changes the publish address for the given model.
uint32_t access_model_publish_retransmit_get(access_model_handle_t handle, access_publish_retransmit_t *p_retransmit_params)
Gets the current publish retransmit parameters for the given model.
uint32_t access_element_sig_model_count_get(uint16_t element_index, uint8_t *p_sig_model_count)
Gets the number of Bluetooth SIG models for an element.
uint32_t access_model_publication_stop(access_model_handle_t handle)
Stops the publication with the resetting of states for the given model.
uint32_t access_model_publish_period_set(access_model_handle_t handle, access_publish_resolution_t resolution, uint8_t step_number)
Sets the publish period for the given model.
uint32_t access_model_subscription_add(access_model_handle_t handle, dsm_handle_t address_handle)
Adds a subscription to a model.
uint8_t access_default_ttl_get(void)
Gets the default TTL for the node.
uint32_t access_handle_get(uint16_t element_index, access_model_id_t model_id, access_model_handle_t *p_handle)
Gets the access handle for the given model instance based on element index and model ID...
uint32_t access_element_models_get(uint16_t element_index, access_model_handle_t *p_models, uint16_t *p_count)
Gets the array of handles corresponding to an element.
uint32_t access_model_publication_by_appkey_stop(dsm_handle_t appkey_handle)
Stops the publication with the resetting of states for all models which are bound to the appkey_handl...
uint32_t access_model_publish_application_get(access_model_handle_t handle, dsm_handle_t *p_appkey_handle)
Gets the application key used when publishing for the given model.
Access layer model ID.
Definition: access.h:151
uint32_t access_element_location_set(uint16_t element_index, uint16_t location)
Sets the location descriptor for an element.
uint32_t access_model_publish_period_get(access_model_handle_t handle, access_publish_resolution_t *p_resolution, uint8_t *p_step_number)
Gets the publish period for the given model.
uint32_t access_model_subscription_list_dealloc(access_model_handle_t handle)
De-allocates a subscription list for a model.
uint32_t access_model_publish_friendship_credential_flag_set(access_model_handle_t handle, bool flag)
Sets the friendship credentials flag value for the given model.
uint32_t access_model_publish_friendship_credential_flag_get(access_model_handle_t handle, bool *p_flag)
Gets the friendship credentials flag value for the given model.
uint32_t access_model_p_args_get(access_model_handle_t handle, void **pp_args)
Gets the generic argument pointer bound to the given model.
uint32_t access_element_vendor_model_count_get(uint16_t element_index, uint8_t *p_vendor_model_count)
Gets the number of vendor specific models for an element.

Documentation feedback | Developer Zone | Subscribe | Updated