nimble_autoconn_params.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2019 Freie Universität Berlin
3  *
4  * This file is subject to the terms and conditions of the GNU Lesser
5  * General Public License v2.1. See the file LICENSE in the top level
6  * directory for more details.
7  */
8 
19 #ifndef NIMBLE_AUTOCONN_PARAMS_H
20 #define NIMBLE_AUTOCONN_PARAMS_H
21 
22 #ifdef __cplusplus
23 extern "C" {
24 #endif
25 
30 #ifndef NIMBLE_AUTOCONN_PERIOD_SCAN_MS
31 #define NIMBLE_AUTOCONN_PERIOD_SCAN_MS (2000U) /* 2s */
32 #endif
33 #ifndef NIMBLE_AUTOCONN_PERIOD_ADV_MS
34 #define NIMBLE_AUTOCONN_PERIOD_ADV_MS (10000U) /* 10s */
35 #endif
36 #ifndef NIMBLE_AUTOCONN_PERIOD_JITTER_MS
37 #define NIMBLE_AUTOCONN_PERIOD_JITTER_MS (5000U) /* 0-5s */
38 #endif
39 
40 #ifndef NIMBLE_AUTOCONN_ADV_ITVL_MS
41 #define NIMBLE_AUTOCONN_ADV_ITVL_MS (100U) /* 100ms */
42 #endif
43 
44 #ifndef NIMBLE_AUTOCONN_SCAN_ITVL_MS
45 #define NIMBLE_AUTOCONN_SCAN_ITVL_MS (1500U) /* 1.5s */
46 #endif
47 #ifndef NIMBLE_AUTOCONN_SCAN_WIN_MS
48 #define NIMBLE_AUTOCONN_SCAN_WIN_MS (110U) /* 110ms */
49 #endif
50 
51 #ifndef NIMBLE_AUTOCONN_CONN_TIMEOUT_MS
52 #define NIMBLE_AUTOCONN_CONN_TIMEOUT_MS (3 * NIMBLE_AUTOCONN_SCAN_WIN_MS)
53 #endif
54 #ifndef NIMBLE_AUTOCONN_CONN_ITVL_MIN_MS
55 #define NIMBLE_AUTOCONN_CONN_ITVL_MIN_MS 75U /* 75ms */
56 #endif
57 #ifndef NIMBLE_AUTOCONN_CONN_ITVL_MAX_MS
58 #define NIMBLE_AUTOCONN_CONN_ITVL_MAX_MS 75U /* 75ms */
59 #endif
60 #ifndef NIMBLE_AUTOCONN_CONN_LATENCY
61 #define NIMBLE_AUTOCONN_CONN_LATENCY (0)
62 #endif
63 #ifndef NIMBLE_AUTOCONN_CONN_SVTO_MS
64 #define NIMBLE_AUTOCONN_CONN_SVTO_MS (2500U) /* 2.5s */
65 #endif
66 
70 #ifndef NIMBLE_AUTOCONN_PHY_MODE
71 #define NIMBLE_AUTOCONN_PHY_MODE NIMBLE_PHY_1M
72 #endif
73 
74 #ifndef NIMBLE_AUTOCONN_NODE_ID
75 #define NIMBLE_AUTOCONN_NODE_ID "RIOT-autoconn"
76 #endif
77 
78 #ifndef NIMBLE_AUTOCONN_PARAMS
79 #define NIMBLE_AUTOCONN_PARAMS \
80  { .period_scan_ms = NIMBLE_AUTOCONN_PERIOD_SCAN_MS, \
81  .period_adv_ms = NIMBLE_AUTOCONN_PERIOD_ADV_MS, \
82  .period_jitter_ms = NIMBLE_AUTOCONN_PERIOD_JITTER_MS, \
83  .adv_itvl_ms = NIMBLE_AUTOCONN_ADV_ITVL_MS, \
84  .scan_itvl_ms = NIMBLE_AUTOCONN_SCAN_ITVL_MS, \
85  .scan_win_ms = NIMBLE_AUTOCONN_SCAN_WIN_MS, \
86  .conn_timeout_ms = NIMBLE_AUTOCONN_CONN_TIMEOUT_MS, \
87  .conn_itvl_min_ms = NIMBLE_AUTOCONN_CONN_ITVL_MIN_MS, \
88  .conn_itvl_max_ms = NIMBLE_AUTOCONN_CONN_ITVL_MAX_MS, \
89  .conn_latency = NIMBLE_AUTOCONN_CONN_LATENCY, \
90  .conn_super_to_ms = NIMBLE_AUTOCONN_CONN_SVTO_MS, \
91  .phy_mode = NIMBLE_AUTOCONN_PHY_MODE, \
92  .node_id = NIMBLE_AUTOCONN_NODE_ID, }
93 #endif
100  NIMBLE_AUTOCONN_PARAMS;
101 
102 #ifdef __cplusplus
103 }
104 #endif
105 
106 #endif /* NIMBLE_AUTOCONN_PARAMS_H */
static const nimble_autoconn_params_t nimble_autoconn_params
nimble_netif_autoconn configuration
Set of configuration parameters needed to run autoconn.