nRF Connect SDK API 0.1.0
Loading...
Searching...
No Matches
dm_common.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2022 Nordic Semiconductor ASA
3 *
4 * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5 */
6
14#ifndef BT_MESH_DM_H__
15#define BT_MESH_DM_H__
16
18#include <dm.h>
19
20#ifdef __cplusplus
21extern "C" {
22#endif
23
24#define BT_MESH_VENDOR_COMPANY_ID CONFIG_BT_COMPANY_ID_NORDIC
25#define BT_MESH_MODEL_ID_DM_SRV 0x000B
26#define BT_MESH_MODEL_ID_DM_CLI 0x000C
27
37 uint16_t addr;
41 union {
43 uint16_t rtt;
45 struct {
47 uint16_t best;
49 uint16_t ifft;
51 uint16_t phase_slope;
55 } res;
56};
57
61 uint8_t ttl;
63 uint8_t timeout;
65 uint8_t delay;
66};
67
69#define BT_MESH_DM_SRV_OP BT_MESH_MODEL_OP_3(0x0F, BT_MESH_VENDOR_COMPANY_ID)
70#define BT_MESH_DM_CLI_OP BT_MESH_MODEL_OP_3(0x10, BT_MESH_VENDOR_COMPANY_ID)
71
72#define BT_MESH_DM_CONFIG_OP 0x01
73#define BT_MESH_DM_CONFIG_STATUS_OP 0x02
74#define BT_MESH_DM_START_OP 0x03
75#define BT_MESH_DM_RESULT_GET_OP 0x04
76#define BT_MESH_DM_RESULT_STATUS_OP 0x05
77#define BT_MESH_DM_SYNC_OP 0x06
78
79#define BT_MESH_DM_CONFIG_MSG_LEN_MIN 1
80#define BT_MESH_DM_CONFIG_MSG_LEN_MAX 4
81#define BT_MESH_DM_CONFIG_STATUS_MSG_LEN 6
82#define BT_MESH_DM_START_MSG_LEN_MIN 4
83#define BT_MESH_DM_START_MSG_LEN_MAX 7
84#define BT_MESH_DM_RESULT_GET_MSG_LEN 2
85#define BT_MESH_DM_RESULT_STATUS_MSG_MIN_LEN 2
86#define BT_MESH_DM_RESULT_STATUS_MSG_MAX_LEN 100
87#define BT_MESH_DM_SYNC_MSG_LEN 3
90#ifdef __cplusplus
91}
92#endif
93
94#endif /* BT_MESH_DM_H__ */
95
dm_quality
Measurement quality definition.
Definition: dm.h:49
dm_ranging_mode
Ranging mode definition.
Definition: dm.h:40
uint8_t timeout
Definition: dm_common.h:63
uint8_t delay
Definition: dm_common.h:65
uint8_t ttl
Definition: dm_common.h:61
Definition: dm_common.h:59
enum dm_ranging_mode mode
Definition: dm_common.h:31
uint16_t ifft
Definition: dm_common.h:49
bool err_occurred
Definition: dm_common.h:35
uint16_t rtt
Definition: dm_common.h:43
union bt_mesh_dm_res_entry::@163 res
uint16_t best
Definition: dm_common.h:47
uint16_t addr
Definition: dm_common.h:37
struct bt_mesh_dm_res_entry::@163::@164 mcpd
enum dm_quality quality
Definition: dm_common.h:33
uint16_t rssi_openspace
Definition: dm_common.h:53
uint16_t phase_slope
Definition: dm_common.h:51
Definition: dm_common.h:29