NimBLE-Arduino 2.1.2
Loading...
Searching...
No Matches
prov_bearer Struct Reference

#include <prov_bearer.h>

Public Attributes

bt_mesh_prov_bearer_t type
 
int(* link_accept )(const struct prov_bearer_cb *cb, void *cb_data)
 Enable link establishment as a provisionee.
 
int(* send )(struct os_mbuf *buf, prov_bearer_send_complete_t cb, void *cb_data)
 Send a packet on an established link.
 
void(* clear_tx )(void)
 Clear any ongoing transmissions, if possible.
 
int(* link_open )(const uint8_t uuid[16], int32_t timeout, const struct prov_bearer_cb *cb, void *cb_data)
 Open a new link as a provisioner.
 
void(* link_close )(enum prov_bearer_link_status status)
 Close the current link.
 

Detailed Description

Provisioning bearer API

Member Data Documentation

◆ clear_tx

void(* prov_bearer::clear_tx) (void)

Clear any ongoing transmissions, if possible.

Bearers that don't support tx clearing must implement this callback and leave it empty.

◆ link_accept

int(* prov_bearer::link_accept) (const struct prov_bearer_cb *cb, void *cb_data)

Enable link establishment as a provisionee.

Prompts the bearer to make itself visible to provisioners, and start accepting link open messages.

Parameters
cbBearer event callbacks used for the duration of the link.
cb_dataContext parameter to pass to the bearer callbacks.
Returns
Zero on success, or (negative) error code otherwise.

◆ link_close

void(* prov_bearer::link_close) (enum prov_bearer_link_status status)

Close the current link.

Only available in provisioners. Bearers that don't support the provisioner role should leave this as NULL.

Parameters
statusLink status for the link close message.

◆ link_open

int(* prov_bearer::link_open) (const uint8_t uuid[16], int32_t timeout, const struct prov_bearer_cb *cb, void *cb_data)

Open a new link as a provisioner.

Only available in provisioners. Bearers that don't support the provisioner role should leave this as NULL.

Parameters
uuidUUID of the node to establish a link to.
timeoutProtocol timeout.
cbBearer event callbacks used for the duration of the link.
cb_dataContext parameter to pass to the bearer callbacks.
Returns
Zero on success, or (negative) error code otherwise.

◆ send

int(* prov_bearer::send) (struct os_mbuf *buf, prov_bearer_send_complete_t cb, void *cb_data)

Send a packet on an established link.

Parameters
bufPayload buffer. Requires PROV_BEARER_BUF_HEADROOM bytes of headroom.
cbCallback to call when sending is complete.
cb_dataCallback data.
Returns
Zero on success, or (negative) error code otherwise.

◆ type

bt_mesh_prov_bearer_t prov_bearer::type

Provisioning bearer type.