PebbleOS v4.45.0-179-g439c45a48
Loading...
Searching...
No Matches
pbl_pp_send_job_api Struct Reference

Callbacks the send queue uses to drain a job. More...

#include <send.h>

Data Fields

size_t(* get_length )(const struct pbl_pp_send_job *job)
 Get the number of bytes left to send, header included.
 
size_t(* copy )(const struct pbl_pp_send_job *job, size_t offset, size_t length, uint8_t *data_out)
 Copy bytes left to send.
 
size_t(* get_read_pointer )(const struct pbl_pp_send_job *job, const uint8_t **data_out)
 Get the next contiguous bytes left to send.
 
void(* consume )(const struct pbl_pp_send_job *job, size_t length)
 Mark bytes as sent.
 
void(* free )(struct pbl_pp_send_job *job)
 Release the job, sent completely or not.
 

Detailed Description

Callbacks the send queue uses to drain a job.

Called with the queue locked.

Field Documentation

◆ consume

void(* pbl_pp_send_job_api::consume) (const struct pbl_pp_send_job *job, size_t length)

Mark bytes as sent.

Parameters
jobJob.
lengthNumber of bytes sent.

◆ copy

size_t(* pbl_pp_send_job_api::copy) (const struct pbl_pp_send_job *job, size_t offset, size_t length, uint8_t *data_out)

Copy bytes left to send.

Parameters
jobJob.
offsetOffset into the bytes left to send.
lengthMaximum number of bytes to copy.
[out]data_outDestination.
Returns
Number of bytes copied.

◆ free

void(* pbl_pp_send_job_api::free) (struct pbl_pp_send_job *job)

Release the job, sent completely or not.

Parameters
jobJob.

◆ get_length

size_t(* pbl_pp_send_job_api::get_length) (const struct pbl_pp_send_job *job)

Get the number of bytes left to send, header included.

Parameters
jobJob.
Returns
Length in bytes.

◆ get_read_pointer

size_t(* pbl_pp_send_job_api::get_read_pointer) (const struct pbl_pp_send_job *job, const uint8_t **data_out)

Get the next contiguous bytes left to send.

Parameters
jobJob.
[out]data_outRead pointer.
Returns
Number of bytes readable at data_out.

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