Zephyr API Documentation 4.0.0
A Scalable Open Source RTOS
Loading...
Searching...
No Matches

Firmware Distribution Server callbacks: More...

#include <dfd_srv.h>

Data Fields

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.
 
void(* del )(struct bt_mesh_dfd_srv *srv, const struct bt_mesh_dfu_slot *slot)
 Slot delete callback.
 
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.
 
void(* phase )(struct bt_mesh_dfd_srv *srv, enum bt_mesh_dfd_phase phase)
 Phase change callback (Optional).
 

Detailed Description

Firmware Distribution Server callbacks:

Field Documentation

◆ del

void(* bt_mesh_dfd_srv_cb::del) (struct bt_mesh_dfd_srv *srv, const struct bt_mesh_dfu_slot *slot)

Slot delete callback.

Called when the Firmware Distribution Server is about to delete a DFU image slot. All allocated data associated with the firmware slot should be deleted.

Parameters
srvFirmware Update Server instance.
slotDFU image slot being deleted.

◆ phase

void(* bt_mesh_dfd_srv_cb::phase) (struct bt_mesh_dfd_srv *srv, enum bt_mesh_dfd_phase phase)

Phase change callback (Optional).

Called whenever the phase of the Firmware Distribution Server changes.

Parameters
srvFirmware Distribution Server model instance.
phaseNew Firmware Distribution phase.

◆ recv

int(* bt_mesh_dfd_srv_cb::recv) (struct bt_mesh_dfd_srv *srv, const struct bt_mesh_dfu_slot *slot, const struct bt_mesh_blob_io **io)

Slot receive callback.

Called at the start of an upload procedure. The callback must fill io with a pointer to a writable BLOB stream for the Firmware Distribution Server to write the firmware image to.

Parameters
srvFirmware Distribution Server model instance.
slotDFU image slot being received.
ioBLOB stream response pointer.
Returns
0 on success, or (negative) error code otherwise.

◆ send

int(* bt_mesh_dfd_srv_cb::send) (struct bt_mesh_dfd_srv *srv, const struct bt_mesh_dfu_slot *slot, const struct bt_mesh_blob_io **io)

Slot send callback.

Called at the start of a distribution procedure. The callback must fill io with a pointer to a readable BLOB stream for the Firmware Distribution Server to read the firmware image from.

Parameters
srvFirmware Distribution Server model instance.
slotDFU image slot being sent.
ioBLOB stream response pointer.
Returns
0 on success, or (negative) error code otherwise.

The documentation for this struct was generated from the following file: