nRF Connect SDK API 0.1.0
Loading...
Searching...
No Matches
gen_prop_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
13#ifndef BT_MESH_GEN_PROP_CLI_H__
14#define BT_MESH_GEN_PROP_CLI_H__
15
18
19#ifdef __cplusplus
20extern "C" {
21#endif
22
23struct bt_mesh_prop_cli;
24
34#define BT_MESH_PROP_CLI_INIT(_prop_list_handler, _prop_status_handler) \
35 { \
36 .prop_list = _prop_list_handler, \
37 .prop_status = _prop_status_handler, \
38 }
39
46#define BT_MESH_MODEL_PROP_CLI(_cli) \
47 BT_MESH_MODEL_CB(BT_MESH_MODEL_ID_GEN_PROP_CLI, _bt_mesh_prop_cli_op, \
48 &(_cli)->pub, \
49 BT_MESH_MODEL_USER_DATA(struct bt_mesh_prop_cli, \
50 _cli), \
51 &_bt_mesh_prop_cli_cb)
52
55 uint8_t count;
56 uint16_t *ids;
57};
58
65 const struct bt_mesh_model *model;
67 struct bt_mesh_model_pub pub;
68 /* Publication buffer */
69 struct net_buf_simple pub_buf;
70 /* Publication data */
71 uint8_t pub_data[BT_MESH_MODEL_BUF_LEN(
72 BT_MESH_PROP_OP_ADMIN_PROP_SET,
73 BT_MESH_PROP_MSG_MAXLEN_ADMIN_PROP_SET)];
75 struct bt_mesh_msg_ack_ctx ack_ctx;
76
84 void (*const prop_list)(struct bt_mesh_prop_cli *cli,
85 struct bt_mesh_msg_ctx *ctx,
86 enum bt_mesh_prop_srv_kind kind,
87 const struct bt_mesh_prop_list *list);
88
96 void (*const prop_status)(struct bt_mesh_prop_cli *cli,
97 struct bt_mesh_msg_ctx *ctx,
98 enum bt_mesh_prop_srv_kind kind,
99 const struct bt_mesh_prop_val *prop);
100};
101
102
133 struct bt_mesh_msg_ctx *ctx, uint16_t id,
134 struct bt_mesh_prop_list *rsp);
135
163 struct bt_mesh_msg_ctx *ctx,
164 enum bt_mesh_prop_srv_kind kind,
165 struct bt_mesh_prop_list *rsp);
166
193 struct bt_mesh_msg_ctx *ctx,
194 enum bt_mesh_prop_srv_kind kind, uint16_t id,
195 struct bt_mesh_prop_val *rsp);
196
224 struct bt_mesh_msg_ctx *ctx,
225 const struct bt_mesh_prop_val *val,
226 struct bt_mesh_prop_val *rsp);
227
249 struct bt_mesh_msg_ctx *ctx,
250 const struct bt_mesh_prop_val *val);
251
272 struct bt_mesh_msg_ctx *ctx,
273 const struct bt_mesh_prop_val *val,
274 struct bt_mesh_prop_val *rsp);
275
290 struct bt_mesh_msg_ctx *ctx,
291 const struct bt_mesh_prop_val *val);
292
313 struct bt_mesh_msg_ctx *ctx,
314 const struct bt_mesh_prop *prop,
315 struct bt_mesh_prop_val *rsp);
316
331 struct bt_mesh_msg_ctx *ctx,
332 const struct bt_mesh_prop *prop);
333
335extern const struct bt_mesh_model_op _bt_mesh_prop_cli_op[];
336extern const struct bt_mesh_model_cb _bt_mesh_prop_cli_cb;
339#ifdef __cplusplus
340}
341#endif
342
343#endif /* BT_MESH_GEN_PROP_CLI_H__ */
344
int bt_mesh_prop_cli_props_get(struct bt_mesh_prop_cli *cli, struct bt_mesh_msg_ctx *ctx, enum bt_mesh_prop_srv_kind kind, struct bt_mesh_prop_list *rsp)
Get the list of properties of the bound server.
int bt_mesh_prop_cli_admin_prop_set(struct bt_mesh_prop_cli *cli, struct bt_mesh_msg_ctx *ctx, const struct bt_mesh_prop_val *val, struct bt_mesh_prop_val *rsp)
Set a property value in an Admin Property server.
int bt_mesh_prop_cli_prop_get(struct bt_mesh_prop_cli *cli, struct bt_mesh_msg_ctx *ctx, enum bt_mesh_prop_srv_kind kind, uint16_t id, struct bt_mesh_prop_val *rsp)
Get the value of a property in a server.
int bt_mesh_prop_cli_admin_prop_set_unack(struct bt_mesh_prop_cli *cli, struct bt_mesh_msg_ctx *ctx, const struct bt_mesh_prop_val *val)
Set a property value in an Admin Property server without requesting a response.
int bt_mesh_prop_cli_client_props_get(struct bt_mesh_prop_cli *cli, struct bt_mesh_msg_ctx *ctx, uint16_t id, struct bt_mesh_prop_list *rsp)
Get the list of Generic Client Properties of the bound server.
int bt_mesh_prop_cli_user_prop_set_unack(struct bt_mesh_prop_cli *cli, struct bt_mesh_msg_ctx *ctx, const struct bt_mesh_prop_val *val)
Set a property value in a User Property Server without requesting a response.
int bt_mesh_prop_cli_mfr_prop_set_unack(struct bt_mesh_prop_cli *cli, struct bt_mesh_msg_ctx *ctx, const struct bt_mesh_prop *prop)
Set the user access of a property in a Manufacturer Property server without requesting a response.
int bt_mesh_prop_cli_user_prop_set(struct bt_mesh_prop_cli *cli, struct bt_mesh_msg_ctx *ctx, const struct bt_mesh_prop_val *val, struct bt_mesh_prop_val *rsp)
Set a property value in a User Property Server.
int bt_mesh_prop_cli_mfr_prop_set(struct bt_mesh_prop_cli *cli, struct bt_mesh_msg_ctx *ctx, const struct bt_mesh_prop *prop, struct bt_mesh_prop_val *rsp)
Set the user access of a property in a Manufacturer Property server.
bt_mesh_prop_srv_kind
Definition: gen_prop.h:38
struct bt_mesh_model_pub pub
Definition: gen_prop_cli.h:67
struct bt_mesh_msg_ack_ctx ack_ctx
Definition: gen_prop_cli.h:75
struct net_buf_simple pub_buf
Definition: gen_prop_cli.h:69
uint8_t pub_data[BT_MESH_MODEL_BUF_LEN(BT_MESH_PROP_OP_ADMIN_PROP_SET, BT_MESH_PROP_MSG_MAXLEN_ADMIN_PROP_SET)]
Definition: gen_prop_cli.h:73
void(*const prop_list)(struct bt_mesh_prop_cli *cli, struct bt_mesh_msg_ctx *ctx, enum bt_mesh_prop_srv_kind kind, const struct bt_mesh_prop_list *list)
Property list message handler.
Definition: gen_prop_cli.h:84
void(*const prop_status)(struct bt_mesh_prop_cli *cli, struct bt_mesh_msg_ctx *ctx, enum bt_mesh_prop_srv_kind kind, const struct bt_mesh_prop_val *prop)
Property status message handler.
Definition: gen_prop_cli.h:96
const struct bt_mesh_model * model
Definition: gen_prop_cli.h:65
Definition: gen_prop_cli.h:63
uint16_t * ids
Definition: gen_prop_cli.h:56
uint8_t count
Definition: gen_prop_cli.h:55
Definition: gen_prop_cli.h:54
Definition: gen_prop.h:58
Definition: gen_prop.h:50