15#ifndef ZEPHYR_INCLUDE_BLUETOOTH_MESH_DFD_SRV_H__
16#define ZEPHYR_INCLUDE_BLUETOOTH_MESH_DFD_SRV_H__
28#ifndef CONFIG_BT_MESH_DFD_SRV_TARGETS_MAX
29#define CONFIG_BT_MESH_DFD_SRV_TARGETS_MAX 0
32#ifndef CONFIG_BT_MESH_DFD_SRV_SLOT_MAX_SIZE
33#define CONFIG_BT_MESH_DFD_SRV_SLOT_MAX_SIZE 0
36#ifndef CONFIG_BT_MESH_DFD_SRV_SLOT_SPACE
37#define CONFIG_BT_MESH_DFD_SRV_SLOT_SPACE 0
42#ifdef CONFIG_BT_MESH_DFD_SRV_OOB_UPLOAD
54#define BT_MESH_DFD_SRV_OOB_INIT(_cb, _oob_schemes, _oob_schemes_count) \
57 .dfu = BT_MESH_DFU_CLI_INIT(&_bt_mesh_dfd_srv_dfu_cb), \
59 .blob = { .cb = &_bt_mesh_dfd_srv_blob_cb }, \
62 .schemes = _oob_schemes, \
63 .count = _oob_schemes_count, \
74#define BT_MESH_DFD_SRV_INIT(_cb) \
77 .dfu = BT_MESH_DFU_CLI_INIT(&_bt_mesh_dfd_srv_dfu_cb), \
79 .blob = { .cb = &_bt_mesh_dfd_srv_blob_cb }, \
89#define BT_MESH_MODEL_DFD_SRV(_srv) \
90 BT_MESH_MODEL_DFU_CLI(&(_srv)->dfu), \
91 BT_MESH_MODEL_BLOB_SRV(&(_srv)->upload.blob), \
92 BT_MESH_MODEL_CB(BT_MESH_MODEL_ID_DFD_SRV, _bt_mesh_dfd_srv_op, NULL, \
93 _srv, &_bt_mesh_dfd_srv_cb)
114#ifdef CONFIG_BT_MESH_DFD_SRV_OOB_UPLOAD
142 const char *uri,
uint8_t uri_len,
229#ifdef CONFIG_BT_MESH_DFD_SRV_OOB_UPLOAD
231 bool is_pending_oob_check;
242#ifdef CONFIG_BT_MESH_DFD_SRV_OOB_UPLOAD
250#ifdef CONFIG_BT_MESH_DFD_SRV_OOB_UPLOAD
278 uint8_t *fwid,
size_t fwid_len);
297 size_t size,
const uint8_t *metadata,
size_t metadata_len);
#define CONFIG_BT_MESH_DFD_SRV_TARGETS_MAX
Definition: dfd_srv.h:29
bt_mesh_dfd_upload_phase
Firmware upload phases.
Definition: dfd.h:100
bt_mesh_dfd_phase
Firmware distribution phases.
Definition: dfd.h:73
#define CONFIG_BT_MESH_DFU_URI_MAXLEN
Definition: dfu.h:34
#define CONFIG_BT_MESH_DFU_FWID_MAXLEN
Definition: dfu.h:26
__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
Target node's Pull mode (Pull BLOB Transfer Mode) context used while sending chunks to the Target nod...
Definition: blob_cli.h:40
Firmware Distribution Server callbacks:
Definition: dfd_srv.h:96
int(* recv)(struct bt_mesh_dfd_srv *srv, const struct bt_mesh_dfu_slot *slot, const struct bt_mesh_blob_io **io)
Slot receive callback.
Definition: dfd_srv.h:110
void(* del)(struct bt_mesh_dfd_srv *srv, const struct bt_mesh_dfu_slot *slot)
Slot delete callback.
Definition: dfd_srv.h:181
int(* send)(struct bt_mesh_dfd_srv *srv, const struct bt_mesh_dfu_slot *slot, const struct bt_mesh_blob_io **io)
Slot send callback.
Definition: dfd_srv.h:196
void(* phase)(struct bt_mesh_dfd_srv *srv, enum bt_mesh_dfd_phase phase)
Phase change callback (Optional).
Definition: dfd_srv.h:207
Firmware Distribution Server instance.
Definition: dfd_srv.h:211
struct bt_mesh_dfu_slot * slot
Definition: dfd_srv.h:226
struct bt_mesh_blob_target_pull pull_ctxs[0]
Definition: dfd_srv.h:216
struct bt_mesh_dfu_cli dfu
Definition: dfd_srv.h:214
const struct bt_mesh_model * mod
Definition: dfd_srv.h:213
enum bt_mesh_dfd_phase phase
Definition: dfd_srv.h:221
struct bt_mesh_blob_cli_inputs inputs
Definition: dfd_srv.h:222
const struct flash_area * area
Definition: dfd_srv.h:227
uint16_t target_cnt
Definition: dfd_srv.h:218
const struct bt_mesh_blob_io * io
Definition: dfd_srv.h:217
const struct bt_mesh_dfd_srv_cb * cb
Definition: dfd_srv.h:212
struct bt_mesh_dfd_srv::@103 upload
enum bt_mesh_dfd_upload_phase phase
Definition: dfd_srv.h:225
struct bt_mesh_dfu_target targets[0]
Definition: dfd_srv.h:215
bool apply
Definition: dfd_srv.h:220
uint16_t slot_idx
Definition: dfd_srv.h:219
Firmware Update Client event callbacks.
Definition: dfu_cli.h:130
Firmware Update Client model instance.
Definition: dfu_cli.h:184
DFU image slot for DFU distribution.
Definition: dfu.h:152
DFU Target node.
Definition: dfu_cli.h:54
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
Flash partition.
Definition: flash_map.h:59