7#ifndef ZEPHYR_INCLUDE_BLUETOOTH_MESH_BLOB_SRV_H_
8#define ZEPHYR_INCLUDE_BLUETOOTH_MESH_BLOB_SRV_H_
29#if defined(CONFIG_BT_MESH_BLOB_SRV)
30#define BT_MESH_BLOB_BLOCKS_MAX \
31 (DIV_ROUND_UP(CONFIG_BT_MESH_BLOB_SIZE_MAX, \
32 CONFIG_BT_MESH_BLOB_BLOCK_SIZE_MIN))
34#define BT_MESH_BLOB_BLOCKS_MAX 1
43#define BT_MESH_MODEL_BLOB_SRV(_srv) \
44 BT_MESH_MODEL_CB(BT_MESH_MODEL_ID_BLOB_SRV, _bt_mesh_blob_srv_op, \
45 NULL, _srv, &_bt_mesh_blob_srv_cb)
#define ATOMIC_DEFINE(name, num_bits)
Define an array of atomic variables.
Definition: atomic.h:111
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.
uint8_t bt_mesh_blob_srv_progress(const struct bt_mesh_blob_srv *srv)
Get the current progress of the active transfer in percent.
bool bt_mesh_blob_srv_is_busy(const struct bt_mesh_blob_srv *srv)
Get the current state of the BLOB Transfer Server.
#define BT_MESH_BLOB_BLOCKS_MAX
Max number of blocks in a single transfer.
Definition: blob_srv.h:34
int bt_mesh_blob_srv_cancel(struct bt_mesh_blob_srv *srv)
Cancel the current BLOB transfer.
bt_mesh_blob_xfer_phase
Transfer phase.
Definition: blob.h:41
__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:98
BLOB stream.
Definition: blob.h:145
Definition: blob_srv.h:142
uint16_t cli
Definition: blob_srv.h:144
uint16_t timeout_base
Definition: blob_srv.h:146
uint16_t app_idx
Definition: blob_srv.h:145
uint8_t ttl
Definition: blob_srv.h:148
atomic_t blocks[ATOMIC_BITMAP_SIZE(1)]
Definition: blob_srv.h:151
uint16_t mtu_size
Definition: blob_srv.h:147
struct bt_mesh_blob_xfer xfer
Definition: blob_srv.h:143
BLOB Transfer Server model event handlers.
Definition: blob_srv.h:51
int(* recover)(struct bt_mesh_blob_srv *srv, struct bt_mesh_blob_xfer *xfer, const struct bt_mesh_blob_io **io)
Transfer recovery callback.
Definition: blob_srv.h:125
void(* suspended)(struct bt_mesh_blob_srv *srv)
Transfer suspended callback.
Definition: blob_srv.h:99
int(* start)(struct bt_mesh_blob_srv *srv, struct bt_mesh_msg_ctx *ctx, struct bt_mesh_blob_xfer *xfer)
Transfer start callback.
Definition: blob_srv.h:65
void(* resume)(struct bt_mesh_blob_srv *srv)
Transfer resume callback.
Definition: blob_srv.h:107
void(* end)(struct bt_mesh_blob_srv *srv, uint64_t id, bool success)
Transfer end callback.
Definition: blob_srv.h:80
BLOB Transfer Server instance.
Definition: blob_srv.h:131
struct bt_mesh_blob_srv::@96 pull
const struct bt_mesh_model * mod
Definition: blob_srv.h:139
const struct bt_mesh_blob_io * io
Definition: blob_srv.h:136
const struct bt_mesh_blob_srv_cb * cb
Event handler callbacks.
Definition: blob_srv.h:133
enum bt_mesh_blob_xfer_phase phase
Definition: blob_srv.h:140
struct k_work_delayable rx_timeout
Definition: blob_srv.h:137
struct bt_mesh_blob_srv::bt_mesh_blob_srv_state state
struct bt_mesh_blob_block block
Definition: blob_srv.h:138
uint16_t chunk_idx
Definition: blob_srv.h:156
BLOB transfer.
Definition: blob.h:123
Model callback functions.
Definition: access.h:809
Model opcode handler.
Definition: access.h:359
Abstraction that describes a Mesh Model instance.
Definition: access.h:887
Message sending context.
Definition: msg.h:76
A structure used to submit work after a delay.
Definition: kernel.h:3908