VSF Documented
Macros | Functions | Variables
vsf_stream_base.c File Reference
#include "service/vsf_service_cfg.h"
#include "./vsf_stream.h"
#include "./pbuf/vsf_pbuf.h"

Macros

#define __VSF_STREAM_BASE_CLASS_IMPLEMENT
 
#define this   (*this_ptr)
 
#define GENERAL_PBUF_POLL_PRIV_USER_COUNT   0
 

Functions

VSF_CAL_NO_INIT vsf_pool (general_pbuf_pool_t)
 
 implement_pbuf_pool (general_pbuf_pool_t)
 
vsf_err_t vsf_stream_src_init (vsf_stream_src_t *obj_ptr, const vsf_stream_src_cfg_t *cfg_ptr)
 
vsf_pbuf_t * vsf_stream_src_new_pbuf (vsf_stream_src_t *obj_ptr, int_fast32_t nNoLessThan, int_fast32_t nBestSize)
 
vsf_err_t vsf_stream_src_set_limitation (vsf_stream_src_t *obj_ptr, uint_fast16_t hwpbufCountUpLimit, uint_fast16_t hwpbufPoolReserve)
 
vsf_err_t vsf_stream_src_send_pbuf (vsf_stream_src_t *obj_ptr, vsf_pbuf_t *ptOldBlock)
 
vsf_err_t vsf_stream_usr_init (vsf_stream_usr_t *obj_ptr, const vsf_stream_usr_cfg_t *cfg_ptr)
 
vsf_pbuf_t * vsf_stream_usr_fetch_pbuf (vsf_stream_usr_t *obj_ptr)
 
void vsf_stream_usr_open (vsf_stream_usr_t *obj_ptr)
 
void vsf_stream_usr_close (vsf_stream_usr_t *obj_ptr)
 

Variables

const i_stream_usr_t VSF_STREAM_USR
 

Macro Definition Documentation

◆ __VSF_STREAM_BASE_CLASS_IMPLEMENT

#define __VSF_STREAM_BASE_CLASS_IMPLEMENT

◆ this

#define this   (*this_ptr)

◆ GENERAL_PBUF_POLL_PRIV_USER_COUNT

#define GENERAL_PBUF_POLL_PRIV_USER_COUNT   0

Function Documentation

◆ vsf_pool()

VSF_CAL_NO_INIT vsf_pool ( general_pbuf_pool_t  )

◆ implement_pbuf_pool()

implement_pbuf_pool ( general_pbuf_pool_t  )

◆ vsf_stream_src_init()

vsf_err_t vsf_stream_src_init ( vsf_stream_src_t *  obj_ptr,
const vsf_stream_src_cfg_t cfg_ptr 
)
Note
check them separately to avoid busfault, in order to give the right diagnosis info

using general pbuf pool

Note
non-privileged user of general pbuf pool will reserve specific count of pbuf for privileged (0xFF) users by default (hwpbufPoolReserve equals 0x00)
privileged users(0xFF) should set hwpbufPoolReserve to 0xFF when using general pbuf pool

◆ vsf_stream_src_new_pbuf()

vsf_pbuf_t * vsf_stream_src_new_pbuf ( vsf_stream_src_t *  obj_ptr,
int_fast32_t  nNoLessThan,
int_fast32_t  nBestSize 
)
Note
check them separately to avoid busfault, in order to give the right diagnosis info

check uplimit

◆ vsf_stream_src_set_limitation()

vsf_err_t vsf_stream_src_set_limitation ( vsf_stream_src_t *  obj_ptr,
uint_fast16_t  hwpbufCountUpLimit,
uint_fast16_t  hwpbufPoolReserve 
)

◆ vsf_stream_src_send_pbuf()

vsf_err_t vsf_stream_src_send_pbuf ( vsf_stream_src_t *  obj_ptr,
vsf_pbuf_t *  ptOldBlock 
)
Note
check them separately to avoid busfault, in order to give the right diagnosis info

write stream

◆ vsf_stream_usr_init()

vsf_err_t vsf_stream_usr_init ( vsf_stream_usr_t *  obj_ptr,
const vsf_stream_usr_cfg_t cfg_ptr 
)
Note
check them separately to avoid busfault, in order to give the right diagnosis info

◆ vsf_stream_usr_fetch_pbuf()

vsf_pbuf_t * vsf_stream_usr_fetch_pbuf ( vsf_stream_usr_t *  obj_ptr)
Note
check them separately to avoid busfault, in order to give the right diagnosis info

read stream

◆ vsf_stream_usr_open()

void vsf_stream_usr_open ( vsf_stream_usr_t *  obj_ptr)

◆ vsf_stream_usr_close()

void vsf_stream_usr_close ( vsf_stream_usr_t *  obj_ptr)

Variable Documentation

◆ VSF_STREAM_USR

const i_stream_usr_t VSF_STREAM_USR
Initial value:
= {
.Block = {
},
}
void vsf_stream_usr_close(vsf_stream_usr_t *obj_ptr)
Definition vsf_stream_base.c:288
void vsf_stream_usr_open(vsf_stream_usr_t *obj_ptr)
Definition vsf_stream_base.c:274
vsf_err_t vsf_stream_usr_init(vsf_stream_usr_t *obj_ptr, const vsf_stream_usr_cfg_t *cfg_ptr)
Definition vsf_stream_base.c:223
vsf_pbuf_t * vsf_stream_usr_fetch_pbuf(vsf_stream_usr_t *obj_ptr)
Definition vsf_stream_base.c:255