Zephyr API Documentation
3.6.99
A Scalable Open Source RTOS
|
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. | |
BLOB Transfer Server model event handlers.
All callbacks are optional.
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.
srv | BLOB Transfer Server instance. |
id | BLOB ID of the cancelled transfer. |
success | Whether the transfer was successful. |
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.
srv | BLOB Transfer Server instance. |
xfer | Transfer to resume. |
io | BLOB stream return parameter. Must be set to a valid BLOB stream by the callback. |
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.
srv | BLOB Transfer Server instance. |
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.
srv | BLOB Transfer Server instance. |
ctx | Message context for the incoming start message. The entire transfer will be sent from the same source address. |
xfer | Transfer parameters. |
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.
srv | BLOB Transfer Server instance. |