PebbleOS v4.45.0-179-g439c45a48
Loading...
Searching...
No Matches
send.h File Reference
#include <stddef.h>
#include <stdint.h>
#include <pbl/pp/session.h>
#include <pbl/util/list.h>

Data Structures

struct  pbl_pp_send_job_api
 Callbacks the send queue uses to drain a job. More...
 
struct  pbl_pp_send_job
 Message, header included, queued without a copy. More...
 

Macros

#define PBL_PP_DEFAULT_TIMEOUT_MS   4000
 Default time to wait for room in the send buffers, in milliseconds.
 

Functions

int pbl_pp_send (struct pbl_pp_session *session, uint16_t endpoint_id, const uint8_t *data, size_t length, uint32_t timeout_ms)
 Send a complete message.
 
size_t pbl_pp_send_buffer_max_payload (const struct pbl_pp_session *session)
 Get the largest payload a send buffer can hold.
 
struct pbl_pp_send_buffer * pbl_pp_send_buffer_begin (struct pbl_pp_session *session, uint16_t endpoint_id, size_t length, uint32_t timeout_ms)
 Start building a message.
 
struct pbl_pp_send_buffer * pbl_pp_send_buffer_begin_bulk (struct pbl_pp_session *session, uint16_t endpoint_id, size_t length, uint32_t timeout_ms)
 Start building a message of a bulk transfer.
 
bool pbl_pp_send_buffer_write (struct pbl_pp_send_buffer *sb, const uint8_t *data, size_t length)
 Append payload to a message.
 
void pbl_pp_send_buffer_end (struct pbl_pp_send_buffer *sb)
 Queue a message for sending and release the send buffer.
 
void pbl_pp_send_job_submit (struct pbl_pp_session *session, struct pbl_pp_send_job **job)
 Queue a job for sending.