nRF Connect SDK API 0.1.0
Loading...
Searching...
No Matches
gen_dtt_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
15#ifndef BT_MESH_GEN_DTT_CLI_H__
16#define BT_MESH_GEN_DTT_CLI_H__
17
20
21#ifdef __cplusplus
22extern "C" {
23#endif
24
25struct bt_mesh_dtt_cli;
26
34#define BT_MESH_DTT_CLI_INIT(_status_handler) \
35 { \
36 .status_handler = _status_handler, \
37 }
38
45#define BT_MESH_MODEL_DTT_CLI(_cli) \
46 BT_MESH_MODEL_CB(BT_MESH_MODEL_ID_GEN_DEF_TRANS_TIME_CLI, \
47 _bt_mesh_dtt_cli_op, &(_cli)->pub, \
48 BT_MESH_MODEL_USER_DATA(struct bt_mesh_dtt_cli, \
49 _cli), \
50 &_bt_mesh_dtt_cli_cb)
51
65 void (*const status_handler)(struct bt_mesh_dtt_cli *cli,
66 struct bt_mesh_msg_ctx *ctx,
67 int32_t transition_time);
68
70 struct bt_mesh_msg_ack_ctx ack_ctx;
72 struct bt_mesh_model_pub pub;
73 /* Publication buffer */
74 struct net_buf_simple pub_buf;
75 /* Publication data */
76 uint8_t pub_data[BT_MESH_MODEL_BUF_LEN(BT_MESH_DTT_OP_SET,
77 BT_MESH_DTT_MSG_LEN_SET)];
79 const struct bt_mesh_model *model;
80};
81
102int bt_mesh_dtt_get(struct bt_mesh_dtt_cli *cli, struct bt_mesh_msg_ctx *ctx,
103 int32_t *rsp_transition_time);
104
128int bt_mesh_dtt_set(struct bt_mesh_dtt_cli *cli, struct bt_mesh_msg_ctx *ctx,
129 uint32_t transition_time, int32_t *rsp_transition_time);
130
147 struct bt_mesh_msg_ctx *ctx, uint32_t transition_time);
148
150extern const struct bt_mesh_model_op _bt_mesh_dtt_cli_op[];
151extern const struct bt_mesh_model_cb _bt_mesh_dtt_cli_cb;
154#ifdef __cplusplus
155}
156#endif
157
158#endif /* BT_MESH_GEN_DTT_CLI_H__ */
159
int bt_mesh_dtt_set(struct bt_mesh_dtt_cli *cli, struct bt_mesh_msg_ctx *ctx, uint32_t transition_time, int32_t *rsp_transition_time)
Set the Default Transition Time of the server.
int bt_mesh_dtt_set_unack(struct bt_mesh_dtt_cli *cli, struct bt_mesh_msg_ctx *ctx, uint32_t transition_time)
Set the Default Transition Time of the server without requesting a response.
int bt_mesh_dtt_get(struct bt_mesh_dtt_cli *cli, struct bt_mesh_msg_ctx *ctx, int32_t *rsp_transition_time)
Get the Default Transition Time of the server.
const struct bt_mesh_model * model
Definition: gen_dtt_cli.h:79
void(*const status_handler)(struct bt_mesh_dtt_cli *cli, struct bt_mesh_msg_ctx *ctx, int32_t transition_time)
Default Transition Time status message handler.
Definition: gen_dtt_cli.h:65
struct net_buf_simple pub_buf
Definition: gen_dtt_cli.h:74
struct bt_mesh_model_pub pub
Definition: gen_dtt_cli.h:72
struct bt_mesh_msg_ack_ctx ack_ctx
Definition: gen_dtt_cli.h:70
uint8_t pub_data[BT_MESH_MODEL_BUF_LEN(BT_MESH_DTT_OP_SET, BT_MESH_DTT_MSG_LEN_SET)]
Definition: gen_dtt_cli.h:77
Definition: gen_dtt_cli.h:57