IoTivity-Lite
oc_buffer.h File Reference
#include "port/oc_connectivity.h"
#include "util/oc_memb.h"
#include "util/oc_process.h"
#include <stdbool.h>

Functions

oc_message_t * oc_allocate_message (void)
 function to allocate an incoming message More...
 
oc_message_t * oc_allocate_message_from_pool (oc_memb_t *pool)
 allocate message from specific memory pool More...
 
void oc_message_add_ref (oc_message_t *message)
 add reference (for tracking in use) More...
 
void oc_message_unref (oc_message_t *message)
 remove reference (for tracking in use) More...
 
void oc_recv_message (oc_message_t *message)
 receive (CoAP) message More...
 
void oc_send_message (oc_message_t *message)
 send (CoAP) message More...
 
void oc_set_buffers_avail_cb (oc_memb_buffers_avail_callback_t cb)
 set callback for memory availability of incoming message buffers More...
 

Function Documentation

◆ oc_allocate_message()

oc_message_t* oc_allocate_message ( void  )

function to allocate an incoming message

Returns
oc_message_t* the allocated message

◆ oc_allocate_message_from_pool()

oc_message_t* oc_allocate_message_from_pool ( oc_memb_t *  pool)

allocate message from specific memory pool

Parameters
poolthe memory pool to use for allocation
Returns
oc_message_t* the message

◆ oc_message_add_ref()

void oc_message_add_ref ( oc_message_t *  message)

add reference (for tracking in use)

Parameters
messagethe message

◆ oc_message_unref()

void oc_message_unref ( oc_message_t *  message)

remove reference (for tracking in use)

Parameters
messagethe message

◆ oc_recv_message()

void oc_recv_message ( oc_message_t *  message)

receive (CoAP) message

Parameters
messagethe received messsage

◆ oc_send_message()

void oc_send_message ( oc_message_t *  message)

send (CoAP) message

Parameters
messagethe CoAP message

◆ oc_set_buffers_avail_cb()

void oc_set_buffers_avail_cb ( oc_memb_buffers_avail_callback_t  cb)

set callback for memory availability of incoming message buffers

Parameters
cbthe callback