7#ifndef ZEPHYR_INCLUDE_BLUETOOTH_MESH_BLOB_CLI_H_
8#define ZEPHYR_INCLUDE_BLUETOOTH_MESH_BLOB_CLI_H_
33#define BT_MESH_MODEL_BLOB_CLI(_cli) \
34 BT_MESH_MODEL_CB(BT_MESH_MODEL_ID_BLOB_CLI, _bt_mesh_blob_cli_op, \
35 NULL, _cli, &_bt_mesh_blob_cli_cb)
263struct blob_cli_broadcast_ctx {
302 struct blob_cli_broadcast_ctx ctx;
void bt_mesh_blob_cli_set_chunk_interval_ms(struct bt_mesh_blob_cli *cli, uint32_t interval_ms)
Set chunk sending interval in ms.
uint8_t bt_mesh_blob_cli_xfer_progress_active_get(struct bt_mesh_blob_cli *cli)
Get the current progress of the active transfer in percent.
int bt_mesh_blob_cli_xfer_progress_get(struct bt_mesh_blob_cli *cli, const struct bt_mesh_blob_cli_inputs *inputs)
Get the progress of BLOB transfer.
void bt_mesh_blob_cli_cancel(struct bt_mesh_blob_cli *cli)
Cancel an ongoing transfer.
bool bt_mesh_blob_cli_is_busy(struct bt_mesh_blob_cli *cli)
Get the current state of the BLOB Transfer Client.
int bt_mesh_blob_cli_resume(struct bt_mesh_blob_cli *cli)
Resume the suspended transfer.
int bt_mesh_blob_cli_send(struct bt_mesh_blob_cli *cli, const struct bt_mesh_blob_cli_inputs *inputs, const struct bt_mesh_blob_xfer *xfer, const struct bt_mesh_blob_io *io)
Perform a BLOB transfer.
int bt_mesh_blob_cli_suspend(struct bt_mesh_blob_cli *cli)
Suspend the active transfer.
int bt_mesh_blob_cli_caps_get(struct bt_mesh_blob_cli *cli, const struct bt_mesh_blob_cli_inputs *inputs)
Retrieve transfer capabilities for a list of Target nodes.
bt_mesh_blob_cli_state
BLOB Transfer Client state.
Definition blob_cli.h:163
@ BT_MESH_BLOB_CLI_STATE_BLOCK_CHECK
Checking block status.
Definition blob_cli.h:175
@ BT_MESH_BLOB_CLI_STATE_NONE
No transfer is active.
Definition blob_cli.h:165
@ BT_MESH_BLOB_CLI_STATE_CANCEL
Cancelling transfer.
Definition blob_cli.h:179
@ BT_MESH_BLOB_CLI_STATE_CAPS_GET
Retrieving transfer capabilities.
Definition blob_cli.h:167
@ BT_MESH_BLOB_CLI_STATE_SUSPENDED
Transfer is suspended.
Definition blob_cli.h:181
@ BT_MESH_BLOB_CLI_STATE_START
Sending transfer start.
Definition blob_cli.h:169
@ BT_MESH_BLOB_CLI_STATE_XFER_CHECK
Checking transfer status.
Definition blob_cli.h:177
@ BT_MESH_BLOB_CLI_STATE_BLOCK_SEND
Sending block chunks.
Definition blob_cli.h:173
@ BT_MESH_BLOB_CLI_STATE_XFER_PROGRESS_GET
Checking transfer progress.
Definition blob_cli.h:183
@ BT_MESH_BLOB_CLI_STATE_BLOCK_START
Sending block start.
Definition blob_cli.h:171
bt_mesh_blob_xfer_phase
Transfer phase.
Definition blob.h:41
#define CONFIG_BT_MESH_BLOB_CHUNK_COUNT_MAX
Definition blob.h:25
bt_mesh_blob_status
BLOB model status codes.
Definition blob.h:57
bt_mesh_blob_xfer_mode
BLOB transfer mode.
Definition blob.h:29
struct _slist sys_slist_t
Single-linked list structure.
Definition slist.h:49
struct _snode sys_snode_t
Single-linked list node structure.
Definition slist.h:39
#define DIV_ROUND_UP(n, d)
Divide and round up.
Definition util.h:352
ssize_t send(int sock, const void *buf, size_t len, int flags)
__UINT32_TYPE__ uint32_t
Definition stdint.h:90
__UINT64_TYPE__ uint64_t
Definition stdint.h:91
__UINT8_TYPE__ uint8_t
Definition stdint.h:88
__UINT16_TYPE__ uint16_t
Definition stdint.h:89
__INT64_TYPE__ int64_t
Definition stdint.h:75
BLOB transfer data block.
Definition blob.h:98
Transfer capabilities of a Target node.
Definition blob_cli.h:139
enum bt_mesh_blob_xfer_mode modes
Supported transfer modes.
Definition blob_cli.h:159
uint16_t max_chunks
Max number of chunks per block.
Definition blob_cli.h:150
uint8_t max_block_size_log
Logarithmic representation of the maximum block size.
Definition blob_cli.h:147
uint16_t mtu_size
Max MTU size.
Definition blob_cli.h:156
uint8_t min_block_size_log
Logarithmic representation of the minimum block size.
Definition blob_cli.h:144
uint16_t max_chunk_size
Max chunk size.
Definition blob_cli.h:153
size_t max_size
Max BLOB size.
Definition blob_cli.h:141
Event handler callbacks for the BLOB Transfer Client model.
Definition blob_cli.h:190
void(* suspended)(struct bt_mesh_blob_cli *cli)
Transfer is suspended.
Definition blob_cli.h:225
void(* lost_target)(struct bt_mesh_blob_cli *cli, struct bt_mesh_blob_target *target, enum bt_mesh_blob_status reason)
Target node loss callback.
Definition blob_cli.h:215
void(* xfer_progress)(struct bt_mesh_blob_cli *cli, struct bt_mesh_blob_target *target, const struct bt_mesh_blob_xfer_info *info)
Transfer progress callback.
Definition blob_cli.h:249
void(* caps)(struct bt_mesh_blob_cli *cli, const struct bt_mesh_blob_cli_caps *caps)
Capabilities retrieval completion callback.
Definition blob_cli.h:202
void(* end)(struct bt_mesh_blob_cli *cli, const struct bt_mesh_blob_xfer *xfer, bool success)
Transfer end callback.
Definition blob_cli.h:237
void(* xfer_progress_complete)(struct bt_mesh_blob_cli *cli)
End of Get Transfer Progress procedure.
Definition blob_cli.h:259
BLOB Transfer Client model instance.
Definition blob_cli.h:293
uint16_t pending
Definition blob_cli.h:307
struct bt_mesh_blob_cli::@148 tx
uint32_t chunk_interval_ms
Definition blob_cli.h:316
const struct bt_mesh_blob_io * io
Definition blob_cli.h:313
struct bt_mesh_blob_target * target
Definition blob_cli.h:301
uint16_t block_count
Definition blob_cli.h:317
const struct bt_mesh_blob_cli_cb * cb
Event handler callbacks.
Definition blob_cli.h:295
uint8_t cancelled
Definition blob_cli.h:310
int64_t cli_timestamp
Definition blob_cli.h:305
uint8_t sending
Definition blob_cli.h:309
const struct bt_mesh_blob_xfer * xfer
Definition blob_cli.h:315
const struct bt_mesh_blob_cli_inputs * inputs
Definition blob_cli.h:314
struct bt_mesh_blob_cli_caps caps
Definition blob_cli.h:322
uint16_t chunk_idx
Definition blob_cli.h:318
uint16_t mtu_size
Definition blob_cli.h:319
enum bt_mesh_blob_cli_state state
Definition blob_cli.h:320
uint8_t retries
Definition blob_cli.h:308
struct bt_mesh_blob_block block
Definition blob_cli.h:321
const struct bt_mesh_model * mod
Definition blob_cli.h:298
BLOB stream.
Definition blob.h:145
Target node's Pull mode (Pull BLOB Transfer Mode) context used while sending chunks to the Target nod...
Definition blob_cli.h:40
uint8_t missing[DIV_ROUND_UP(CONFIG_BT_MESH_BLOB_CHUNK_COUNT_MAX, 8)]
Missing chunks reported by this Target node.
Definition blob_cli.h:45
int64_t block_report_timestamp
Timestamp when the Block Report Timeout Timer expires for this Target node.
Definition blob_cli.h:42
BLOB Transfer Client Target node.
Definition blob_cli.h:49
struct bt_mesh_blob_target_pull * pull
Target node's Pull mode context.
Definition blob_cli.h:59
uint8_t timedout
Definition blob_cli.h:66
uint8_t acked
Definition blob_cli.h:65
uint8_t status
BLOB transfer status, see bt_mesh_blob_status.
Definition blob_cli.h:62
uint8_t procedure_complete
Definition blob_cli.h:64
uint8_t skip
Definition blob_cli.h:67
uint16_t addr
Target node address.
Definition blob_cli.h:54
sys_snode_t n
Linked list node.
Definition blob_cli.h:51
BLOB transfer information.
Definition blob_cli.h:77
uint64_t id
BLOB ID.
Definition blob_cli.h:88
enum bt_mesh_blob_xfer_phase phase
BLOB transfer phase.
Definition blob_cli.h:85
enum bt_mesh_blob_xfer_mode mode
BLOB transfer mode.
Definition blob_cli.h:82
const uint8_t * missing_blocks
Bit field indicating blocks that were not received.
Definition blob_cli.h:100
enum bt_mesh_blob_status status
BLOB transfer status.
Definition blob_cli.h:79
uint32_t size
BLOB size in octets.
Definition blob_cli.h:91
uint8_t block_size_log
Logarithmic representation of the block size.
Definition blob_cli.h:94
uint16_t mtu_size
MTU size in octets.
Definition blob_cli.h:97
BLOB transfer.
Definition blob.h:123
Model callback functions.
Definition access.h:813
Model opcode handler.
Definition access.h:363
Abstraction that describes a Mesh Model instance.
Definition access.h:891
A structure used to submit work after a delay.
Definition kernel.h:4013