Zephyr API Documentation  3.6.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches

BLOB Transfer Server model event handlers. More...

#include <blob_srv.h>

Data Fields

int(* start )(struct bt_mesh_blob_srv *srv, struct bt_mesh_msg_ctx *ctx, struct bt_mesh_blob_xfer *xfer)
 Transfer start callback.
 
void(* end )(struct bt_mesh_blob_srv *srv, uint64_t id, bool success)
 Transfer end callback.
 
void(* suspended )(struct bt_mesh_blob_srv *srv)
 Transfer suspended callback.
 
void(* resume )(struct bt_mesh_blob_srv *srv)
 Transfer resume callback.
 
int(* recover )(struct bt_mesh_blob_srv *srv, struct bt_mesh_blob_xfer *xfer, const struct bt_mesh_blob_io **io)
 Transfer recovery callback.
 

Detailed Description

BLOB Transfer Server model event handlers.

All callbacks are optional.

Field Documentation

◆ end

void(* bt_mesh_blob_srv_cb::end) (struct bt_mesh_blob_srv *srv, uint64_t id, bool success)

Transfer end callback.

Called when the transfer ends, either because it was cancelled, or because it finished successfully. A new transfer may be prepared.

Note
The transfer may end before it's started if the start parameters are invalid.
Parameters
srvBLOB Transfer Server instance.
idBLOB ID of the cancelled transfer.
successWhether the transfer was successful.

◆ recover

int(* bt_mesh_blob_srv_cb::recover) (struct bt_mesh_blob_srv *srv, struct bt_mesh_blob_xfer *xfer, const struct bt_mesh_blob_io **io)

Transfer recovery callback.

Called when the Bluetooth Mesh subsystem is started if the device is rebooted in the middle of a transfer.

Transfers will not be resumed after a reboot if this callback is not defined.

Parameters
srvBLOB Transfer Server instance.
xferTransfer to resume.
ioBLOB stream return parameter. Must be set to a valid BLOB stream by the callback.
Returns
0 on success, or (negative) error code to abandon the transfer.

◆ resume

void(* bt_mesh_blob_srv_cb::resume) (struct bt_mesh_blob_srv *srv)

Transfer resume callback.

Called if the transfer is resumed after being suspended.

Parameters
srvBLOB Transfer Server instance.

◆ start

int(* bt_mesh_blob_srv_cb::start) (struct bt_mesh_blob_srv *srv, struct bt_mesh_msg_ctx *ctx, struct bt_mesh_blob_xfer *xfer)

Transfer start callback.

Called when the transfer has started with the prepared BLOB ID.

Parameters
srvBLOB Transfer Server instance.
ctxMessage context for the incoming start message. The entire transfer will be sent from the same source address.
xferTransfer parameters.
Returns
0 on success, or (negative) error code to reject the transfer.

◆ suspended

void(* bt_mesh_blob_srv_cb::suspended) (struct bt_mesh_blob_srv *srv)

Transfer suspended callback.

Called if the Server timed out while waiting for a transfer packet. A suspended transfer may resume later from the start of the current block. Any received chunks in the current block should be discarded, they will be received again if the transfer resumes.

The transfer will call resumed again when resuming.

Note
The BLOB Transfer Server does not run a timer in the suspended state, and it's up to the application to determine whether the transfer should be permanently cancelled. Without interaction, the transfer will be suspended indefinitely, and the BLOB Transfer Server will not accept any new transfers.
Parameters
srvBLOB Transfer Server instance.

The documentation for this struct was generated from the following file: