Zephyr API Documentation
3.6.99
A Scalable Open Source RTOS
|
BLOB stream. More...
#include <blob.h>
Data Fields | |
int(* | open )(const struct bt_mesh_blob_io *io, const struct bt_mesh_blob_xfer *xfer, enum bt_mesh_blob_io_mode mode) |
Open callback. | |
void(* | close )(const struct bt_mesh_blob_io *io, const struct bt_mesh_blob_xfer *xfer) |
Close callback. | |
int(* | block_start )(const struct bt_mesh_blob_io *io, const struct bt_mesh_blob_xfer *xfer, const struct bt_mesh_blob_block *block) |
Block start callback. | |
void(* | block_end )(const struct bt_mesh_blob_io *io, const struct bt_mesh_blob_xfer *xfer, const struct bt_mesh_blob_block *block) |
Block end callback. | |
int(* | wr )(const struct bt_mesh_blob_io *io, const struct bt_mesh_blob_xfer *xfer, const struct bt_mesh_blob_block *block, const struct bt_mesh_blob_chunk *chunk) |
Chunk data write callback. | |
int(* | rd )(const struct bt_mesh_blob_io *io, const struct bt_mesh_blob_xfer *xfer, const struct bt_mesh_blob_block *block, const struct bt_mesh_blob_chunk *chunk) |
Chunk data read callback. | |
BLOB stream.
void(* bt_mesh_blob_io::block_end) (const struct bt_mesh_blob_io *io, const struct bt_mesh_blob_xfer *xfer, const struct bt_mesh_blob_block *block) |
Block end callback.
Called when the current block has been transmitted in full. No data from this block will be requested again, and the application data associated with this block may be discarded.
io | BLOB stream. |
xfer | BLOB transfer. |
block | Block that finished sending. |
int(* bt_mesh_blob_io::block_start) (const struct bt_mesh_blob_io *io, const struct bt_mesh_blob_xfer *xfer, const struct bt_mesh_blob_block *block) |
Block start callback.
Called when a new block is opened for sending. Each block is only sent once, and are always sent in increasing order. The data chunks inside a single block may be requested out of order and multiple times.
io | BLOB stream. |
xfer | BLOB transfer. |
block | Block that was started. |
void(* bt_mesh_blob_io::close) (const struct bt_mesh_blob_io *io, const struct bt_mesh_blob_xfer *xfer) |
Close callback.
Called when the reader is closed.
io | BLOB stream. |
xfer | BLOB transfer. |
int(* bt_mesh_blob_io::open) (const struct bt_mesh_blob_io *io, const struct bt_mesh_blob_xfer *xfer, enum bt_mesh_blob_io_mode mode) |
Open callback.
Called when the reader is opened for reading.
io | BLOB stream. |
xfer | BLOB transfer. |
mode | Direction of the stream (read/write). |
int(* bt_mesh_blob_io::rd) (const struct bt_mesh_blob_io *io, const struct bt_mesh_blob_xfer *xfer, const struct bt_mesh_blob_block *block, const struct bt_mesh_blob_chunk *chunk) |
Chunk data read callback.
Used by the BLOB Transfer Client to fetch outgoing data.
The Client calls the chunk data request callback to populate a chunk message going out to the Target nodes. The data request callback may be called out of order and multiple times for each offset, and cannot be used as an indication of progress.
Returning a non-zero status code on the chunk data request callback results in termination of the transfer.
io | BLOB stream. |
xfer | BLOB transfer. |
block | Block the chunk is part of. |
chunk | Chunk to get the data of. The buffer pointer to by the data member should be filled by the callback. |
int(* bt_mesh_blob_io::wr) (const struct bt_mesh_blob_io *io, const struct bt_mesh_blob_xfer *xfer, const struct bt_mesh_blob_block *block, const struct bt_mesh_blob_chunk *chunk) |
Chunk data write callback.
Used by the BLOB Transfer Server on incoming data.
Each block is divided into chunks of data. This callback is called when a new chunk of data is received. Chunks may be received in any order within their block.
If the callback returns successfully, this chunk will be marked as received, and will not be received again unless the block is restarted due to a transfer suspension. If the callback returns a non-zero value, the chunk remains unreceived, and the BLOB Transfer Client will attempt to resend it later.
Note that the Client will only perform a limited number of attempts at delivering a chunk before dropping a Target node from the transfer. The number of retries performed by the Client is implementation specific.
io | BLOB stream. |
xfer | BLOB transfer. |
block | Block the chunk is part of. |
chunk | Received chunk. |