nRF Connect SDK API 0.1.0
Loading...
Searching...
No Matches
gen_loc_cli.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_CLI_H__
15#define BT_MESH_GEN_LOC_CLI_H__
16
19#include <zephyr/sys/util.h>
20
21#ifdef __cplusplus
22extern "C" {
23#endif
24
25struct bt_mesh_loc_cli;
26
33#define BT_MESH_LOC_CLI_INIT(_handlers) \
34 { \
35 .handlers = _handlers, \
36 }
37
44#define BT_MESH_MODEL_LOC_CLI(_cli) \
45 BT_MESH_MODEL_CB(BT_MESH_MODEL_ID_GEN_LOCATION_CLI, \
46 _bt_mesh_loc_cli_op, &(_cli)->pub, \
47 BT_MESH_MODEL_USER_DATA(struct bt_mesh_loc_cli, \
48 _cli), \
49 &_bt_mesh_loc_cli_cb)
50
60 void (*const global_status)(struct bt_mesh_loc_cli *cli,
61 struct bt_mesh_msg_ctx *ctx,
62 const struct bt_mesh_loc_global *status);
63
71 void (*const local_status)(struct bt_mesh_loc_cli *cli,
72 struct bt_mesh_msg_ctx *ctx,
73 const struct bt_mesh_loc_local *status);
74};
75
85 struct bt_mesh_msg_ack_ctx ack_ctx;
87 struct bt_mesh_model_pub pub;
88 /* Publication buffer */
89 struct net_buf_simple pub_buf;
90 /* Publication data */
91 uint8_t pub_data[BT_MESH_MODEL_BUF_LEN(BT_MESH_LOC_OP_GLOBAL_SET,
92 BT_MESH_LOC_MSG_LEN_GLOBAL_SET)];
94 const struct bt_mesh_model *model;
95};
96
117 struct bt_mesh_msg_ctx *ctx,
118 struct bt_mesh_loc_global *rsp);
119
140 struct bt_mesh_msg_ctx *ctx,
141 const struct bt_mesh_loc_global *loc,
142 struct bt_mesh_loc_global *rsp);
143
157 struct bt_mesh_msg_ctx *ctx,
158 const struct bt_mesh_loc_global *loc);
159
180 struct bt_mesh_msg_ctx *ctx,
181 struct bt_mesh_loc_local *rsp);
182
203 struct bt_mesh_msg_ctx *ctx,
204 const struct bt_mesh_loc_local *loc,
205 struct bt_mesh_loc_local *rsp);
206
220 struct bt_mesh_msg_ctx *ctx,
221 const struct bt_mesh_loc_local *loc);
222
224extern const struct bt_mesh_model_op _bt_mesh_loc_cli_op[];
225extern const struct bt_mesh_model_cb _bt_mesh_loc_cli_cb;
228#ifdef __cplusplus
229}
230#endif
231
232#endif /* BT_MESH_GEN_LOC_CLI_H__ */
233
int bt_mesh_loc_cli_global_get(struct bt_mesh_loc_cli *cli, struct bt_mesh_msg_ctx *ctx, struct bt_mesh_loc_global *rsp)
Get the global location of the bound srv.
int bt_mesh_loc_cli_local_set(struct bt_mesh_loc_cli *cli, struct bt_mesh_msg_ctx *ctx, const struct bt_mesh_loc_local *loc, struct bt_mesh_loc_local *rsp)
Set the Local Location in the server.
int bt_mesh_loc_cli_global_set(struct bt_mesh_loc_cli *cli, struct bt_mesh_msg_ctx *ctx, const struct bt_mesh_loc_global *loc, struct bt_mesh_loc_global *rsp)
Set the Global Location in the server.
int bt_mesh_loc_cli_local_set_unack(struct bt_mesh_loc_cli *cli, struct bt_mesh_msg_ctx *ctx, const struct bt_mesh_loc_local *loc)
Set the Local Location in the server without requesting a response.
int bt_mesh_loc_cli_local_get(struct bt_mesh_loc_cli *cli, struct bt_mesh_msg_ctx *ctx, struct bt_mesh_loc_local *rsp)
Get the local location of the bound srv.
int bt_mesh_loc_cli_global_set_unack(struct bt_mesh_loc_cli *cli, struct bt_mesh_msg_ctx *ctx, const struct bt_mesh_loc_global *loc)
Set the Global Location in the server without requesting a response.
void(*const global_status)(struct bt_mesh_loc_cli *cli, struct bt_mesh_msg_ctx *ctx, const struct bt_mesh_loc_global *status)
Global Location status message handler.
Definition: gen_loc_cli.h:60
void(*const local_status)(struct bt_mesh_loc_cli *cli, struct bt_mesh_msg_ctx *ctx, const struct bt_mesh_loc_local *status)
Local Location status message handler.
Definition: gen_loc_cli.h:71
Definition: gen_loc_cli.h:52
struct net_buf_simple pub_buf
Definition: gen_loc_cli.h:89
const struct bt_mesh_model * model
Definition: gen_loc_cli.h:94
struct bt_mesh_model_pub pub
Definition: gen_loc_cli.h:87
struct bt_mesh_msg_ack_ctx ack_ctx
Definition: gen_loc_cli.h:85
uint8_t pub_data[BT_MESH_MODEL_BUF_LEN(BT_MESH_LOC_OP_GLOBAL_SET, BT_MESH_LOC_MSG_LEN_GLOBAL_SET)]
Definition: gen_loc_cli.h:92
const struct bt_mesh_loc_cli_handlers *const handlers
Definition: gen_loc_cli.h:83
Definition: gen_loc_cli.h:81
Definition: gen_loc.h:54
Definition: gen_loc.h:67