Files | |
| file | unibase_binding.h |
| functions to bind unibase to a specific platform | |
Functions | |
| int | ubb_memory_out_init (char *mem, int size) |
| initialize the internal memory_out function More... | |
| int | ubb_memory_out_close (void) |
| de-initialize memory_out function More... | |
| char * | ubb_memory_out_buffer (void) |
| return the memory pointer of memory_out More... | |
| int | ubb_memory_out_lastline (char **str, int *size) |
| return the most recent output line in memory_out More... | |
| int | ubb_memory_out_alldata (char **rstr, int *size) |
| return the all written line data in the buffer More... | |
| int | ubb_memory_file_out (const char *fname) |
| write the data in memory_out buffer into a file More... | |
| void | ubb_default_initpara (unibase_init_para_t *init_para) |
| return the default initialization parameters supported in the binding layer More... | |
| void | ubb_set_gptp_gettime64 (get64ts_t func) |
| set gptptime function for ub_gptp_gettime64 More... | |
| void | ubb_unibase_easyinit (void) |
| initialize unibase with 'ubb_default_initpara' More... | |
Typedefs | |
| typedef uint64_t(* | get64ts_t) (void) |
Macros | |
| #define | UBB_DEFAULT_DEBUG_LOG_MEMORY (64*1024) |
| ubb_memory_out_init uses this value to allocate internal buffer when 'mem' parameter is NULL. More... | |
| #define | UBB_MEMOUT_ENDMARK "---###---" |
| ubb_memory_out always add this end mark at the end of printing. More... | |
| #define | UBB_DEFAULT_LOG_INITSTR "4,ubase:45" |
| ubb_default_initpara uses this string as 'ub_log_initstr' More... | |
| #define | UBB_GETENV getenv |
| get a string from an environment variable More... | |
| #define UBB_DEFAULT_DEBUG_LOG_MEMORY (64*1024) |
ubb_memory_out_init uses this value to allocate internal buffer when 'mem' parameter is NULL.
| #define UBB_MEMOUT_ENDMARK "---###---" |
ubb_memory_out always add this end mark at the end of printing.
| #define UBB_DEFAULT_LOG_INITSTR "4,ubase:45" |
ubb_default_initpara uses this string as 'ub_log_initstr'
| #define UBB_GETENV getenv |
get a string from an environment variable
| typedef uint64_t(* get64ts_t) (void) |
| int ubb_memory_out_init | ( | char * | mem, |
| int | size | ||
| ) |
initialize the internal memory_out function
| mem | use this memory as a buffer for memory_out. if mem is NULL, allocate memory internally for 'size' bytes |
| size | size of memory to be used for memory_out |
| int ubb_memory_out_close | ( | void | ) |
de-initialize memory_out function
| char* ubb_memory_out_buffer | ( | void | ) |
return the memory pointer of memory_out
| int ubb_memory_out_lastline | ( | char ** | str, |
| int * | size | ||
| ) |
return the most recent output line in memory_out
| str | pointer of string pointer to return result string |
| size | pointer of integer pointer to return result size |
| int ubb_memory_out_alldata | ( | char ** | rstr, |
| int * | size | ||
| ) |
return the all written line data in the buffer
| rstr | allocated pointer of the returned data |
| size | size of the returned data |
| int ubb_memory_file_out | ( | const char * | fname | ) |
write the data in memory_out buffer into a file
| fname | file name |
| void ubb_default_initpara | ( | unibase_init_para_t * | init_para | ) |
return the default initialization parameters supported in the binding layer
| init_para | pointer of unibase initialization parameter |
| void ubb_set_gptp_gettime64 | ( | get64ts_t | func | ) |
set gptptime function for ub_gptp_gettime64
| func | a function which returns 64-bit gptp time |
| void ubb_unibase_easyinit | ( | void | ) |
initialize unibase with 'ubb_default_initpara'