Zephyr API Documentation  3.7.0
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
Bluetooth Mesh BLOB Transfer Server model API

Data Structures

struct  bt_mesh_blob_srv_cb
 BLOB Transfer Server model event handlers. More...
 
struct  bt_mesh_blob_srv
 BLOB Transfer Server instance. More...
 

Macros

#define BT_MESH_BLOB_BLOCKS_MAX   1
 Max number of blocks in a single transfer.
 
#define BT_MESH_MODEL_BLOB_SRV(_srv)
 BLOB Transfer Server model composition data entry.
 

Functions

int bt_mesh_blob_srv_recv (struct bt_mesh_blob_srv *srv, uint64_t id, const struct bt_mesh_blob_io *io, uint8_t ttl, uint16_t timeout_base)
 Prepare BLOB Transfer Server for an incoming transfer.
 
int bt_mesh_blob_srv_cancel (struct bt_mesh_blob_srv *srv)
 Cancel the current BLOB transfer.
 
bool bt_mesh_blob_srv_is_busy (const struct bt_mesh_blob_srv *srv)
 Get the current state of the BLOB Transfer Server.
 
uint8_t bt_mesh_blob_srv_progress (const struct bt_mesh_blob_srv *srv)
 Get the current progress of the active transfer in percent.
 

Detailed Description

Macro Definition Documentation

◆ BT_MESH_BLOB_BLOCKS_MAX

#define BT_MESH_BLOB_BLOCKS_MAX   1

#include <zephyr/bluetooth/mesh/blob_srv.h>

Max number of blocks in a single transfer.

◆ BT_MESH_MODEL_BLOB_SRV

#define BT_MESH_MODEL_BLOB_SRV (   _srv)

#include <zephyr/bluetooth/mesh/blob_srv.h>

Value:
NULL, _srv, &_bt_mesh_blob_srv_cb)
#define BT_MESH_MODEL_CB(_id, _op, _pub, _user_data, _cb)
Composition data SIG model entry with callback functions.
Definition: access.h:491
#define BT_MESH_MODEL_ID_BLOB_SRV
BLOB Transfer Server.
Definition: access.h:335

BLOB Transfer Server model composition data entry.

Parameters
_srvPointer to a Bluetooth Mesh BLOB Transfer Server model API instance.

Function Documentation

◆ bt_mesh_blob_srv_cancel()

int bt_mesh_blob_srv_cancel ( struct bt_mesh_blob_srv srv)

#include <zephyr/bluetooth/mesh/blob_srv.h>

Cancel the current BLOB transfer.

Tells the BLOB Transfer Client to drop this device from the list of Targets for the current transfer. Note that the client may continue sending the transfer to other Targets.

Parameters
srvBLOB Transfer Server instance.
Returns
0 on success, or (negative) error code on failure.

◆ bt_mesh_blob_srv_is_busy()

bool bt_mesh_blob_srv_is_busy ( const struct bt_mesh_blob_srv srv)

#include <zephyr/bluetooth/mesh/blob_srv.h>

Get the current state of the BLOB Transfer Server.

Parameters
srvBLOB Transfer Server instance.
Returns
true if the BLOB Transfer Server is currently participating in a transfer, false otherwise.

◆ bt_mesh_blob_srv_progress()

uint8_t bt_mesh_blob_srv_progress ( const struct bt_mesh_blob_srv srv)

#include <zephyr/bluetooth/mesh/blob_srv.h>

Get the current progress of the active transfer in percent.

Parameters
srvBLOB Transfer Server instance.
Returns
The current transfer progress, or 0 if no transfer is active.

◆ bt_mesh_blob_srv_recv()

int bt_mesh_blob_srv_recv ( struct bt_mesh_blob_srv srv,
uint64_t  id,
const struct bt_mesh_blob_io io,
uint8_t  ttl,
uint16_t  timeout_base 
)

#include <zephyr/bluetooth/mesh/blob_srv.h>

Prepare BLOB Transfer Server for an incoming transfer.

Before a BLOB Transfer Server can receive a transfer, the transfer must be prepared through some application level mechanism. The BLOB Transfer Server will only accept incoming transfers with a matching BLOB ID.

Parameters
srvBLOB Transfer Server instance.
idBLOB ID to accept.
ioBLOB stream to write the incoming BLOB to.
ttlTime to live value to use in responses to the BLOB Transfer Client.
timeout_baseExtra time for the Client to respond in addition to the base 10 seconds, in 10-second increments.
Returns
0 on success, or (negative) error code on failure.