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 
9 #pragma once
10 
21 #ifdef __cplusplus
22 extern "C" {
23 #endif
24 
29 #ifndef NIMBLE_AUTOCONN_PERIOD_SCAN_MS
30 #define NIMBLE_AUTOCONN_PERIOD_SCAN_MS (2000U) /* 2s */
31 #endif
32 #ifndef NIMBLE_AUTOCONN_PERIOD_ADV_MS
33 #define NIMBLE_AUTOCONN_PERIOD_ADV_MS (10000U) /* 10s */
34 #endif
35 #ifndef NIMBLE_AUTOCONN_PERIOD_JITTER_MS
36 #define NIMBLE_AUTOCONN_PERIOD_JITTER_MS (5000U) /* 0-5s */
37 #endif
38 
39 #ifndef NIMBLE_AUTOCONN_ADV_ITVL_MS
40 #define NIMBLE_AUTOCONN_ADV_ITVL_MS (100U) /* 100ms */
41 #endif
42 
43 #ifndef NIMBLE_AUTOCONN_SCAN_ITVL_MS
44 #define NIMBLE_AUTOCONN_SCAN_ITVL_MS (1500U) /* 1.5s */
45 #endif
46 #ifndef NIMBLE_AUTOCONN_SCAN_WIN_MS
47 #define NIMBLE_AUTOCONN_SCAN_WIN_MS (110U) /* 110ms */
48 #endif
49 
50 #ifndef NIMBLE_AUTOCONN_CONN_TIMEOUT_MS
51 #define NIMBLE_AUTOCONN_CONN_TIMEOUT_MS (3 * NIMBLE_AUTOCONN_SCAN_WIN_MS)
52 #endif
53 #ifndef NIMBLE_AUTOCONN_CONN_ITVL_MIN_MS
54 #define NIMBLE_AUTOCONN_CONN_ITVL_MIN_MS 75U /* 75ms */
55 #endif
56 #ifndef NIMBLE_AUTOCONN_CONN_ITVL_MAX_MS
57 #define NIMBLE_AUTOCONN_CONN_ITVL_MAX_MS 75U /* 75ms */
58 #endif
59 #ifndef NIMBLE_AUTOCONN_CONN_LATENCY
60 #define NIMBLE_AUTOCONN_CONN_LATENCY (0)
61 #endif
62 #ifndef NIMBLE_AUTOCONN_CONN_SVTO_MS
63 #define NIMBLE_AUTOCONN_CONN_SVTO_MS (2500U) /* 2.5s */
64 #endif
65 
69 #ifndef NIMBLE_AUTOCONN_PHY_MODE
70 #define NIMBLE_AUTOCONN_PHY_MODE NIMBLE_PHY_1M
71 #endif
72 
73 #ifndef NIMBLE_AUTOCONN_NODE_ID
74 #define NIMBLE_AUTOCONN_NODE_ID "RIOT-autoconn"
75 #endif
76 
77 #ifndef NIMBLE_AUTOCONN_PARAMS
78 #define NIMBLE_AUTOCONN_PARAMS \
79  { .period_scan_ms = NIMBLE_AUTOCONN_PERIOD_SCAN_MS, \
80  .period_adv_ms = NIMBLE_AUTOCONN_PERIOD_ADV_MS, \
81  .period_jitter_ms = NIMBLE_AUTOCONN_PERIOD_JITTER_MS, \
82  .adv_itvl_ms = NIMBLE_AUTOCONN_ADV_ITVL_MS, \
83  .scan_itvl_ms = NIMBLE_AUTOCONN_SCAN_ITVL_MS, \
84  .scan_win_ms = NIMBLE_AUTOCONN_SCAN_WIN_MS, \
85  .conn_timeout_ms = NIMBLE_AUTOCONN_CONN_TIMEOUT_MS, \
86  .conn_itvl_min_ms = NIMBLE_AUTOCONN_CONN_ITVL_MIN_MS, \
87  .conn_itvl_max_ms = NIMBLE_AUTOCONN_CONN_ITVL_MAX_MS, \
88  .conn_latency = NIMBLE_AUTOCONN_CONN_LATENCY, \
89  .conn_super_to_ms = NIMBLE_AUTOCONN_CONN_SVTO_MS, \
90  .phy_mode = NIMBLE_AUTOCONN_PHY_MODE, \
91  .node_id = NIMBLE_AUTOCONN_NODE_ID, }
92 #endif
99  NIMBLE_AUTOCONN_PARAMS;
100 
101 #ifdef __cplusplus
102 }
103 #endif
104 
static const nimble_autoconn_params_t nimble_autoconn_params
nimble_netif_autoconn configuration
Set of configuration parameters needed to run autoconn.