Zephyr API 3.6.99
Loading...
Searching...
No Matches
rpr_cli.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2020 Nordic Semiconductor ASA
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7#ifndef ZEPHYR_INCLUDE_BT_MESH_RPR_CLI_H__
8#define ZEPHYR_INCLUDE_BT_MESH_RPR_CLI_H__
9
10#include <zephyr/kernel.h>
13
14#ifdef __cplusplus
15extern "C" {
16#endif
17
29#define BT_MESH_RPR_SCAN_MAX_DEVS_ANY 0
30
31struct bt_mesh_rpr_cli;
32
39#define BT_MESH_MODEL_RPR_CLI(_cli) \
40 BT_MESH_MODEL_CB(BT_MESH_MODEL_ID_REMOTE_PROV_CLI, \
41 _bt_mesh_rpr_cli_op, NULL, _cli, &_bt_mesh_rpr_cli_cb)
42
54
62
75 void (*scan_report)(struct bt_mesh_rpr_cli *cli,
76 const struct bt_mesh_rpr_node *srv,
77 struct bt_mesh_rpr_unprov *unprov,
78 struct net_buf_simple *adv_data);
79
80 /* Internal parameters */
81
84
85 struct {
86 struct k_work_delayable timeout;
87 struct bt_mesh_rpr_node srv;
93
94 const struct bt_mesh_model *mod;
95};
96
106 const struct bt_mesh_rpr_node *srv,
107 struct bt_mesh_rpr_caps *caps);
108
118 const struct bt_mesh_rpr_node *srv,
119 struct bt_mesh_rpr_scan_status *status);
120
145 const struct bt_mesh_rpr_node *srv,
146 const uint8_t uuid[16], uint8_t timeout,
147 uint8_t max_devs,
148 struct bt_mesh_rpr_scan_status *status);
149
189 const struct bt_mesh_rpr_node *srv,
190 const uint8_t uuid[16], uint8_t timeout,
191 const uint8_t *ad_types, size_t ad_count);
192
202 const struct bt_mesh_rpr_node *srv,
203 struct bt_mesh_rpr_scan_status *status);
204
214 const struct bt_mesh_rpr_node *srv,
215 struct bt_mesh_rpr_link *rsp);
216
226 const struct bt_mesh_rpr_node *srv,
227 struct bt_mesh_rpr_link *rsp);
228
234
243
245extern const struct bt_mesh_model_op _bt_mesh_rpr_cli_op[];
246extern const struct bt_mesh_model_cb _bt_mesh_rpr_cli_cb;
251#ifdef __cplusplus
252}
253#endif
254
255#endif /* ZEPHYR_INCLUDE_BT_MESH_RPR_CLI_H__ */
Access layer APIs.
int bt_mesh_rpr_scan_stop(struct bt_mesh_rpr_cli *cli, const struct bt_mesh_rpr_node *srv, struct bt_mesh_rpr_scan_status *status)
Stop any ongoing scanning on the Remote Provisioning Server.
int bt_mesh_rpr_scan_get(struct bt_mesh_rpr_cli *cli, const struct bt_mesh_rpr_node *srv, struct bt_mesh_rpr_scan_status *status)
Get current scanning state of Remote Provisioning Server.
int bt_mesh_rpr_scan_caps_get(struct bt_mesh_rpr_cli *cli, const struct bt_mesh_rpr_node *srv, struct bt_mesh_rpr_caps *caps)
Get scanning capabilities of Remote Provisioning Server.
int bt_mesh_rpr_link_get(struct bt_mesh_rpr_cli *cli, const struct bt_mesh_rpr_node *srv, struct bt_mesh_rpr_link *rsp)
Get the current link status of the Remote Provisioning Server.
void bt_mesh_rpr_cli_timeout_set(int32_t timeout)
Set the transmission timeout value.
int bt_mesh_rpr_scan_start_ext(struct bt_mesh_rpr_cli *cli, const struct bt_mesh_rpr_node *srv, const uint8_t uuid[16], uint8_t timeout, const uint8_t *ad_types, size_t ad_count)
Start extended scanning for unprovisioned devices.
int32_t bt_mesh_rpr_cli_timeout_get(void)
Get the current transmission timeout value.
int bt_mesh_rpr_link_close(struct bt_mesh_rpr_cli *cli, const struct bt_mesh_rpr_node *srv, struct bt_mesh_rpr_link *rsp)
Close any open link on the Remote Provisioning Server.
int bt_mesh_rpr_scan_start(struct bt_mesh_rpr_cli *cli, const struct bt_mesh_rpr_node *srv, const uint8_t uuid[16], uint8_t timeout, uint8_t max_devs, struct bt_mesh_rpr_scan_status *status)
Start scanning for unprovisioned devices.
bt_mesh_rpr_link_state
Definition rpr.h:67
bt_mesh_rpr_status
Definition rpr.h:37
bt_mesh_rpr_scan
Definition rpr.h:52
Public kernel APIs.
__INT32_TYPE__ int32_t
Definition stdint.h:74
__UINT8_TYPE__ uint8_t
Definition stdint.h:88
Model callback functions.
Definition access.h:813
Model opcode handler.
Definition access.h:363
Abstraction that describes a Mesh Model instance.
Definition access.h:891
Acknowledged message context for tracking the status of model messages pending a response.
Definition msg.h:172
Remote Provisioning Server scanning capabilities.
Definition rpr_cli.h:56
bool active_scan
Supports active scan.
Definition rpr_cli.h:60
uint8_t max_devs
Max number of scannable devices.
Definition rpr_cli.h:58
Remote Provisioning Client model instance.
Definition rpr_cli.h:64
struct bt_mesh_msg_ack_ctx prov_ack_ctx
Definition rpr_cli.h:83
const struct bt_mesh_model * mod
Definition rpr_cli.h:94
void(* scan_report)(struct bt_mesh_rpr_cli *cli, const struct bt_mesh_rpr_node *srv, struct bt_mesh_rpr_unprov *unprov, struct net_buf_simple *adv_data)
Scan report callback.
Definition rpr_cli.h:75
struct bt_mesh_rpr_cli::@161 link
uint8_t tx_pdu
Definition rpr_cli.h:89
uint8_t rx_pdu
Definition rpr_cli.h:90
struct bt_mesh_rpr_node srv
Definition rpr_cli.h:87
struct bt_mesh_msg_ack_ctx scan_ack_ctx
Definition rpr_cli.h:82
enum bt_mesh_rpr_link_state state
Definition rpr_cli.h:91
uint8_t time
Definition rpr_cli.h:88
Remote provisioning actor, as seen across the mesh.
Definition rpr.h:76
Scan status response.
Definition rpr_cli.h:44
enum bt_mesh_rpr_status status
Current scan status.
Definition rpr_cli.h:46
uint8_t timeout
Seconds remaining of the scan.
Definition rpr_cli.h:52
uint8_t max_devs
Max number of devices to report in current scan.
Definition rpr_cli.h:50
enum bt_mesh_rpr_scan scan
Current scan state.
Definition rpr_cli.h:48
Unprovisioned device.
Definition rpr.h:86
A structure used to submit work after a delay.
Definition kernel.h:3985
Simple network buffer representation.
Definition net_buf.h:89