13#ifndef ZEPHYR_INCLUDE_BLUETOOTH_MESH_BLOB_H__
14#define ZEPHYR_INCLUDE_BLUETOOTH_MESH_BLOB_H__
30#ifndef CONFIG_BT_MESH_BLOB_CHUNK_COUNT_MAX
31#define CONFIG_BT_MESH_BLOB_CHUNK_COUNT_MAX 0
bt_mesh_blob_io_mode
BLOB stream interaction mode.
Definition blob.h:143
bt_mesh_blob_xfer_phase
Transfer phase.
Definition blob.h:47
#define CONFIG_BT_MESH_BLOB_CHUNK_COUNT_MAX
Definition blob.h:31
bt_mesh_blob_status
BLOB model status codes.
Definition blob.h:63
bt_mesh_blob_xfer_mode
BLOB transfer mode.
Definition blob.h:35
@ BT_MESH_BLOB_WRITE
Write data to the stream.
Definition blob.h:147
@ BT_MESH_BLOB_READ
Read data from the stream.
Definition blob.h:145
@ BT_MESH_BLOB_XFER_PHASE_WAITING_FOR_BLOCK
The BLOB Transfer Server is waiting for the next block of data.
Definition blob.h:53
@ BT_MESH_BLOB_XFER_PHASE_INACTIVE
The BLOB Transfer Server is awaiting configuration.
Definition blob.h:49
@ BT_MESH_BLOB_XFER_PHASE_WAITING_FOR_START
The BLOB Transfer Server is ready to receive a BLOB transfer.
Definition blob.h:51
@ BT_MESH_BLOB_XFER_PHASE_SUSPENDED
The BLOB transfer is paused.
Definition blob.h:59
@ BT_MESH_BLOB_XFER_PHASE_COMPLETE
The BLOB was transferred successfully.
Definition blob.h:57
@ BT_MESH_BLOB_XFER_PHASE_WAITING_FOR_CHUNK
The BLOB Transfer Server is waiting for the next chunk of data.
Definition blob.h:55
@ BT_MESH_BLOB_ERR_BLOB_TOO_LARGE
There is not enough space available in memory to receive the BLOB.
Definition blob.h:90
@ BT_MESH_BLOB_ERR_INFO_UNAVAILABLE
The requested information cannot be provided while the server is in the current phase.
Definition blob.h:100
@ BT_MESH_BLOB_ERR_WRONG_BLOB_ID
The message contains a BLOB ID value that is not expected.
Definition blob.h:87
@ BT_MESH_BLOB_ERR_INVALID_BLOCK_NUM
The Block Number field value is not within the range of blocks being transferred.
Definition blob.h:69
@ BT_MESH_BLOB_ERR_WRONG_PHASE
The operation cannot be performed while the server is in the current phase.
Definition blob.h:83
@ BT_MESH_BLOB_ERR_UNSUPPORTED_MODE
The transfer mode is not supported by the BLOB Transfer Server model.
Definition blob.h:94
@ BT_MESH_BLOB_ERR_INTERNAL
An internal error occurred on the node.
Definition blob.h:96
@ BT_MESH_BLOB_SUCCESS
The message was processed successfully.
Definition blob.h:65
@ BT_MESH_BLOB_ERR_INVALID_BLOCK_SIZE
The block size is smaller than the size indicated by the Min Block Size Log state or is larger than t...
Definition blob.h:74
@ BT_MESH_BLOB_ERR_INVALID_PARAM
A parameter value in the message cannot be accepted.
Definition blob.h:85
@ BT_MESH_BLOB_ERR_INVALID_CHUNK_SIZE
The chunk size exceeds the size indicated by the Max Chunk Size state, or the number of chunks exceed...
Definition blob.h:79
@ BT_MESH_BLOB_XFER_MODE_PUSH
Push mode (Push BLOB Transfer Mode).
Definition blob.h:39
@ BT_MESH_BLOB_XFER_MODE_ALL
Both modes are valid.
Definition blob.h:43
@ BT_MESH_BLOB_XFER_MODE_NONE
No valid transfer mode.
Definition blob.h:37
@ BT_MESH_BLOB_XFER_MODE_PULL
Pull mode (Pull BLOB Transfer Mode).
Definition blob.h:41
#define DIV_ROUND_UP(n, d)
Divide and round up.
Definition util.h:348
__INTPTR_TYPE__ off_t
Definition types.h:36
__UINT64_TYPE__ uint64_t
Definition stdint.h:91
__UINT8_TYPE__ uint8_t
Definition stdint.h:88
__UINT16_TYPE__ uint16_t
Definition stdint.h:89
BLOB transfer data block.
Definition blob.h:104
uint16_t number
Block number.
Definition blob.h:110
size_t size
Block size in bytes.
Definition blob.h:106
uint16_t chunk_count
Number of chunks in block.
Definition blob.h:112
off_t offset
Offset in bytes from the start of the BLOB.
Definition blob.h:108
uint8_t missing[(((0)+(8) - 1)/(8))]
Bitmap of missing chunks.
Definition blob.h:115
BLOB data chunk.
Definition blob.h:119
off_t offset
Offset of the chunk data from the start of the block.
Definition blob.h:121
uint8_t * data
Chunk data.
Definition blob.h:125
size_t size
Chunk data size.
Definition blob.h:123
BLOB stream.
Definition blob.h:151
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.
Definition blob.h:256
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.
Definition blob.h:162
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.
Definition blob.h:201
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.
Definition blob.h:187
void(* close)(const struct bt_mesh_blob_io *io, const struct bt_mesh_blob_xfer *xfer)
Close callback.
Definition blob.h:173
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.
Definition blob.h:231
BLOB transfer.
Definition blob.h:129
enum bt_mesh_blob_xfer_mode mode
BLOB transfer mode.
Definition blob.h:135
uint16_t chunk_size
Base chunk size.
Definition blob.h:139
size_t size
Total BLOB size in bytes.
Definition blob.h:133
uint64_t id
BLOB ID.
Definition blob.h:131
uint8_t block_size_log
Definition blob.h:137