nRF Connect SDK API 3.3.99
Loading...
Searching...
No Matches
gen_loc.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2019 Nordic Semiconductor ASA
3 *
4 * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5 */
6
14#ifndef BT_MESH_GEN_LOC_H__
15#define BT_MESH_GEN_LOC_H__
16
17#include <float.h>
18#include <zephyr/bluetooth/mesh.h>
19
20#ifdef __cplusplus
21extern "C" {
22#endif
23
30#define BT_MESH_LOC_GLOBAL_LONGITUDE_UNKNOWN DBL_MAX
32#define BT_MESH_LOC_GLOBAL_LATITUDE_UNKNOWN DBL_MAX
34#define BT_MESH_LOC_LOCAL_NORTH_UNKNOWN ((int16_t)0x8000)
36#define BT_MESH_LOC_LOCAL_EAST_UNKNOWN ((int16_t)0x8000)
38#define BT_MESH_LOC_ALTITUDE_MAX ((int16_t)32765)
40#define BT_MESH_LOC_ALTITUDE_UNKNOWN ((int16_t)0x7fff)
42#define BT_MESH_LOC_ALTITUDE_TOO_LARGE ((int16_t)0x7ffe)
51#define BT_MESH_LOC_FLOOR_NUMBER_MIN (-20)
53#define BT_MESH_LOC_FLOOR_NUMBER_MAX 232
55#define BT_MESH_LOC_FLOOR_NUMBER_GROUND_FLOOR_0 0xfc
57#define BT_MESH_LOC_FLOOR_NUMBER_GROUND_FLOOR_1 0xfd
59#define BT_MESH_LOC_FLOOR_NUMBER_UNKNOWN 0xff
65 double latitude;
67 double longitude;
69 int16_t altitude;
70};
71
75 int16_t north;
77 int16_t east;
79 int16_t altitude;
81 int16_t floor_number;
87 int32_t time_delta;
89 uint32_t precision_mm;
90};
91
93#define BT_MESH_LOC_OP_GLOBAL_GET BT_MESH_MODEL_OP_2(0x82, 0x25)
94#define BT_MESH_LOC_OP_GLOBAL_STATUS BT_MESH_MODEL_OP_1(0x40)
95#define BT_MESH_LOC_OP_GLOBAL_SET BT_MESH_MODEL_OP_1(0x41)
96#define BT_MESH_LOC_OP_GLOBAL_SET_UNACK BT_MESH_MODEL_OP_1(0x42)
97#define BT_MESH_LOC_OP_LOCAL_GET BT_MESH_MODEL_OP_2(0x82, 0x26)
98#define BT_MESH_LOC_OP_LOCAL_STATUS BT_MESH_MODEL_OP_2(0x82, 0x27)
99#define BT_MESH_LOC_OP_LOCAL_SET BT_MESH_MODEL_OP_2(0x82, 0x28)
100#define BT_MESH_LOC_OP_LOCAL_SET_UNACK BT_MESH_MODEL_OP_2(0x82, 0x29)
101
102#define BT_MESH_LOC_MSG_LEN_GLOBAL_GET 0
103#define BT_MESH_LOC_MSG_LEN_GLOBAL_STATUS 10
104#define BT_MESH_LOC_MSG_LEN_GLOBAL_SET 10
105#define BT_MESH_LOC_MSG_LEN_LOCAL_GET 0
106#define BT_MESH_LOC_MSG_LEN_LOCAL_STATUS 9
107#define BT_MESH_LOC_MSG_LEN_LOCAL_SET 9
110#ifdef __cplusplus
111}
112#endif
113
114#endif /* BT_MESH_GEN_LOC_H__ */
115
double longitude
Definition gen_loc.h:67
int16_t altitude
Definition gen_loc.h:69
double latitude
Definition gen_loc.h:65
Definition gen_loc.h:63
int16_t altitude
Definition gen_loc.h:79
bool is_mobile
Definition gen_loc.h:83
uint32_t precision_mm
Definition gen_loc.h:89
int16_t floor_number
Definition gen_loc.h:81
int32_t time_delta
Definition gen_loc.h:87
int16_t east
Definition gen_loc.h:77
int16_t north
Definition gen_loc.h:75
Definition gen_loc.h:73