nRF5 SDK for Mesh v5.0.0
nrf_mesh_prov_bearer_adv.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 NRF_MESH_PROV_BEARER_ADV_H__
39 #define NRF_MESH_PROV_BEARER_ADV_H__
40 
41 #include "prov_bearer_adv.h"
42 
43 #include <stdint.h>
44 #include <stdbool.h>
45 #include <stdio.h>
46 #include "nrf_mesh_config_prov.h"
47 #include "nrf_mesh_prov_bearer.h"
48 #include "advertiser.h"
49 #include "timer_scheduler.h"
50 
65 typedef struct prov_bearer_adv
66 {
68  uint32_t link_id;
69  prov_bearer_adv_instance_t instance_state;
70  prov_bearer_adv_state_t state;
71  uint8_t transaction_in;
72  uint8_t transaction_out;
74  timer_event_t timeout_event;
75  timer_event_t link_timeout_event;
76  uint32_t sar_timeout;
77  uint32_t link_timeout;
78  prov_bearer_adv_buffer_t buffer;
79  uint8_t tx_buffer[NRF_MESH_PROV_BEARER_ADV_TX_BUFFER_SIZE] __attribute__((aligned(WORD_SIZE)));
82  prov_bearer_t prov_bearer;
83  struct prov_bearer_adv * p_next;
85 
96 
98 #endif /* NRF_MESH_PROV_BEARER_ADV_H__ */
prov_bearer_adv_instance_t instance_state
State identifier for the struct instance.
timer_event_t link_timeout_event
State structure for the link timeout timer.
bool queue_empty_pending
Flag indicating whether a queue empty event is pending.
prov_bearer_adv_buffer_t buffer
Buffer structure for ongoing transfer.
nrf_mesh_tx_token_t last_token
Token of the last packet sent to the advertiser.
timer_event_t timeout_event
State structure for the timeout timer.
nrf_mesh_prov_link_close_reason_t
Reason for why a provisioning link was closed.
struct __attribute__((packed))
Provisioning data required by the remote provisioning client for command type SERIAL_PB_REMOTE_CLIENT...
PB-ADV context structure.
prov_bearer_t * nrf_mesh_prov_bearer_adv_interface_get(nrf_mesh_prov_bearer_adv_t *p_bearer_adv)
Gets the provisioning bearer interface for the PB-ADV bearer.
struct prov_bearer_adv * p_next
Pointer to the next active PB-ADV link.
advertiser_t advertiser
Advertiser instance.
#define NRF_MESH_PROV_BEARER_ADV_TX_BUFFER_SIZE
Size of the buffer for the outgoing packet buffer for PB-ADV.
uint32_t nrf_mesh_tx_token_t
TX Token type, used as a context parameter to notify the application of ended transmissions.
Definition: nrf_mesh.h:105
uint8_t transaction_out
Transaction number for the outgoing messages.
uint32_t link_timeout
Link timeout value.
nrf_mesh_prov_link_close_reason_t close_reason
Reason for closing the link.
Provisioning bearer context.
uint32_t sar_timeout
SAR timeout value.
Single advertiser instance.
Definition: advertiser.h:126
uint32_t link_id
PB-ADV link identifier.
prov_bearer_adv_state_t state
State identifier for the PB-ADV state machine.
uint8_t transaction_in
Transaction number for the incoming messages.

Documentation feedback | Developer Zone | Subscribe | Updated