18#ifndef __VSF_SERVICE_STREAM_BASE_H__
19#define __VSF_SERVICE_STREAM_BASE_H__
27#if VSF_USE_STREAM == ENABLED
29#include "../pool/vsf_pool.h"
36#define __PLOOC_CLASS_USE_STRICT_TEMPLATE__
38#if defined(__VSF_STREAM_BASE_CLASS_IMPLEMENT)
39# define __PLOOC_CLASS_IMPLEMENT__
40# undef __VSF_STREAM_BASE_CLASS_IMPLEMENT
41#elif defined(__VSF_STREAM_BASE_CLASS_INHERIT__)
42# define __PLOOC_CLASS_INHERIT__
43# undef __VSF_STREAM_BASE_CLASS_INHERIT__
54#ifndef GENERAL_PBUF_POOL_BLOCK_SIZE
55# define GENERAL_PBUF_POOL_BLOCK_SIZE 64
71#if VSF_STREAM_CFG_SUPPORT_RESOURCE_LIMITATION == ENABLED
88end_def_class(vsf_stream_src_t)
96 vsf_pbuf_t * (*New) ( vsf_stream_src_t *obj_ptr,
114end_def_class(vsf_stream_usr_t)
123#if VSF_STREAM_CFG_SUPPORT_OPEN_CLOSE == ENABLED
124 void (*
Open)( vsf_stream_usr_t *obj_ptr);
125 void (*
Close)( vsf_stream_usr_t *obj_ptr);
128 vsf_pbuf_t *(*Fetch)( vsf_stream_usr_t *obj_ptr);
134#if VSF_STREAM_CFG_GENERAL_PBUF_POOL == ENABLED
135extern vsf_pool(general_pbuf_pool_t) g_tGeneralPBUFPool;
156 vsf_pbuf_t *ptOldBlock);
161#if VSF_STREAM_CFG_SUPPORT_RESOURCE_LIMITATION == ENABLED
vsf_err_t
Definition __type.h:42
vsf_err_t(* Init)(vsf_adc_cfg_t *pCfg)
Definition adc_interface.h:38
struct vsf_stream_tx_t vsf_stream_tx_t
Definition interface.h:34
unsigned short uint16_t
Definition lvgl.h:41
int int_fast32_t
Definition stdint.h:26
unsigned short uint_fast16_t
Definition stdint.h:25
Definition interface.h:108
Definition vsf_stream_base.h:68
vsf_stream_tx_t * ptTX
Definition vsf_stream_base.h:69
uint16_t hwpbufCountUpLimit
Definition vsf_stream_base.h:72
req_pbuf_evt_t tRequestPBUFEvent
Definition vsf_stream_base.h:70
uint16_t hwpbufPoolReserve
Definition vsf_stream_base.h:73
int_fast32_t int_fast32_t nBestSize
Definition vsf_pbuf.h:79
int_fast32_t nNoLessThan
Definition vsf_pbuf.h:78
#define declare_pbuf_pool(__NAME)
Definition vsf_pbuf_pool.h:130
#define def_pbuf_pool(__NAME, __SIZE,...)
Definition vsf_pbuf_pool.h:127
#define vsf_pool(__name)
Definition vsf_pool.h:258
vsf_stream_tx_t * vsf_stream_src_get_tx(vsf_stream_src_t *obj_ptr)
void vsf_stream_usr_close(vsf_stream_usr_t *obj_ptr)
Definition vsf_stream_base.c:288
const i_stream_src_t VSF_STREAM_SRC
void vsf_stream_usr_open(vsf_stream_usr_t *obj_ptr)
Definition vsf_stream_base.c:274
vsf_err_t(* Send)(vsf_stream_src_t *obj_ptr, vsf_pbuf_t *ptOldBlock)
Definition vsf_stream_base.h:99
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
end_def_interface(i_stream_src_t) declare_class(vsf_stream_usr_t)
#define GENERAL_PBUF_POOL_BLOCK_SIZE
Definition vsf_stream_base.h:55
GENERAL_PBUF_POOL_BLOCK_SIZE declare_class(vsf_stream_src_t)
vsf_err_t vsf_stream_src_send_pbuf(vsf_stream_src_t *obj_ptr, vsf_pbuf_t *ptOldBlock)
Definition vsf_stream_base.c:196
vsf_err_t vsf_stream_src_init(vsf_stream_src_t *obj_ptr, const vsf_stream_src_cfg_t *cfg_ptr)
Definition vsf_stream_base.c:85
vsf_pbuf_t * vsf_stream_usr_fetch_pbuf(vsf_stream_usr_t *obj_ptr)
Definition vsf_stream_base.c:255
def_interface(i_stream_usr_t) vsf_err_t(*Init)(vsf_stream_usr_t *obj_ptr
const vsf_stream_src_cfg_t * cfg_ptr
Definition vsf_stream_base.h:92
void(* Close)(vsf_stream_usr_t *obj_ptr)
Definition vsf_stream_base.h:125
const i_stream_usr_t VSF_STREAM_USR
Definition vsf_stream_base.c:55
void(* Open)(vsf_stream_usr_t *obj_ptr)
Definition vsf_stream_base.h:124
vsf_err_t vsf_stream_src_set_limitation(vsf_stream_src_t *obj_ptr, uint_fast16_t hwpbufCountUpLimit, uint_fast16_t hwpbufPoolReserve)
Definition vsf_stream_base.c:183
vsf_stream_usr_cfg_t
Definition vsf_stream_base.h:118
vsf_pbuf_t * vsf_stream_src_new_pbuf(vsf_stream_src_t *obj_ptr, int_fast32_t nNoLessThan, int_fast32_t nBestSize)
Definition vsf_stream_base.c:135
def_class(vsf_stream_src_t,, public:vsf_stream_src_cfg_t ;) end_def_class(vsf_stream_src_t) def_interface(i_stream_src_t) vsf_err_t(*Init)(vsf_stream_src_t *obj_ptr