VSF Documented
Data Structures | Macros | Typedefs | Functions | Variables
vsf_stream_base.h File Reference
#include "service/vsf_service_cfg.h"
#include "./pbuf/vsf_pbuf.h"
#include "./pbuf/vsf_pbuf_pool.h"
#include "./interface.h"
#include "../pool/vsf_pool.h"
#include "./pbuf_queue/vsf_pbuf_queue.h"
#include "utilities/ooc_class.h"
#include "./vsf_stream_writer.h"
#include "./vsf_stream_reader.h"

Go to the source code of this file.

Data Structures

struct  vsf_stream_src_cfg_t
 

Macros

#define __PLOOC_CLASS_USE_STRICT_TEMPLATE__
 
#define GENERAL_PBUF_POOL_BLOCK_SIZE   64
 

Typedefs

typedef struct vsf_stream_src_cfg_t vsf_stream_src_cfg_t
 

Functions

 declare_pbuf_pool (general_pbuf_pool_t) def_pbuf_pool(general_pbuf_pool_t
 
GENERAL_PBUF_POOL_BLOCK_SIZE declare_class (vsf_stream_src_t)
 
 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
 
 end_def_interface (i_stream_src_t) declare_class(vsf_stream_usr_t)
 
 def_class (vsf_stream_usr_t,, public:vsf_stream_rx_t *ptRX;) end_def_class(vsf_stream_usr_t) typedef struct vsf_stream_usr_cfg_t
 
 def_interface (i_stream_usr_t) vsf_err_t(*Init)(vsf_stream_usr_t *obj_ptr
 
 end_def_interface (i_stream_usr_t) extern vsf_pool(general_pbuf_pool_t) g_tGeneralPBUFPool
 
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_send_pbuf (vsf_stream_src_t *obj_ptr, vsf_pbuf_t *ptOldBlock)
 
vsf_stream_tx_tvsf_stream_src_get_tx (vsf_stream_src_t *obj_ptr)
 
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_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 vsf_stream_src_cfg_tcfg_ptr
 
vsf_stream_tx_t *(* GetTX )(vsf_stream_src_t *obj_ptr)
 
struct { 
 
   vsf_pbuf_t *(*   New )(vsf_stream_src_t *obj_ptr,
       int_fast32_t nNoLessThan,
       int_fast32_t nBestSize
 
   vsf_err_t(*   Send )(vsf_stream_src_t *obj_ptr,
       vsf_pbuf_t *ptOldBlock) 
 
Block 
 
 vsf_stream_usr_cfg_t
 
void(* Open )(vsf_stream_usr_t *obj_ptr)
 
void(* Close )(vsf_stream_usr_t *obj_ptr)
 
const i_stream_src_t VSF_STREAM_SRC
 
const i_stream_usr_t VSF_STREAM_USR
 

Macro Definition Documentation

◆ __PLOOC_CLASS_USE_STRICT_TEMPLATE__

#define __PLOOC_CLASS_USE_STRICT_TEMPLATE__

\NOTE: Make sure #include "utilities/ooc_class.h" is close to the class ! definition and there is NO ANY OTHER module-interface-header file ! included in this file

◆ GENERAL_PBUF_POOL_BLOCK_SIZE

#define GENERAL_PBUF_POOL_BLOCK_SIZE   64

Typedef Documentation

◆ vsf_stream_src_cfg_t

Function Documentation

◆ declare_pbuf_pool()

declare_pbuf_pool ( general_pbuf_pool_t  )

◆ declare_class()

GENERAL_PBUF_POOL_BLOCK_SIZE declare_class ( vsf_stream_src_t  )

◆ def_class() [1/2]

def_class ( vsf_stream_src_t  ,
public:vsf_stream_src_cfg_t ;   
)

◆ end_def_interface() [1/2]

end_def_interface ( i_stream_src_t  )

◆ def_class() [2/2]

def_class ( vsf_stream_usr_t  ,
public:vsf_stream_rx_t *ptRX;   
)

◆ def_interface()

def_interface ( i_stream_usr_t  )

◆ end_def_interface() [2/2]

end_def_interface ( i_stream_usr_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 
)
extern
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 
)
extern
Note
check them separately to avoid busfault, in order to give the right diagnosis info

check uplimit

◆ vsf_stream_src_send_pbuf()

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

write stream

◆ vsf_stream_src_get_tx()

vsf_stream_tx_t * vsf_stream_src_get_tx ( vsf_stream_src_t *  obj_ptr)
extern

◆ 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 
)
extern

◆ 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 
)
extern
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)
extern
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)
extern

◆ vsf_stream_usr_close()

void vsf_stream_usr_close ( vsf_stream_usr_t *  obj_ptr)
extern

Variable Documentation

◆ cfg_ptr

const vsf_stream_usr_cfg_t* cfg_ptr

◆ GetTX

vsf_stream_tx_t *(* GetTX) (vsf_stream_src_t *obj_ptr) ( vsf_stream_src_t *  obj_ptr)

◆ New

vsf_pbuf_t *(* New) (vsf_stream_src_t *obj_ptr, int_fast32_t nNoLessThan, int_fast32_t nBestSize) ( vsf_stream_src_t *  obj_ptr,
int_fast32_t  nNoLessThan,
int_fast32_t  nBestSize 
)

◆ Send

vsf_err_t(* Send) (vsf_stream_src_t *obj_ptr, vsf_pbuf_t *ptOldBlock) ( vsf_stream_src_t *  obj_ptr,
vsf_pbuf_t *  ptOldBlock 
)

◆ [struct]

struct { ... } Block

◆ vsf_stream_usr_cfg_t

vsf_stream_usr_cfg_t

◆ Open

void(* Open) (vsf_stream_usr_t *obj_ptr) ( vsf_stream_usr_t *  obj_ptr)

◆ Close

void(* Close) (vsf_stream_usr_t *obj_ptr) ( vsf_stream_usr_t *  obj_ptr)

◆ Fetch

vsf_pbuf_t *(* Fetch) (vsf_stream_usr_t *obj_ptr) ( vsf_stream_usr_t *  obj_ptr)

◆ VSF_STREAM_SRC

const i_stream_src_t VSF_STREAM_SRC
extern

◆ VSF_STREAM_USR

const i_stream_usr_t VSF_STREAM_USR
extern