1cc2a5f42SMilanka Ringwald /* 2cc2a5f42SMilanka Ringwald * Copyright (C) 2019 BlueKitchen GmbH 3cc2a5f42SMilanka Ringwald * 4cc2a5f42SMilanka Ringwald * Redistribution and use in source and binary forms, with or without 5cc2a5f42SMilanka Ringwald * modification, are permitted provided that the following conditions 6cc2a5f42SMilanka Ringwald * are met: 7cc2a5f42SMilanka Ringwald * 8cc2a5f42SMilanka Ringwald * 1. Redistributions of source code must retain the above copyright 9cc2a5f42SMilanka Ringwald * notice, this list of conditions and the following disclaimer. 10cc2a5f42SMilanka Ringwald * 2. Redistributions in binary form must reproduce the above copyright 11cc2a5f42SMilanka Ringwald * notice, this list of conditions and the following disclaimer in the 12cc2a5f42SMilanka Ringwald * documentation and/or other materials provided with the distribution. 13cc2a5f42SMilanka Ringwald * 3. Neither the name of the copyright holders nor the names of 14cc2a5f42SMilanka Ringwald * contributors may be used to endorse or promote products derived 15cc2a5f42SMilanka Ringwald * from this software without specific prior written permission. 16cc2a5f42SMilanka Ringwald * 4. Any redistribution, use, or modification is done solely for 17cc2a5f42SMilanka Ringwald * personal benefit and not for any commercial purpose or for 18cc2a5f42SMilanka Ringwald * monetary gain. 19cc2a5f42SMilanka Ringwald * 20cc2a5f42SMilanka Ringwald * THIS SOFTWARE IS PROVIDED BY BLUEKITCHEN GMBH AND CONTRIBUTORS 21cc2a5f42SMilanka Ringwald * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22cc2a5f42SMilanka Ringwald * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 23cc2a5f42SMilanka Ringwald * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL MATTHIAS 24cc2a5f42SMilanka Ringwald * RINGWALD OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 25cc2a5f42SMilanka Ringwald * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 26cc2a5f42SMilanka Ringwald * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS 27cc2a5f42SMilanka Ringwald * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 28cc2a5f42SMilanka Ringwald * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 29cc2a5f42SMilanka Ringwald * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF 30cc2a5f42SMilanka Ringwald * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31cc2a5f42SMilanka Ringwald * SUCH DAMAGE. 32cc2a5f42SMilanka Ringwald * 33cc2a5f42SMilanka Ringwald * Please inquire about commercial licensing options at 34cc2a5f42SMilanka Ringwald * [email protected] 35cc2a5f42SMilanka Ringwald * 36cc2a5f42SMilanka Ringwald */ 37cc2a5f42SMilanka Ringwald 38cc2a5f42SMilanka Ringwald #ifndef __MESH_CONFIGURATION_CLIENT_H 39cc2a5f42SMilanka Ringwald #define __MESH_CONFIGURATION_CLIENT_H 40cc2a5f42SMilanka Ringwald 41cc2a5f42SMilanka Ringwald #include <stdint.h> 42cc2a5f42SMilanka Ringwald 43cc2a5f42SMilanka Ringwald #include "mesh/mesh_access.h" 44cc2a5f42SMilanka Ringwald 45cc2a5f42SMilanka Ringwald #ifdef __cplusplus 46cc2a5f42SMilanka Ringwald extern "C" 47cc2a5f42SMilanka Ringwald { 48cc2a5f42SMilanka Ringwald #endif 49cc2a5f42SMilanka Ringwald 50cc2a5f42SMilanka Ringwald /** 51cc2a5f42SMilanka Ringwald * @brief Register packet handler 52cc2a5f42SMilanka Ringwald * @param configuration_client_model 53cc2a5f42SMilanka Ringwald * @param events_packet_handler 54cc2a5f42SMilanka Ringwald */ 55aaf0c1d1SMilanka Ringwald void mesh_configuration_client_register_packet_handler(mesh_model_t *configuration_client_model, btstack_packet_handler_t events_packet_handler); 56aaf0c1d1SMilanka Ringwald 57aaf0c1d1SMilanka Ringwald /** 58*5448198cSMilanka Ringwald * @brief Get the current Secure Network Beacon state of a node. 59aaf0c1d1SMilanka Ringwald * @param mesh_model 60aaf0c1d1SMilanka Ringwald * @param dest 61aaf0c1d1SMilanka Ringwald * @param netkey_index 62aaf0c1d1SMilanka Ringwald * @param appkey_index 63*5448198cSMilanka Ringwald * @return status ERROR_CODE_SUCCESS if successful, otherwise BTSTACK_MEMORY_ALLOC_FAILED or ERROR_CODE_PARAMETER_OUT_OF_MANDATORY_RANGE 64aaf0c1d1SMilanka Ringwald */ 65699be93dSMilanka Ringwald uint8_t mesh_configuration_client_send_message_config_beacon_get(mesh_model_t * mesh_model, uint16_t dest, uint16_t netkey_index, uint16_t appkey_index); 66cc2a5f42SMilanka Ringwald 67*5448198cSMilanka Ringwald /** 68*5448198cSMilanka Ringwald * @brief Get the current Secure Network Beacon state of a node. 69*5448198cSMilanka Ringwald * @param mesh_model 70*5448198cSMilanka Ringwald * @param dest 71*5448198cSMilanka Ringwald * @param netkey_index 72*5448198cSMilanka Ringwald * @param appkey_index 73*5448198cSMilanka Ringwald * @param Beacon 0x01 The node is broadcasting a Secure Network beacon, 0x00 broadcastinis off 74*5448198cSMilanka Ringwald * @return status ERROR_CODE_SUCCESS if successful, otherwise BTSTACK_MEMORY_ALLOC_FAILED or ERROR_CODE_PARAMETER_OUT_OF_MANDATORY_RANGE 75*5448198cSMilanka Ringwald */ 76*5448198cSMilanka Ringwald uint8_t mesh_configuration_client_send_message_config_beacon_set(mesh_model_t * mesh_model, uint16_t dest, uint16_t netkey_index, uint16_t appkey_index, uint8_t beacon); 77cc2a5f42SMilanka Ringwald 78cc2a5f42SMilanka Ringwald #ifdef __cplusplus 79cc2a5f42SMilanka Ringwald } /* end of extern "C" */ 80cc2a5f42SMilanka Ringwald #endif 81cc2a5f42SMilanka Ringwald 82cc2a5f42SMilanka Ringwald #endif 83