Zephyr API Documentation 4.4.99
A Scalable Open Source RTOS
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
12
13#ifndef ZEPHYR_INCLUDE_BLUETOOTH_MESH_RPR_CLI_H_
14#define ZEPHYR_INCLUDE_BLUETOOTH_MESH_RPR_CLI_H_
15
16#include <zephyr/kernel.h>
19
20#ifdef __cplusplus
21extern "C" {
22#endif
23
29
35#define BT_MESH_RPR_SCAN_MAX_DEVS_ANY 0
36
37struct bt_mesh_rpr_cli;
38
45#define BT_MESH_MODEL_RPR_CLI(_cli) \
46 BT_MESH_MODEL_CB(BT_MESH_MODEL_ID_REMOTE_PROV_CLI, \
47 _bt_mesh_rpr_cli_op, NULL, _cli, &_bt_mesh_rpr_cli_cb)
48
60
68
81 void (*scan_report)(struct bt_mesh_rpr_cli *cli,
82 const struct bt_mesh_rpr_node *srv,
83 struct bt_mesh_rpr_unprov *unprov,
84 struct net_buf_simple *adv_data);
85
86 /* Internal parameters */
87
90
91 struct {
99
100 const struct bt_mesh_model *mod;
101};
102
112 const struct bt_mesh_rpr_node *srv,
113 struct bt_mesh_rpr_caps *caps);
114
124 const struct bt_mesh_rpr_node *srv,
125 struct bt_mesh_rpr_scan_status *status);
126
151 const struct bt_mesh_rpr_node *srv,
152 const uint8_t uuid[16], uint8_t timeout,
153 uint8_t max_devs,
154 struct bt_mesh_rpr_scan_status *status);
155
195 const struct bt_mesh_rpr_node *srv,
196 const uint8_t uuid[16], uint8_t timeout,
197 const uint8_t *ad_types, size_t ad_count);
198
208 const struct bt_mesh_rpr_node *srv,
209 struct bt_mesh_rpr_scan_status *status);
210
220 const struct bt_mesh_rpr_node *srv,
221 struct bt_mesh_rpr_link *rsp);
222
232 const struct bt_mesh_rpr_node *srv,
233 struct bt_mesh_rpr_link *rsp);
234
240
249
251extern const struct bt_mesh_model_op _bt_mesh_rpr_cli_op[];
252extern const struct bt_mesh_model_cb _bt_mesh_rpr_cli_cb;
254
256
257#ifdef __cplusplus
258}
259#endif
260
261#endif /* ZEPHYR_INCLUDE_BLUETOOTH_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:73
bt_mesh_rpr_status
Definition rpr.h:43
bt_mesh_rpr_scan
Definition rpr.h:58
Public kernel APIs.
Header file for Bluetooth Mesh Remote Provisioning common definitions.
__INT32_TYPE__ int32_t
Definition stdint.h:74
__UINT8_TYPE__ uint8_t
Definition stdint.h:88
Model callback functions.
Definition access.h:635
Model opcode handler.
Definition access.h:182
Abstraction that describes a Mesh Model instance.
Definition access.h:713
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:62
bool active_scan
Supports active scan.
Definition rpr_cli.h:66
uint8_t max_devs
Max number of scannable devices.
Definition rpr_cli.h:64
Remote Provisioning Client model instance.
Definition rpr_cli.h:70
struct bt_mesh_msg_ack_ctx prov_ack_ctx
Definition rpr_cli.h:89
const struct bt_mesh_model * mod
Definition rpr_cli.h:100
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:81
struct k_work_delayable timeout
Definition rpr_cli.h:92
uint8_t tx_pdu
Definition rpr_cli.h:95
uint8_t rx_pdu
Definition rpr_cli.h:96
struct bt_mesh_rpr_node srv
Definition rpr_cli.h:93
struct bt_mesh_msg_ack_ctx scan_ack_ctx
Definition rpr_cli.h:88
enum bt_mesh_rpr_link_state state
Definition rpr_cli.h:97
struct bt_mesh_rpr_cli::@146376344033107143324154277353003224165264331171 link
uint8_t time
Definition rpr_cli.h:94
Remote provisioning actor, as seen across the mesh.
Definition rpr.h:82
Scan status response.
Definition rpr_cli.h:50
enum bt_mesh_rpr_status status
Current scan status.
Definition rpr_cli.h:52
uint8_t timeout
Seconds remaining of the scan.
Definition rpr_cli.h:58
uint8_t max_devs
Max number of devices to report in current scan.
Definition rpr_cli.h:56
enum bt_mesh_rpr_scan scan
Current scan state.
Definition rpr_cli.h:54
Unprovisioned device.
Definition rpr.h:92
A structure used to submit work after a delay.
Definition kernel.h:4642
Simple network buffer representation.
Definition net_buf.h:89
Binary representation of a UUID.
Definition uuid.h:48