15#ifndef ZEPHYR_INCLUDE_BLUETOOTH_MESH_DFU_SRV_H__
16#define ZEPHYR_INCLUDE_BLUETOOTH_MESH_DFU_SRV_H__
36#define BT_MESH_DFU_SRV_INIT(_handlers, _imgs, _img_count) \
38 .blob = { .cb = &_bt_mesh_dfu_srv_blob_cb }, .cb = _handlers, \
39 .imgs = _imgs, .img_count = _img_count, \
48#define BT_MESH_MODEL_DFU_SRV(_srv) \
49 BT_MESH_MODEL_BLOB_SRV(&(_srv)->blob), \
50 BT_MESH_MODEL_CB(BT_MESH_MODEL_ID_DFU_SRV, _bt_mesh_dfu_srv_op, NULL, \
51 _srv, &_bt_mesh_dfu_srv_cb)
void bt_mesh_dfu_srv_applied(struct bt_mesh_dfu_srv *srv)
Confirm that the received DFU transfer was applied.
void bt_mesh_dfu_srv_verified(struct bt_mesh_dfu_srv *srv)
Accept the received DFU transfer.
void bt_mesh_dfu_srv_rejected(struct bt_mesh_dfu_srv *srv)
Reject the received DFU transfer.
bool bt_mesh_dfu_srv_is_busy(const struct bt_mesh_dfu_srv *srv)
Check if the Firmware Update Server is busy processing a transfer.
uint8_t bt_mesh_dfu_srv_progress(const struct bt_mesh_dfu_srv *srv)
Get the progress of the current DFU procedure, in percent.
void bt_mesh_dfu_srv_cancel(struct bt_mesh_dfu_srv *srv)
Cancel the ongoing DFU transfer.
bt_mesh_dfu_effect
Expected effect of a DFU transfer.
Definition dfu.h:108
__UINT8_TYPE__ uint8_t
Definition stdint.h:88
__UINT16_TYPE__ uint16_t
Definition stdint.h:89
BLOB stream.
Definition blob.h:145
BLOB Transfer Server model event handlers.
Definition blob_srv.h:51
BLOB Transfer Server instance.
Definition blob_srv.h:131
DFU image instance.
Definition dfu.h:140
Firmware Update Server event callbacks.
Definition dfu_srv.h:54
int(* recover)(struct bt_mesh_dfu_srv *srv, const struct bt_mesh_dfu_img *img, const struct bt_mesh_blob_io **io)
Transfer recovery callback.
Definition dfu_srv.h:152
void(* end)(struct bt_mesh_dfu_srv *srv, const struct bt_mesh_dfu_img *img, bool success)
Transfer end callback.
Definition dfu_srv.h:133
int(* start)(struct bt_mesh_dfu_srv *srv, const struct bt_mesh_dfu_img *img, struct net_buf_simple *metadata, const struct bt_mesh_blob_io **io)
Transfer start callback.
Definition dfu_srv.h:113
int(* check)(struct bt_mesh_dfu_srv *srv, const struct bt_mesh_dfu_img *img, struct net_buf_simple *metadata, enum bt_mesh_dfu_effect *effect)
Transfer check callback.
Definition dfu_srv.h:80
int(* apply)(struct bt_mesh_dfu_srv *srv, const struct bt_mesh_dfu_img *img)
Transfer apply callback.
Definition dfu_srv.h:168
Firmware Update Server instance.
Definition dfu_srv.h:176
uint8_t idx
Definition dfu_srv.h:194
const struct bt_mesh_dfu_srv_cb * cb
Callback structure.
Definition dfu_srv.h:180
uint16_t meta
Definition dfu_srv.h:196
uint16_t timeout_base
Definition dfu_srv.h:195
uint8_t effect
Definition dfu_srv.h:190
struct bt_mesh_blob_srv blob
Underlying BLOB Transfer Server.
Definition dfu_srv.h:178
uint8_t phase
Definition dfu_srv.h:192
const struct bt_mesh_model * mod
Definition dfu_srv.h:187
const struct bt_mesh_dfu_img * imgs
List of updatable images.
Definition dfu_srv.h:182
size_t img_count
Number of updatable images.
Definition dfu_srv.h:184
struct bt_mesh_dfu_srv::@109 update
uint8_t ttl
Definition dfu_srv.h:193
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
Simple network buffer representation.
Definition buf.h:87
static volatile bool success[4]
Definition test_mslab_threadsafe.c:37